]> git.0d.be Git - panikweb.git/commitdiff
make nonstop labels into links
authorFrédéric Péters <fpeters@0d.be>
Sat, 7 Sep 2013 22:51:29 +0000 (00:51 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sat, 7 Sep 2013 22:51:51 +0000 (00:51 +0200)
panikweb/views.py
panikweb_templates/templates/emissions/nav.html
panikweb_templates/templates/grid.html
panikweb_templates/templates/includes/week.html

index 103651d385f67513a99b9ae0521ee950d4e188a8..bdfcc414e93966c68ef45809ad6a0432944c0d3d 100644 (file)
@@ -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
index 9345eb3d7742b273e02cceec6238bd1fdbbf81f1..05c331cbc0a6a6d7d57d7bb6694cee36d3a2970d 100644 (file)
@@ -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 %}
index 289d5e61705b6a4f9edf8b124beb712d3392bc01..ecf335cd7a4d8727f9dfc72c8b9b9ee7cce32e89 100644 (file)
@@ -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>
index b8532c110f9dd454cb5fa5648504a6a4a76a48b5..0c9c615c5b3cfcbe99650509b82e39682441514c 100644 (file)
@@ -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>