]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
Add tags on entries view
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / entries.html.twig
index 986166353f655b3fefad080f17e8faf5c2ceb587..d245c8fdf3c5cff776c942a3ca3572b54897009f 100644 (file)
                     <div class="card-body">
                         {% if not entry.previewPicture is null %}
                             <div class="card-image waves-effect waves-block waves-light">
+                                <ul class="card-entry-labels">
+                                {% for tag in entry.tags | slice(0, 3) %}
+                                    <li>{{ tag.label }}</li>
+                                {% endfor %}
+                                </ul>
                                 <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div>
                             </div>
                         {% endif %}
 
                             {% if entry.previewPicture is null %}
                                 <p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p>
+                                <ul class="card-entry-labels-hidden">
+                                {% for tag in entry.tags | slice(0, 2) %}
+                                    <li>{{ tag.label }}</li>
+                                {% endfor %}
+                            </ul>
                             {% endif %}
                         </div>
                     </div>
                             </div>
 
                             <p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p>
+
+                            <ul class="card-entry-labels-hidden">
+                                {% for tag in entry.tags | slice(0, 2) %}
+                                    <li>{{ tag.label }}</li>
+                                {% endfor %}
+                            </ul>
+                            {% if entry.tags | length > 2 %}
+                                {{ 'entry.list.number_of_tags'|transchoice(entry.tags | length - 2) }}
+                            {% endif %}
                         </div>
                     {% endif %}