]> git.parisson.com Git - mezzo.git/commitdiff
add week filters
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 4 May 2016 14:26:59 +0000 (16:26 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 4 May 2016 14:26:59 +0000 (16:26 +0200)
app/templates/agenda/event_list.html

index 1cbbbbf7ae80c5f3121c88d97b71fb2c4538bb5a..233cafcb490b9392a22b18d475b220e11285225c 100644 (file)
     {% endblock %}
     {% else %}
 
+    <ul class="list-inline tag-cloud">
+        {% all_weeks as weeks %}
+        {% for w in weeks %}
+        <li>
+            <a href="{% url "event_list_week" year w %}" {% if week|add:0 == w %}class="is-active"{% endif %}>{% for d in w|week_range:year %}{{ d|date:"d M" }}{% if forloop.first %} - {% endif %}{% endfor %}</a>
+        </li>
+        {% if not forloop.last %} | {% endif %}
+        {% endfor %}
+    </ul>
+
+    <hr/>
+
     {% block event_keywords %}
     {% keywords_for mezzanine_agenda.event as tags %}
     {% all_events as all_events %}
     {% if tags %}
-
     <ul class="list-inline tag-cloud">
         <li>
-            <a href="/events/" {% if not tag %}class="is-active"{% endif %}>{% trans "All" %}</a> ({{ all_events.count }})
+            <a href="/events/" {% if not tag %}class="is-active"{% endif %}>{% trans "All" %} ({{ all_events.count }})</a>
         </li>
         {% for t in tags %}
+        {% if forloop.first %} | {% endif %}
         <li>
             <a href="{% url "event_list_tag" t.slug %}" {% if tag == t %}class="is-active"{% endif %}
-                class="tag-weight-{{ tag.weight }}">{{ t }}s</a>
-            ({{ t.item_count }})
+                class="tag-weight-{{ tag.weight }}">{{ t }}s ({{ t.item_count }})</a>
         </li>
+        {% if not forloop.last %} | {% endif %}
         {% endfor %}
     </ul>
     <br/>