]> git.parisson.com Git - mezzo.git/commitdiff
Menu 'Vous êtes'
authorEmilie <zawadzki@ircam.fr>
Fri, 23 Sep 2016 10:46:30 +0000 (12:46 +0200)
committerEmilie <zawadzki@ircam.fr>
Fri, 23 Sep 2016 10:46:30 +0000 (12:46 +0200)
app/migrations/pages/0005_auto_20160923_1219.py [new file with mode: 0644]
app/settings.py
app/templates/pages/menus/action.html
app/templates/pages/menus/vous_etes.html [new file with mode: 0644]

diff --git a/app/migrations/pages/0005_auto_20160923_1219.py b/app/migrations/pages/0005_auto_20160923_1219.py
new file mode 100644 (file)
index 0000000..fd0fda9
--- /dev/null
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-09-23 10:19
+from __future__ import unicode_literals
+
+from django.db import migrations
+import mezzanine.pages.fields
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('pages', '0004_auto_20160804_1547'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='page',
+            name='in_menus',
+            field=mezzanine.pages.fields.MenusField(blank=True, choices=[(1, 'Action'), (2, 'Departement'), (3, 'Footer vertical'), (4, 'Footer horizontal'), (5, 'Magazine'), (6, 'Vous êtes')], max_length=100, null=True, verbose_name='Show in menus'),
+        ),
+    ]
index 12f99dd5276b1d78e020e72a020d70bbe04afa74..e4d7ea580bf6ebeff452264f10af8cbf9327596c 100644 (file)
@@ -47,6 +47,7 @@ PAGE_MENU_TEMPLATES = (
     (3, _("Footer vertical"), "pages/menus/footer_vertical.html"),
     (4, _("Footer horizontal"), "pages/menus/footer_horizontal.html"),
     (5, _("Magazine"), "pages/menus/magazine.html"),
+    (6, _("Vous êtes"), "pages/menus/vous_etes.html"),
 
 )
 
index 6f02104d5e4ec334ff215fe7510570cc84137a66..edc571e851562269844e3f52e8259da4a5706aed 100644 (file)
@@ -18,6 +18,7 @@
         {% endif %}
         {% if page.is_primary %}
             {% if forloop.last %}
+            {% page_menu "pages/menus/vous_etes.html" %}
             </ul>
             {% endif %}
         {% endif %}
diff --git a/app/templates/pages/menus/vous_etes.html b/app/templates/pages/menus/vous_etes.html
new file mode 100644 (file)
index 0000000..6551d9b
--- /dev/null
@@ -0,0 +1,11 @@
+{% load pages_tags i18n %}
+{% if page_branch_in_menu %}
+    <select>
+        <option value="">{% trans "You are" %}</option>
+        {% for page in page_branch %}
+            {% if page.in_menu %}
+                <option value="{{ page.get_absolute_url }}">{{ page.title }}</option>
+            {% endif %}
+        {% endfor %}
+    </select>
+{% endif %}