]> git.0d.be Git - panikweb.git/blob - panikweb_templates/templates/grid.html
Fixing GRID for small sizes
[panikweb.git] / panikweb_templates / templates / grid.html
1 {% extends "base.html" %}
2 {% load paniktags %}
3
4 {% block main %}
5
6 <style>
7     #grille .heure {
8         padding:1.5em 0;
9     }
10     #grille .day {
11         padding:1em 0 1em 0;
12     }
13     #grille td:hover {
14         cursor: pointer;
15         background-color: #D0D0D0;
16     }
17     #grille .item {
18         margin-bottom:1em;
19     }
20 #grille {min-width:400px;}
21 </style>
22
23
24 <div id="grille">
25         <table>
26                 <tbody>
27                 <tr>
28                           <td style="width:3em;"><br/></td>
29                           {% for weekday in weekdays %}
30                             <th class="day" width="13%">{{ weekday }}</th>
31                           {% endfor %}
32                           <td style="width:3em;"><br/></td>
33                 </tr>
34                 {% for time_header, time_cells in times|zip:grid %}
35                 <tr>
36                           <th class="heure vertical">{{ time_header }}</th>
37                           {% for cell in time_cells %}
38                           <td class="" {% 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                                         <div class="item">
46                                                 <strong><a href="{% url 'emission-view' slug=schedule.emission.slug %}">{{ schedule.emission.title }}</a></strong>
47                                                 <br />{% if schedule.weeks_string %}
48                                                   ({{ schedule.weeks_string }})
49                                                 {% endif %}
50                                         </div>
51                                         {% endfor %}
52                                       {% else %}
53                                         <div class="continu cell"><strong>{{ cell }}</strong></div>
54                                         {% if cell.w > 1 and cell.h > 1%}<p>la musique en continu</p>{% endif %}
55                                       {% endif %}
56                           </td>
57                           {% endfor %}
58                           <th class="heure vertical">{{ time_header }}</th>
59                 </tr>
60                 {% endfor %}
61                 </tbody>
62         </table>
63 </div>
64
65
66 {% endblock %}
67
68 {% block news %}
69 {% endblock %}