]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig
Card tags template shared
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / _tags.html.twig
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig
new file mode 100644 (file)
index 0000000..144a105
--- /dev/null
@@ -0,0 +1,14 @@
+{% if tags is iterable and tags is not empty %}
+    <ul class="tags{{ listClass|default("")}}">
+        {% for tag in tags %}
+            <li class="chip">
+                <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a>
+                {% if withRemove %}
+                    <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')">
+                        <i class="material-icons vertical-align-middle">delete</i>
+                    </a>
+                {% endif %}
+            </li>
+        {% endfor %}
+    </ul>
+{% endif %}