]> git.0d.be Git - panikweb.git/blob - panikweb_templates/templates/grid.html
New template structure
[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 main %}
7 <div id="grille">
8         <table>
9                 <tbody>
10                 <tr>
11                           <td style="width:3em;"><br/></td>
12                           {% for weekday in weekdays %}
13                             <th class="day" width="13%">{{ weekday }}</th>
14                           {% endfor %}
15                           <td style="width:3em;"><br/></td>
16                 </tr>
17                 {% for time_header, time_cells in times|zip:grid %}
18                 <tr>
19                           <th class="heure vertical">{{ time_header }}</th>
20                           {% for cell in time_cells %}
21                           <td class="" {% if cell.w > 1 %}colspan="{{cell.w}}"{% endif %}
22                                       {% if cell.h > 1 %}rowspan="{{cell.h}}"{% endif %}>
23                                         {% if cell.time_label %}
24                                                 <div class="cell-time-label">{{ cell.time_label }}</div>
25                                         {% endif %}
26                                       {% if cell.schedules %}
27                                         {% for schedule in cell.schedules %}
28                                         <div class="item">
29                                                 <strong><a href="{% url 'emission-view' slug=schedule.emission.slug %}">{{ schedule.emission.title }}</a></strong>
30                                                 <br />{% if schedule.weeks_string %}
31                                                   ({{ schedule.weeks_string }})
32                                                 {% endif %}
33                                         </div>
34                                         {% endfor %}
35                                       {% else %}
36                                         <div class="continu cell"><strong>{{ cell }}</strong></div>
37                                         {% if cell.w > 1 and cell.h > 1%}<p>la musique en continu</p>{% endif %}
38                                       {% endif %}
39                           </td>
40                           {% endfor %}
41                           <th class="heure vertical">{{ time_header }}</th>
42                 </tr>
43                 {% endfor %}
44                 </tbody>
45         </table>
46 </div>
47 {% endblock %}
48
49 {% block news %}
50 {% endblock %}