Przeglądaj źródła

Evolution #375: Pages avec nuage de tags

Bastien Sevajol 12 lat temu
rodzic
commit
9fd7dd8b3b

+ 2 - 3
src/Muzich/CoreBundle/Resources/views/Tag/tagsList.favorite.html.twig Wyświetl plik

@@ -16,13 +16,12 @@
16 16
       </li>
17 17
     {% endfor %}
18 18
   </ul>
19
+  <div class="clearboth" ></div>
19 20
   
20
-  {% if tags|length > cloud_tags_limit_to_display %}
21
-  <div style="clear: both;"></div>
21
+  {% if tags|length > cloud_tags_limit_to_display+1 %}
22 22
     <a href="#" id="display_all_cloud_tag" >
23 23
       {{ 'tags.cloud.display_more'|trans({}, 'userui') }}
24 24
     </a>
25 25
   {% endif %}
26 26
   
27
-  <div class="clearboth" ></div>
28 27
 {% endif %}

+ 11 - 1
src/Muzich/CoreBundle/Resources/views/Tag/tagsList.show.html.twig Wyświetl plik

@@ -1,4 +1,8 @@
1 1
 {% if tags|length %}
2
+
3
+  <label for="cloud_tags_filter" >{{ 'tags.cloud.filter.text'|trans({}, 'userui') }}</label>
4
+  <input type="text" id="cloud_tags_filter" />
5
+
2 6
   <input type="hidden" id="get_elements_url" value="{{ path('show_elements_get', {
3 7
     'type'          : object_type,
4 8
     'object_id'     : object_id, 
@@ -6,7 +10,7 @@
6 10
   }) }}" />
7 11
   <ul id="favorite_tags">
8 12
     {% for tag in tags %}
9
-      <li>
13
+      <li {% if loop.index0 > cloud_tags_limit_to_display %}style="display: none;"{% endif %}>
10 14
         <a id="filtering_tag_{{ tag.id }}" href="#" class="button tag">
11 15
           {{ tag.name }}
12 16
         </a>
@@ -14,4 +18,10 @@
14 18
     {% endfor %}
15 19
   </ul>
16 20
   <div class="clearboth" ></div>
21
+  
22
+  {% if tags|length > cloud_tags_limit_to_display+1 %}
23
+    <a href="#" id="display_all_cloud_tag" >
24
+      {{ 'tags.cloud.display_more'|trans({}, 'userui') }}
25
+    </a>
26
+  {% endif %}
17 27
 {% endif %}