You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.9 KiB
54 lines
1.9 KiB
{% extends 'layout.html.twig' %} |
|
|
|
{% block body %} |
|
<h1>Latest 50 Articles</h1> |
|
<table class="admin-articles-table"> |
|
<thead> |
|
<tr> |
|
<th>Title</th> |
|
<th>Summary</th> |
|
<th>Actions</th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
{% for article in articles %} |
|
<tr> |
|
<td><a href="{{ path('article-slug', {slug: article.slug|url_encode}) }}">{{ article.title }}</a></td> |
|
<td>{{ article.summary|slice(0, 100) }}{% if article.summary|length > 100 %}...{% endif %}</td> |
|
<td> |
|
<span data-controller="copy-to-clipboard"> |
|
<span class="hidden" data-copy-to-clipboard-target="textToCopy">30023:{{ article.pubkey }}:{{ article.slug }}</span> |
|
<button type="button" |
|
data-copy-to-clipboard-target="copyButton" |
|
data-action="click->copy-to-clipboard#copyToClipboard">Copy to Clipboard</button> |
|
</span> |
|
|
|
<form method="post" action="{{ path('admin_article_add_to_index') }}"> |
|
<input type="hidden" name="slug" value="{{ article.slug }}"> |
|
<label> |
|
<select name="index_key" required> |
|
<option value="">Select index</option> |
|
{% for index in indexes %} |
|
<option value="{{ index }}">{{ index }}</option> |
|
{% endfor %} |
|
</select> |
|
</label> |
|
<button type="submit">Add</button> |
|
</form> |
|
</td> |
|
</tr> |
|
{% else %} |
|
<tr><td colspan="4">No articles found.</td></tr> |
|
{% endfor %} |
|
</tbody> |
|
</table> |
|
|
|
<h2>Most Frequent Tags</h2> |
|
<ul> |
|
{% for tag in tagCounts %} |
|
<li>{{ tag.key }} ({{ tag.doc_count }})</li> |
|
{% else %} |
|
<li>No tags found.</li> |
|
{% endfor %} |
|
</ul> |
|
{% endblock %}
|
|
|