]> git.parisson.com Git - mezzo.git/commitdiff
add children events, add related event links, add l10n setting
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 9 Mar 2016 22:35:48 +0000 (23:35 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 9 Mar 2016 22:35:48 +0000 (23:35 +0100)
app/sandbox/settings.py
app/templates/agenda/event_detail.html
app/templates/agenda/event_list.html
app/templates/agenda/includes/event_metainfo.html [new file with mode: 0644]
lib/mezzanine-agenda [deleted submodule]

index 8055a67e797bdcc2310accf137e9e292498c94a5..71f2f0bc0b09bb75583e69b41b18cd2628d0f41c 100644 (file)
@@ -94,7 +94,7 @@ USE_TZ = True
 
 # Language code for this installation. All choices can be found here:
 # http://www.i18nguy.com/unicode/language-identifiers.html
-LANGUAGE_CODE = "en"
+LANGUAGE_CODE = "fr"
 
 # Supported languages
 LANGUAGES = (
@@ -115,6 +115,7 @@ SITE_ID = 1
 # If you set this to False, Django will make some optimizations so as not
 # to load the internationalization machinery.
 USE_I18N = True
+USE_L10N = True
 
 AUTHENTICATION_BACKENDS = ("mezzanine.core.auth_backends.MezzanineBackend",)
 
index 0722dc77a72457bdc76fdba18f3dc8cab10b395b..0633b209a31776ca456ac13de4ee8ecffcc8f85d 100644 (file)
 </ul>
 {% endblock %}
 
+{% block event_related %}
+<h2>{% trans "Artists" %}</h2>
+{% for artist in event.artists.all %}
+<a href="{% url 'festival-artist-detail' artist.slug %}">{{ artist.name }}</a>
+{% endfor %}
+<h2>{% trans "Videos" %}</h2>
+{% for video in event.videos.all %}
+<a href="{% url 'festival-video-detail' video.slug %}">{{ video.title }}</a>
+{% endfor %}
+{% endblock %}
+
 {% block event_detail_comments %}
 {% if event.allow_comments %}{% comments_for event %}{% endif %}
 {% endblock %}
index ecd5d7d729dbd9b8fd214a6263afdfb985fa50c2..2c374685aa0a437247be761261db94422d2b8fb8 100644 (file)
     {% endblock %}
 
     {% block event_list_event_metainfo %}
-        {% editable event.start event.end event.location %}
-            <p class="event__meta">
-                {{ event.start }}
-                {% if event.end %}
-                {% trans "-" %} {{ event.end }}
-                {% endif %}
-                {% if event.location %}
-                {% trans "at" %}
-                <a href="{% url "event_list_location" event.location.slug %}">{{ event.location }}</a>
-                {% endif %}
-            </p>
-        {% endeditable %}
+         {% include "agenda/includes/event_metainfo.html" %}
+        {% for child in event.children.all %}
+         {% with child as event %}
+          {% include "agenda/includes/event_metainfo.html" %}
+         {% endwith %}
+        {% endfor %}
     {% endblock %}
 
 {% block event_list_event_links %}
     </ul>
     {% endif %}
     <p>
-    <a href="{{ event.get_absolute_url }}">{% trans "read more" %}</a>
     {% if event.allow_comments %}
     /
     {% if settings.COMMENTS_DISQUS_SHORTNAME %}
diff --git a/app/templates/agenda/includes/event_metainfo.html b/app/templates/agenda/includes/event_metainfo.html
new file mode 100644 (file)
index 0000000..f9b9f09
--- /dev/null
@@ -0,0 +1,14 @@
+{% load i18n mezzanine_tags event_tags %}
+{% editable event.start event.end event.location %}
+<p class="event__meta">
+    {{ event.start }}
+    {% if event.end %}
+    {% trans "-" %} {{ event.end }}
+    {% endif %}
+    {% if event.location %}
+    {% trans "at" %}
+    <a href="{% url "event_list_location" event.location.slug %}">{{ event.location }}</a>
+    {% endif %}
+    <a href="{{ event.get_absolute_url }}">{% trans "read more" %}</a>
+</p>
+{% endeditable %}
diff --git a/lib/mezzanine-agenda b/lib/mezzanine-agenda
deleted file mode 160000 (submodule)
index e445d26..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit e445d26eb34d9c3c390391406c6ccb9f6d1380c1