Commit d479c141 authored by fred's avatar fred
Browse files

make nonstop labels into links

parent 750cfe7a
......@@ -184,15 +184,15 @@ class Grid(TemplateView):
if nonstop.start < nonstop.end:
nonstops.append([nonstop.start.hour + nonstop.start.minute/60.,
nonstop.end.hour + nonstop.end.minute/60.,
nonstop.title])
nonstop.title, nonstop.slug])
else:
# crossing midnight
nonstops.append([nonstop.start.hour + nonstop.start.minute/60.,
24,
nonstop.title])
nonstop.title, nonstop.slug])
nonstops.append([0,
nonstop.end.hour + nonstop.end.minute/60.,
nonstop.title])
nonstop.title, nonstop.slug])
nonstops.sort()
for i in range(nb_lines):
......@@ -203,6 +203,7 @@ class Grid(TemplateView):
nonstop = [x for x in nonstops if i>=x[0]*2 and i<x[1]*2][0]
for time_cell in grid[-1]:
time_cell.nonstop = nonstop[2]
time_cell.nonstop_slug = nonstop[3]
if nonstop[1] == 5:
# the one ending at 5am will be cut down, so we inscribe
# its duration manually
......
......@@ -25,9 +25,7 @@
{% if categories %}
<nav id="gridNav" class="checkable">
<ul class="by{{ categories.count }}">
{% if class = "grid" %}
<li><button class="check icon-check-empty" data-about="#Main" data-highlight=".nonstop"></li>
{% elif class = "emissions" %}
{% if class = "emissions" %}
<li><button class="check icon-check" data-about="#Main" data-toggle=".nocat">?</button></li>
{% endif %}
{% for category in categories %}
......
......@@ -20,7 +20,7 @@
<tr>
<th class="heure">{{ time_header }}</th>
{% for cell in time_cells %}
<td class="small cell {% if cell.schedules|length > 1 %}many {% endif %}{% if cell.schedules %}scheduled{% else %}nonstop{% endif %}" {% if cell.w > 1 %}colspan="{{cell.w}}"{% endif %}
<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 %}
{% if cell.h > 1 %}rowspan="{{cell.h}}"{% endif %}>
{% if cell.time_label %}
<div class="time-label">{{ cell.time_label }}</div>
......@@ -58,7 +58,7 @@
</div>
{% endfor %}
{% else %}
<div class="continu"><strong>{{ cell }}</strong></div>
<div class="continu"><strong><a href="{% url 'emission-view' slug=cell.nonstop_slug %}">{{ cell }}</a></strong></div>
{% if cell.w > 1 and cell.h > 1%}<p>la musique en continu</p>{% endif %}
{% endif %}
</td>
......
......@@ -49,7 +49,7 @@
{% else %}
<em class="block nonstop ellipsis">
<strong class="" style="visibility:hidden;">{{ cell.datetime|date:"H:i" }}</strong>
<span>{{ cell.label }}</span>
<span><a href="{% url 'emission-view' slug=cell.slug %}">{{ cell.label }}</a></span>
</em>
{% endif %}
</li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment