# HG changeset patch # User cavaliet # Date 1415275101 -3600 # Node ID b55b70874cf49cf1c81367812b313e3d776c7b3d # Parent ea5016b24fc9e152e1e6a49b566c802de32d9e74 better demo template diff -r ea5016b24fc9 -r b55b70874cf4 src/spel/static/spel/css/spel.css --- a/src/spel/static/spel/css/spel.css Wed Nov 05 17:54:12 2014 +0100 +++ b/src/spel/static/spel/css/spel.css Thu Nov 06 12:58:21 2014 +0100 @@ -113,4 +113,10 @@ } .play-button{ color: #333; -} \ No newline at end of file +} +/* demonstrateur */ +.link-table{ + max-height: 200px; + overflow: scroll; +} + diff -r ea5016b24fc9 -r b55b70874cf4 src/spel/templates/spel_demonstrateur.html --- a/src/spel/templates/spel_demonstrateur.html Wed Nov 05 17:54:12 2014 +0100 +++ b/src/spel/templates/spel_demonstrateur.html Thu Nov 06 12:58:21 2014 +0100 @@ -6,8 +6,8 @@ {% block spel_content %}
-
- {% if current_ctt_id != '' %} + {% if current_ctt_id != '' %} +

{{ demo_title }}

{{ proj_title }}

{% if proj1_ldt_id %}Extrait précédent{% endif %} @@ -16,20 +16,25 @@

{{ annot_title }}

{{ annot_description }}

{{ annot_tags|safe }}

- - {% else %} -

Démonstrateur : choisissez une scène

-

Scène d'introduction - Duo Brick et Maggy [répliques 7-1 à 9-5]

-

Scène duo Brick et Grand Pa [répliques 51-13 à 56-15]

- {% endif %} -
-
À venir -
+
+
+

Tous les extraits :

+ +
+ {% else %} +

Démonstrateur : choisissez une scène

+

Scène d'introduction - Duo Brick et Maggy [répliques 7-1 à 9-5]

+

Scène duo Brick et Grand Pa [répliques 51-13 à 56-15]

+ {% endif %}
diff -r ea5016b24fc9 -r b55b70874cf4 src/spel/views.py --- a/src/spel/views.py Wed Nov 05 17:54:12 2014 +0100 +++ b/src/spel/views.py Thu Nov 06 12:58:21 2014 +0100 @@ -523,7 +523,6 @@ class Demonstrateur(TemplateView): template_name = "spel_demonstrateur.html" def get(self, request): - # Get start and end for date bounds (earliest is available only on django 1.6) tag = request.GET.get("tag", "demo_theatre") contents = Content.objects.filter(tags__name__in=[tag]).select_related("front_project__ldt_id").order_by("creation_date") # Get current project data @@ -539,7 +538,7 @@ project = get_object_or_404(Project, ldt_id=p) ps = ProjectJsonSerializer(project) project_dict = ps.serialize_to_cinelab() - # In this code, we know that a project only contains one annotation with type "performance" + # In this code, we know that a project contains only one annotation with type "performance" proj_title = project.title[16:]# remove "front project : " demo_title = "" if proj_title[:7]=="[demo1]": @@ -556,7 +555,6 @@ annot_tags = get_tags(tag_list, "group") break # check the position of the current project in the list of all project - project_ids = [ c.front_project.ldt_id for c in contents ] project_index = project_ids.index(p) if project_index > 0: