From 9ec060e3bb4d779634fa5006df4f8fe674a6e058 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Wed, 27 Jul 2016 16:20:51 +0200 Subject: [PATCH] Move the descendant pages in the page_content block --- app/templates/pages/basicpage.html | 28 +++++++++++----------------- app/templates/pages/department.html | 11 +++++++++++ app/templates/pages/team.html | 11 +++++++++++ 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/app/templates/pages/basicpage.html b/app/templates/pages/basicpage.html index 19735373..82150088 100644 --- a/app/templates/pages/basicpage.html +++ b/app/templates/pages/basicpage.html @@ -41,6 +41,17 @@ {{ page.basicpage.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 %} + {% comment %} Add the slider here {% endcomment %} @@ -50,23 +61,6 @@ {% block main %} {{ block.super }} - {% 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 %} - {% if page.basicpage.pageblock_set.all %}
diff --git a/app/templates/pages/department.html b/app/templates/pages/department.html index 96e310e8..570ca61d 100644 --- a/app/templates/pages/department.html +++ b/app/templates/pages/department.html @@ -45,6 +45,17 @@ {{ page.department.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 %} + {% comment %} Add the slider here {% endcomment %} diff --git a/app/templates/pages/team.html b/app/templates/pages/team.html index f0f331ee..d7bf846d 100644 --- a/app/templates/pages/team.html +++ b/app/templates/pages/team.html @@ -41,6 +41,17 @@ {{ page.team.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 %} + {% comment %} Add the slider here {% endcomment %} -- 2.39.5