aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-10-09 18:41:19 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-10-09 18:55:22 +0200
commit28bb48905a2104adad65508f51737f987dc1ad4c (patch)
tree41922f46efae593fc786b561486a40ee70e25383 /src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
parentb4fcd60e7f217bf0b23fa99c83698e7407bee54b (diff)
downloadwallabag-28bb48905a2104adad65508f51737f987dc1ad4c.tar.gz
wallabag-28bb48905a2104adad65508f51737f987dc1ad4c.tar.zst
wallabag-28bb48905a2104adad65508f51737f987dc1ad4c.zip
Optimize the way tag list is rendered
Instead of retrieve all informations about entries of a tag to just count them, we’ll count them before with a fastest query. Also change the layout of the tag list in material design
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
index 1690633a..96f4f990 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
@@ -6,12 +6,19 @@
6 <div class="results clearfix"> 6 <div class="results clearfix">
7 <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div> 7 <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
8 </div> 8 </div>
9
9 <br /> 10 <br />
10 <ul class="row data"> 11
11 {% for tag in tags %} 12 <div class="row">
12 <li id="tag-{{ tag.id|e }}" class="col l4 m6 s12"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.entries.getValues | length }})</a></li> 13 <ul class="card-tag-labels">
13 {% endfor %} 14 {% for tag in tags %}
14 </ul> 15 <li title="{{tag.label}} ({{ tag.nbEntries }})" id="tag-{{ tag.id }}" class="col l2 m2 s2">
16 <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.nbEntries }})</a>
17 </li>
18 {% endfor %}
19 </ul>
20 </div>
21
15 <div> 22 <div>
16 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }}</a> 23 <a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }}</a>
17 </div> 24 </div>