]> git.0d.be Git - panikweb-esperanzah.git/blob - espeweb/templates/grid.html
mutate into an addon module for panikweb
[panikweb-esperanzah.git] / espeweb / templates / grid.html
1 {% extends "emissions.html" %}
2 {% load paniktags i18n %}
3 {% block bodyID %}Grid{% endblock %}
4 {% block title %}{% trans 'Grid' %}{% endblock %}
5 {% block toptitle %}
6 <h1 class="top bg-title"><a href="{% url 'grid' %}">Grille</a></h1>
7 {% endblock %}
8 {% block nav %}
9 {% endblock %}
10 {% block main %}
11
12 <div id="grid">
13         <table>
14                 <tbody>
15                 <tr>
16                           <td style=""><br/></td>
17                           {% for weekday in weekdays %}
18                             <th class="day" width="13%">{{ weekday }}</th>
19                           {% endfor %}
20                           <td style=""><br/></td>
21                 </tr>
22                 {% for time_header, time_cells in times|zip:grid %}
23                 <tr>
24                           <th class="heure">{{ time_header }}</th>
25                           {% for cell in time_cells %}
26                           <td class="small cell {% if cell.schedules|length > 1 %}many {% endif %}{% if cell.schedules %}scheduled{% else %}nonstop musique-en-continu{% endif %}" {% if cell.w > 1 %}colspan="{{cell.w}}"{% endif %}
27                                       {% if cell.h > 1 %}rowspan="{{cell.h}}"{% endif %}>
28                                         {% if cell.time_label %}
29                                                 <div class="time-label">{{ cell.time_label }}</div>
30                                         {% endif %}
31                                       {% if cell.schedules %}
32                                         {% for schedule in cell.sorted_schedules %}
33                                         {% if forloop.first == False and cell.schedules|length > 1 %}<hr />{% endif %}
34                                         <div class="item {% for category in schedule.emission.categories.all %} {{ category|slugify }}{% endfor %}">
35                                         
36                                                 <strong>
37                                                         <a href="{% url 'emission-view' slug=schedule.emission.slug %}">
38                                                                 <span>{{ schedule.emission.title }}</span>                                                                                              
39                                                         </a>
40                                                 </strong>
41                                                 <br />
42                                                 {% if schedule.weeks_string or schedule.time_label %}
43                                                 {% spaceless %}
44                                                 <span>(</span>
45                                                   {% if schedule.time_label %}
46                                                   <span>{{ schedule.time_label }}</span>
47                                                     {% if schedule.weeks_string %}<span>, </span>{% endif %}
48                                                   {% endif %}
49                                                   {% if schedule.weeks_string %}
50                                                   <span>{{ schedule.weeks_string }}</span>
51                                                   {% endif %}
52                                                   {% if schedule.time_label_extra %}
53                                                   <span>{{ schedule.time_label_extra }}</span>
54                                                   {% endif %}
55                                                 <span>)</span>
56                                                 {% endspaceless %}
57                                                 {% endif %}
58                                                 
59                                         </div>
60                                         {% endfor %}
61                                       {% else %}
62                                       <div class="continu"><strong><a
63                                            href="{% if cell.redirect_path %}{{ cell.redirect_path }}{% else %}{% url 'emission-view' slug=cell.nonstop_slug %}{% endif %}">{{ cell }}</a></strong></div>
64                                         {% if cell.w > 1 and cell.h > 1%}<!--<p>la musique en continu</p>-->{% endif %}
65                                       {% endif %}
66                           </td>
67                           {% endfor %}
68                           <th class="heure">{{ time_header }}</th>
69                 </tr>
70                 {% endfor %}
71                 </tbody>
72         </table>
73 </div>
74 {% endblock %}
75
76 {% block news %}
77 {% endblock %}
78