From: Guillaume Pellerin Date: Wed, 24 Aug 2016 10:14:15 +0000 (+0200) Subject: Fix custompage template X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=13d88f2cd6629631260f7484180a6dbd242f007c;p=mezzo.git Fix custompage template --- diff --git a/app/settings.py b/app/settings.py index 4b7fe385..15ccf8ac 100644 --- a/app/settings.py +++ b/app/settings.py @@ -176,7 +176,6 @@ STATIC_ROOT = '/srv/static/' STATICFILES_DIRS = [ '/srv/app/static', - ] # URL that handles the media served from MEDIA_ROOT. Make sure to use a diff --git a/app/templates/pages/basicpage.html b/app/templates/pages/basicpage.html deleted file mode 100644 index 2710b00b..00000000 --- a/app/templates/pages/basicpage.html +++ /dev/null @@ -1,82 +0,0 @@ -{% extends "pages/page.html" %} -{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} - -{% block meta_title %}{{ page.meta_title }}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for page as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block meta_description %}{% metablock %} -{{ page.description }} -{% endmetablock %}{% endblock %} - -{% block page_class %} - custompage -{% endblock %} - -{% block page_title %} - - {% editable page.custompage.title %} -

{{ page.custompage.title }}

- {% endeditable %} - -{% endblock %} - -{% block page_content %} - - {% if page.custompage.sub_title %} - {% editable page.custompage.sub_title %} -
- {{ page.custompage.sub_title }} -
- {% endeditable %} - {% endif %} - - {% editable page.custompage.content %} - {{ page.custompage.content|richtext_filters|safe }} - {% endeditable %} - - {% if page.get_ascendants|length == 1 %} - {% children_pages page.id as childrens %} - {% if childrens %} -
- {% for children in childrens %} - {% with children as object %} - {% include "pages/includes/page_card.html" %} - {% endwith %} - {% endfor %} -
- {% endif %} - {% endif %} - -{% endblock %} - -{% block page_sub_content %} - {% if page.custompage.pageblock_set.all %} -
-
-
-
-
- {% for pageblock in page.custompage.pageblock_set.all %} -
-
- {% if not forloop.first and pageblock.with_separator %} -
- {% endif %} -

{{ pageblock.title }}

- {{ pageblock.content|richtext_filters|safe }} -
-
- {% endfor %} -
-
-
-
- {% endif %} -{% endblock %} diff --git a/app/templates/pages/custompage.html b/app/templates/pages/custompage.html new file mode 100644 index 00000000..2710b00b --- /dev/null +++ b/app/templates/pages/custompage.html @@ -0,0 +1,82 @@ +{% extends "pages/page.html" %} +{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} + +{% block meta_title %}{{ page.meta_title }}{% endblock %} + +{% block meta_keywords %}{% metablock %} +{% keywords_for page as keywords %} +{% for keyword in keywords %} + {% if not forloop.first %}, {% endif %} + {{ keyword }} +{% endfor %} +{% endmetablock %}{% endblock %} + +{% block meta_description %}{% metablock %} +{{ page.description }} +{% endmetablock %}{% endblock %} + +{% block page_class %} + custompage +{% endblock %} + +{% block page_title %} + + {% editable page.custompage.title %} +

{{ page.custompage.title }}

+ {% endeditable %} + +{% endblock %} + +{% block page_content %} + + {% if page.custompage.sub_title %} + {% editable page.custompage.sub_title %} +
+ {{ page.custompage.sub_title }} +
+ {% endeditable %} + {% endif %} + + {% editable page.custompage.content %} + {{ page.custompage.content|richtext_filters|safe }} + {% endeditable %} + + {% if page.get_ascendants|length == 1 %} + {% children_pages page.id as childrens %} + {% if childrens %} +
+ {% for children in childrens %} + {% with children as object %} + {% include "pages/includes/page_card.html" %} + {% endwith %} + {% endfor %} +
+ {% endif %} + {% endif %} + +{% endblock %} + +{% block page_sub_content %} + {% if page.custompage.pageblock_set.all %} +
+
+
+
+
+ {% for pageblock in page.custompage.pageblock_set.all %} +
+
+ {% if not forloop.first and pageblock.with_separator %} +
+ {% endif %} +

{{ pageblock.title }}

+ {{ pageblock.content|richtext_filters|safe }} +
+
+ {% endfor %} +
+
+
+
+ {% endif %} +{% endblock %}