]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
Show untagged entries count on tag list
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Tag / tags.html.twig
index 19754d415d7818a9799ccd750af982e4a99d134a..552cafc948aad8be691fccfee716ca3a914f5ae4 100644 (file)
@@ -1,15 +1,39 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title "Tags" %}
+{% block title %}{{ 'tag.page_title'|trans }}{% endblock %}
 
 {% block content %}
     <div class="results clearfix">
-        <div class="nb-results left">{% transchoice tags.count %}{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.{% endtranschoice %}</div>
+        <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
     </div>
+
     <br />
-    <ul class="row data">
-    {% for tag in tags %}
-        <li id="tag-{{ tag.id|e }}" class="col l4 m6 s12">{{tag.label}} ({{ tag.entries.getValues | length }})</li>
-    {% endfor %}
-    </ul>
+
+    <div class="row">
+        <ul class="card-tag-labels">
+            {% for tag in tags %}
+                <li title="{{tag.label}} ({{ tag.nbEntries }})" id="tag-{{ tag.id }}">
+                    <a href="{{ path('tag_entries', {'slug': tag.slug}) }}" class="card-tag-link" 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.feedToken %}
+                        <a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="card-tag-rss"><i class="material-icons">rss_feed</i></a>
+                    {% endif %}
+                </li>
+            {% endfor %}
+        </ul>
+    </div>
+
+    <div>
+        <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }} ({{untagged}})</a>
+    </div>
 {% endblock %}