]> git.0d.be Git - panikweb.git/blobdiff - panikweb_templates/templates/grid.html
misc: run manage.py with python3
[panikweb.git] / panikweb_templates / templates / grid.html
index 4056f3cfe99f22ec9d548f74c38ca144d43fa864..0ea270be43a5d5c979bea23322077b0dadf66d40 100644 (file)
@@ -1,54 +1,72 @@
-{% extends "base.html" %}
-{% load paniktags %}
-
+{% extends "emissions.html" %}
+{% load paniktags i18n %}
 {% block bodyID %}Grid{% endblock %}
-{% block listen %}{% endblock %}
+{% block title %}{% trans 'Grid' %}{% endblock %}
+{% block toptitle %}
+<h1 class="top bg-title"><a href="{% url 'grid' %}">{% trans 'Program' %}</a></h1>
+{% endblock %}
+{% block nav %}
+       {% emission_nav with klass="grid" %}
+{% endblock %}
 {% block main %}
-<div id="grille">
-       <nav>
-               <ul>
-                       <li><button>Créations</button></li>
-                       <li><button>Agendas</button></li>
-                       <li><button>Info</button></li>
-                       <li><button>Mixs</button></li>
-                       <li><button>Communautaires</button></li>
-                       <li><button>Continu</button></li>
-               </ul>
-       </nav>
+
+<div id="grid" class="wrapper">
        <table>
                <tbody>
                <tr>
-                         <td style="width:3em;"><br/></td>
+                         <td style=""><br/></td>
                          {% for weekday in weekdays %}
                            <th class="day" width="13%">{{ weekday }}</th>
                          {% endfor %}
-                         <td style="width:3em;"><br/></td>
+                         <td style=""><br/></td>
                </tr>
                {% for time_header, time_cells in times|zip:grid %}
                <tr>
-                         <th class="heure vertical">{{ time_header }}</th>
+                         <th class="heure">{{ time_header }}</th>
                          {% for cell in time_cells %}
-                         <td class="" {% 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="cell-time-label">{{ cell.time_label }}</div>
+                                               <div class="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 }})
+                                       {% for schedule in cell.sorted_schedules %}
+                                       {% if forloop.first == False and cell.schedules|length > 1 %}<hr />{% endif %}
+                                       <div class="item {% for category in schedule.emission.categories.all %} {{ category|slugify }}{% endfor %}">
+                                       
+                                               <strong>
+                                                       <a href="{% url 'emission-view' slug=schedule.emission.slug %}">
+                                                               <span>{{ schedule.emission.title }}</span>                                                                                              
+                                                       </a>
+                                               </strong>
+                                               <br />
+                                               {% if schedule.weeks_string or schedule.time_label %}
+                                               {% spaceless %}
+                                               <span>(</span>
+                                                 {% if schedule.time_label %}
+                                                 <span>{{ schedule.time_label }}</span>
+                                                   {% if schedule.weeks_string %}<span>, </span>{% endif %}
+                                                 {% endif %}
+                                                 {% if schedule.weeks_string %}
+                                                 <span>{{ schedule.weeks_string }}</span>
+                                                 {% endif %}
+                                                 {% if schedule.time_label_extra %}
+                                                 <span>{{ schedule.time_label_extra }}</span>
+                                                 {% endif %}
+                                               <span>)</span>
+                                               {% endspaceless %}
                                                {% endif %}
+                                               
                                        </div>
                                        {% endfor %}
                                      {% else %}
-                                       <div class="continu cell"><strong>{{ cell }}</strong></div>
+                                      <div class="continu"><strong><a
+                                          href="{% if cell.redirect_path %}{{ cell.redirect_path }}{% else %}{% url 'emission-view' slug=cell.nonstop_slug %}{% endif %}">{{ cell }}</a></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>
+                         <th class="heure">{{ time_header }}</th>
                </tr>
                {% endfor %}
                </tbody>
@@ -58,3 +76,4 @@
 
 {% block news %}
 {% endblock %}
+