Browse Source

Evolution #375: Pages avec nuage de tags

Bastien Sevajol 12 years ago
parent
commit
9fd7dd8b3b

+ 2 - 3
src/Muzich/CoreBundle/Resources/views/Tag/tagsList.favorite.html.twig View File

16
       </li>
16
       </li>
17
     {% endfor %}
17
     {% endfor %}
18
   </ul>
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
     <a href="#" id="display_all_cloud_tag" >
22
     <a href="#" id="display_all_cloud_tag" >
23
       {{ 'tags.cloud.display_more'|trans({}, 'userui') }}
23
       {{ 'tags.cloud.display_more'|trans({}, 'userui') }}
24
     </a>
24
     </a>
25
   {% endif %}
25
   {% endif %}
26
   
26
   
27
-  <div class="clearboth" ></div>
28
 {% endif %}
27
 {% endif %}

+ 11 - 1
src/Muzich/CoreBundle/Resources/views/Tag/tagsList.show.html.twig View File

1
 {% if tags|length %}
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
   <input type="hidden" id="get_elements_url" value="{{ path('show_elements_get', {
6
   <input type="hidden" id="get_elements_url" value="{{ path('show_elements_get', {
3
     'type'          : object_type,
7
     'type'          : object_type,
4
     'object_id'     : object_id, 
8
     'object_id'     : object_id, 
6
   }) }}" />
10
   }) }}" />
7
   <ul id="favorite_tags">
11
   <ul id="favorite_tags">
8
     {% for tag in tags %}
12
     {% for tag in tags %}
9
-      <li>
13
+      <li {% if loop.index0 > cloud_tags_limit_to_display %}style="display: none;"{% endif %}>
10
         <a id="filtering_tag_{{ tag.id }}" href="#" class="button tag">
14
         <a id="filtering_tag_{{ tag.id }}" href="#" class="button tag">
11
           {{ tag.name }}
15
           {{ tag.name }}
12
         </a>
16
         </a>
14
     {% endfor %}
18
     {% endfor %}
15
   </ul>
19
   </ul>
16
   <div class="clearboth" ></div>
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
 {% endif %}
27
 {% endif %}