grid.html 1.66 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
<style>
    #grille .heure {
Simon Daron's avatar
Simon Daron committed
8
        padding:1.5em 0;
9
    }
Simon Daron's avatar
Simon Daron committed
10
11
    #grille .day {
        padding:1em 0 1em 0;
12
13
14
15
16
    }
    #grille td:hover {
        cursor: pointer;
        background-color: #D0D0D0;
    }
Simon Daron's avatar
Simon Daron committed
17
18
19
20
    #grille .item {
	margin-bottom:1em;
    }
#grille {min-width:400px;}
21
22
23
24
</style>


<div id="grille">
Simon Daron's avatar
Simon Daron committed
25
26
27
28
29
30
31
32
33
34
35
36
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
	<table>
		<tbody>
		<tr>
			  <td style="width:3em;"><br/></td>
			  {% for weekday in weekdays %}
			    <th class="day" width="13%">{{ weekday }}</th>
			  {% endfor %}
			  <td style="width:3em;"><br/></td>
		</tr>
		{% for time_header, time_cells in times|zip:grid %}
		<tr>
			  <th class="heure vertical">{{ time_header }}</th>
			  {% for cell in time_cells %}
			  <td class="" {% if cell.w > 1 %}colspan="{{cell.w}}"{% endif %}
				      {% if cell.h > 1 %}rowspan="{{cell.h}}"{% endif %}>
					{% if cell.time_label %}
						<div class="cell-time-label">{{ cell.time_label }}</div>
					{% endif %}
				      {% if cell.schedules %}
					{% for schedule in cell.schedules %}
					<div class="item">
						<strong><a href="{% url 'emission-view' slug=schedule.emission.slug %}">{{ schedule.emission.title }}</a></strong>
						<br />{% if schedule.weeks_string %}
						  ({{ schedule.weeks_string }})
						{% endif %}
					</div>
					{% endfor %}
				      {% else %}
					<div class="continu cell"><strong>{{ cell }}</strong></div>
					{% if cell.w > 1 and cell.h > 1%}<p>la musique en continu</p>{% endif %}
				      {% endif %}
			  </td>
			  {% endfor %}
			  <th class="heure vertical">{{ time_header }}</th>
		</tr>
		{% endfor %}
		</tbody>
	</table>
63
</div>
fred's avatar
fred committed
64
65
66


{% endblock %}
fred's avatar
fred committed
67
68
69

{% block news %}
{% endblock %}