grid.html 2.37 KB
Newer Older
fred's avatar
fred committed
1
{% extends "base.html" %}
fred's avatar
fred committed
2
{% load paniktags %}
fred's avatar
fred committed
3

4
{% block main %}
fred's avatar
fred committed
5

6
7
8
9
10
11
12
13
14
15
16
17
18
<style>
    #grille table, #grille tr, #grille td {
        text-align: center;
        vertical-align: middle;
    }
    #grille .symbol {
        font-size:40px;
        width:100%;
    }
    #grille table {
        border-top: 5px solid #D0D0D0;
        border-left: 5px solid #D0D0D0;
    }
Simon Daron's avatar
Simon Daron committed
19
    #grille td,#grille th {
20
21
22
23
24
25
26
27
28
29
30
31
        border-bottom: 5px solid #D0D0D0;
        border-right: 5px solid #D0D0D0;
    }
    #grille .heure {
        -webkit-transform: rotate(-90deg);
        -moz-transform: rotate(-90deg);
        -ms-transform: rotate(-90deg);
        -o-transform: rotate(-90deg);
        filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
        padding:20px 10px;
        font-size:15px;
    }
fred's avatar
fred committed
32

33
34
35
36
    #grille h3 {
       width: 100%;
    }

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    #grille .jour {
        margin-top:20px;
        margin-bottom:30px;
        width: 100%;
    }
     #grille .continu, #grille .communautaire, #grille .mix, #grille .info {
        font-family:Reglo;
        text-transform:uppercase;
        font-size:15px;
        margin-bottom:10px;
        line-height: 100%;
    }

    #grille td:hover {
        cursor: pointer;
        background-color: #D0D0D0;
    }
</style>


<div id="grille">
<table>
<tbody>
<tr>
  <td><br/></td>
  {% for weekday in weekdays %}
Simon Daron's avatar
Simon Daron committed
63
    <th width="13%">{{ weekday }}</th>
64
65
66
  {% endfor %}
  <td><br/></td>
</tr>
fred's avatar
fred committed
67
{% for time_header, time_cells in times|zip:grid %}
fred's avatar
fred committed
68
<tr>
Simon Daron's avatar
Simon Daron committed
69
  <th class="heure">{{ time_header }}</th>
fred's avatar
fred committed
70
71
  {% for cell in time_cells %}
  <td {% if cell.w > 1 %}colspan="{{cell.w}}"{% endif %}
72
      {% if cell.h > 1 %}rowspan="{{cell.h}}"{% endif %}>
Simon Daron's avatar
Simon Daron committed
73
      {% if cell.time_label %}<div class="cell-time-label">{{ cell.time_label }}</div>{% endif %}
74
75
      {% if cell.schedules %}
        {% for schedule in cell.schedules %}
Simon Daron's avatar
Simon Daron committed
76
        <div class="emission-title"><a href="{% url 'emission-view' slug=schedule.emission.slug %}">{{ schedule.emission.title }}</a></div>
77
78
79
80
81
        {% if schedule.weeks_string %}
          ({{ schedule.weeks_string }})
        {% endif %}
        {% endfor %}
      {% else %}
Simon Daron's avatar
Simon Daron committed
82
        <div class="continu cell">{{ cell }}</div>
83
84
85
        {% if cell.w > 1 and cell.h > 1%}<p>la musique en continu</p>{% endif %}
      {% endif %}
  </td>
fred's avatar
fred committed
86
  {% endfor %}
Simon Daron's avatar
Simon Daron committed
87
  <th class="heure">{{ time_header }}</th>
fred's avatar
fred committed
88
89
</tr>
{% endfor %}
90
</tbody>
fred's avatar
fred committed
91
</table>
92
</div>
fred's avatar
fred committed
93
94
95


{% endblock %}
fred's avatar
fred committed
96
97
98

{% block news %}
{% endblock %}