]> git.parisson.com Git - mezzo.git/commitdiff
add calendar link to base.html, add festival_tags
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 18 Mar 2016 14:39:18 +0000 (15:39 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 18 Mar 2016 14:39:18 +0000 (15:39 +0100)
app/festival/templatetags/festival_tags.py [new file with mode: 0644]
app/templates/agenda/event_list.html
app/templates/base.html
app/templates/index.html

diff --git a/app/festival/templatetags/festival_tags.py b/app/festival/templatetags/festival_tags.py
new file mode 100644 (file)
index 0000000..4060361
--- /dev/null
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+from mezzanine.pages.models import Page
+from django import template
+
+register = template.Library()
+
+@register.simple_tag
+def edito():
+    qs = Page.objects.filter(title="Edito")
+    if qs:
+        return qs[0].content
+    else:
+        return ''
index 2c374685aa0a437247be761261db94422d2b8fb8..c7fa94fd2429bf12fc6c51bdb4fa1b32540dd424 100644 (file)
 {% endif %}
 
 {% block event_calendar %}
-<p>
-    <a href='{% icalendar_url %}' target="_blank" class="">
-        Subscribe to all events in Google Calendar/Outlook/iCal
-    </a>
-</p>
+<p><a href='{% icalendar_url %}' target="_blank" class="">
+    {% trans "Subscribe to all events in" %} Google Calendar/Outlook/iCal
+</a></p>
 {% endblock %}
 
 {% for event in events.object_list %}
index 7e26aac67597efb630c143a16359d33eaa0cb10d..527f1d330c1aba545fa201778c28126bef8f190d 100644 (file)
@@ -1,6 +1,6 @@
 <!doctype html>
 <html lang="{{ LANGUAGE_CODE }}"{% if LANGUAGE_BIDI %} dir="rtl"{% endif %}>
-{% load pages_tags mezzanine_tags i18n staticfiles keyword_tags %}
+{% load pages_tags mezzanine_tags i18n staticfiles keyword_tags event_tags %}
 <head>
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
             <div class="site__content__header">
                 <h2 class="page__title">{% block title %}{% endblock %}</h2>
             </div>
+            {% block event_calendar %}
+            <p><a href='{% icalendar_url %}' target="_blank" class="">
+                {% trans "Subscribe to all events in" %} Google Calendar/Outlook/iCal
+            </a></p>
+            {% endblock %}
             <main class="main" role="main">
                 {% block main %}{% endblock %}
             </main>
index 6ffe7f363bd6bbe0324cf70d803052fd9b51c21d..0837c48a640813d43602d24bc378647e87735582 100644 (file)
@@ -10,7 +10,7 @@
 
 {% block main %}
 <h2>{% trans "Edito" %}</h2>
-{# {% edito %}#}
+{% edito %}
 
 <hr>
 {% include "includes/html_styleguide.html" %}