]> git.0d.be Git - panikweb.git/blob - panikweb_templates/templates/grid.html
Styling grid
[panikweb.git] / panikweb_templates / templates / grid.html
1 {% extends "base.html" %}
2 {% load paniktags %}
3
4 {% block bodyID %}Grid{% endblock %}
5 {% block listen %}{% endblock %}
6 {% block title %}La grille{% endblock %}
7 {% block nav %}
8         <nav id="gridNav" class="">
9                 <ul class="distributed by{{ categories.count }}">
10                         <li><button onclick="
11                                         $('#grid *').removeClass('highlighted');
12                                         $('#grid .nonstop').addClass('highlighted');
13                                 ">Non-stop</button></li>
14                 {% for category in categories %}
15                         <li><button onclick="
16                                         $('#grid *').removeClass('highlighted');
17                                         $('#grid .{{ category|slugify }}').addClass('highlighted');
18                                 ">{{ category }}</button></li>
19                 {% endfor %}
20                 </ul>
21         </nav>
22 {% endblock %}
23 {% block main %}
24 <div id="grid" class="">
25         <table>
26                 <tbody>
27                 <tr>
28                           <td style=""><br/></td>
29                           {% for weekday in weekdays %}
30                             <th class="day" width="13%">{{ weekday }}</th>
31                           {% endfor %}
32                           <td style=""><br/></td>
33                 </tr>
34                 {% for time_header, time_cells in times|zip:grid %}
35                 <tr>
36                           <th class="heure">{{ time_header }}</th>
37                           {% for cell in time_cells %}
38                           <td class="small cell {% if cell.schedules|length > 1 %}many {% endif %}{% if cell.schedules %}scheduled{% else %}nonstop{% endif %}" {% if cell.w > 1 %}colspan="{{cell.w}}"{% endif %}
39                                       {% if cell.h > 1 %}rowspan="{{cell.h}}"{% endif %}>
40                                         {% if cell.time_label %}
41                                                 <div class="cell-time-label">{{ cell.time_label }}</div>
42                                         {% endif %}
43                                       {% if cell.schedules %}
44                                         {% for schedule in cell.schedules %}
45                                         {% if forloop.first == False and cell.schedules|length > 1 %}<hr />{% endif %}
46                                         <div class="item {% for category in schedule.emission.categories.all %}{{ category|slugify }}{% endfor %}">
47                                         
48                                                 <strong>
49                                                         <a href="{% url 'emission-view' slug=schedule.emission.slug %}">{{ schedule.emission.title }}</a>
50                                                 </strong>
51                                                 <br />{% if schedule.weeks_string %}
52                                                   ({{ schedule.weeks_string }})
53                                                 {% endif %}
54                                         </div>
55                                         {% endfor %}
56                                       {% else %}
57                                         <div class="continu"><strong>{{ cell }}</strong></div>
58                                         {% if cell.w > 1 and cell.h > 1%}<p>la musique en continu</p>{% endif %}
59                                       {% endif %}
60                           </td>
61                           {% endfor %}
62                           <th class="heure">{{ time_header }}</th>
63                 </tr>
64                 {% endfor %}
65                 </tbody>
66         </table>
67 </div>
68 {% endblock %}
69
70 {% block news %}
71 {% endblock %}