From ed16bc4ca0f0b6057e7b1d222d28df75c97cd1eb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Mon, 26 Sep 2016 10:05:51 +0200 Subject: [PATCH] Remove hidden pages from summary menu --- app/static/src/js/modules/summary.js | 2 +- app/templates/pages/menus/current_tree_secondary.html | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/static/src/js/modules/summary.js b/app/static/src/js/modules/summary.js index f7fdc6c2..b46c6542 100644 --- a/app/static/src/js/modules/summary.js +++ b/app/static/src/js/modules/summary.js @@ -20,7 +20,7 @@ Summary.prototype.init = function() { $template = that.$summary.find('li:first-child'); that.$content.each(function(idx) { - $(this).find('h2').each(function(idx) { + $(this).find('h2:not(.page-box__title)').each(function(idx) { var $element = $(this), $template_clone = $template.clone(); diff --git a/app/templates/pages/menus/current_tree_secondary.html b/app/templates/pages/menus/current_tree_secondary.html index bc19a646..93ab4539 100644 --- a/app/templates/pages/menus/current_tree_secondary.html +++ b/app/templates/pages/menus/current_tree_secondary.html @@ -27,6 +27,11 @@ {% page_menu page %} {% endif %} + {% if page.is_current_or_ascendant and not page.has_children_in_menu %} + + {% endif %} {% endfor %} {% endif %} {% if branch_level == 2 %} -- 2.39.5