]> git.0d.be Git - panikweb.git/blob - panikweb_templates/templates/news/archives.html
84511f2a36853a725b928fe44c4ac946cfa06a85
[panikweb.git] / panikweb_templates / templates / news / archives.html
1 {% extends "news.html" %}
2 {% load thumbnails %}
3 {% load paniktags %}
4 {% block title %}News - Archives{% endblock %}
5 {% block nav %}
6         {% news_nav with klass="archives" %}
7 {% endblock %}
8
9 {% block main %}
10
11 <div class="wrapper {% if results %}sided{% endif %}">
12
13         {% if search_query and not results %}
14                         <div class="big error padded center">Sorry, no result with your query!</div>
15         {% endif %}
16
17         {% if search_query and results or results.count <= 24 %}
18                 <ul class="custom columns list news cf">
19                 {% for result in results %}
20                         <li class="item">
21                                 {% with result.object as content %}{% news_inline %}{% endwith %}
22                         </li>
23                 {% endfor %}
24                 </ul>
25         {% else %}
26
27         <div id="Emission-container" class="emission padded">
28                 {% if results %}
29                         {% regroup results by date|date:"F Y"|capfirst as month_list %}
30                         <div>
31                         {% for month in month_list %}
32                                 <div class="monthGroup {% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}">
33                                 <div class="legend button" onclick="$('#{{ month.grouper|slugify }}').toggle();"
34                                                 >{{ month.grouper }}</div>
35                                         <ul class="custom list" id="{{ month.grouper|slugify }}" 
36                                                 {% if forloop.counter >= 3 %}style="display:none;"{% endif %}
37                                                 >
38                                         {% for result in month.list %}
39                                                 <li>{% with result.object as content %}{% news_inline %}{% endwith %}</li>
40                                         {% endfor %}
41                                         </ul>
42                                         </div>
43                                 {% endfor %}
44                                 </div>
45                 {% endif %}
46         </div>
47
48         {% endif %}
49
50 </div>
51
52 {% endblock %}