]> git.parisson.com Git - mezzo.git/commitdiff
Remove hidden pages from summary menu
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Mon, 26 Sep 2016 08:05:51 +0000 (10:05 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Mon, 26 Sep 2016 08:05:51 +0000 (10:05 +0200)
app/static/src/js/modules/summary.js
app/templates/pages/menus/current_tree_secondary.html

index f7fdc6c25d85e84e0fab355b17fa5f1efc058631..b46c6542da6ab4066b3c57ac019c69507e6aba83 100644 (file)
@@ -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();
index bc19a646703e42d7c7ac1265f6eca3562855a3cd..93ab453979b89fa1f01baa125f86636489ccc349 100644 (file)
                 </li>
                 {% page_menu page %}
             {% endif %}
+            {% if page.is_current_or_ascendant and not page.has_children_in_menu %}
+                <ul class="nav-tree" data-summary>
+                    {% include "pages/menus/current_tree_summary.html" %}
+                </ul>
+            {% endif %}
         {% endfor %}
     {% endif %}
     {% if branch_level == 2 %}