]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Show tags on non-image gallery preview card 3743/head
authorMatt Burke <burkemw3@gmail.com>
Thu, 11 Oct 2018 23:47:48 +0000 (19:47 -0400)
committerGitHub <noreply@github.com>
Thu, 11 Oct 2018 23:47:48 +0000 (19:47 -0400)
Tags and images aren't coupled, so they shouldn't be coupled in
the UI, either. This also makes the titles and source domains show
up consistently for image and non-image entry cards.

src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig

index 8e6bbae01c8032b5482a30d35992906ebd4fd803..4fd4debdc4a542a61a1204fd433040ae6968a1a1 100644 (file)
@@ -1,5 +1,12 @@
 <div class="card">
     <div class="card-body">
+        <div class="card-image waves-effect waves-block waves-light">
+            <ul class="card-entry-labels">
+            {% for tag in entry.tags | slice(0, 3) %}
+                <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
+            {% endfor %}
+            </ul>
+        </div>
         {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %}
     </div>