]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
Update tag list template to allow renaming.
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / Tag / tags.html.twig
index dfc6175132e217440f9211d0d9b64871dc377e49..35351ab157f3f3717da8f5e49c775c1fbf134ba5 100644 (file)
@@ -4,12 +4,33 @@
 
 {% block content %}
     <div class="results">
-        <div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div>
+        <div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
     </div>
 
     <ul>
     {% for tag in tags %}
-        <li id="tag-{{ tag.id|e }}">{{tag.label}} ({{ tag.entries.getValues | length }})</li>
+        <li id="tag-{{ tag.id|e }}">
+            <a href="{{ path('tag_entries', {'slug': tag.slug}) }}" data-handle="tag-link">{{ tag.label }}&nbsp;({{ tag.nbEntries }})</a>
+
+            {% if renameForms is defined and renameForms[tag.id] is defined %}
+            <form class="card-tag-form hidden" data-handle="tag-rename-form" action="{{ path('tag_rename', {'slug': tag.slug})}}" method="POST">
+                {{ form_widget(renameForms[tag.id].label, {'attr': {'value': tag.label}}) }}
+                {{ form_rest(renameForms[tag.id]) }}
+            </form>
+            <a class="card-tag-rename" data-handler="tag-rename" href="javascript:void(0);">
+                <i class="material-icons">mode_edit</i>
+            </a>
+            {% endif %}
+            {% if app.user.config.rssToken %}
+                <a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="right">
+                    <i class="material-icons md-24">rss_feed</i>
+                </a>
+            {% endif %}
+        </li>
     {% endfor %}
     </ul>
+
+    <div>
+        <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }}</a>
+    </div>
 {% endblock %}