diff --git a/javascript/CMSMain.Tree.js b/javascript/CMSMain.Tree.js index cbd56f91..6d98c8aa 100644 --- a/javascript/CMSMain.Tree.js +++ b/javascript/CMSMain.Tree.js @@ -12,12 +12,27 @@ 'edit': { 'label': ss.i18n._t('Tree.EditPage'), 'action': function(obj) { - $('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf( + $('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf( self.data('urlEditpage'), obj.data('id') )); } } }; + + // Add "show as list" + if(!node.hasClass('nochildren')) { + menuitems['showaslist'] = { + 'label': ss.i18n._t('Tree.ShowAsList'), + 'action': function(obj) { + $('.cms-container').entwine('.ss').loadPanel( + self.data('urlListview') + '&ParentID=' + obj.data('id'), + null, + // Default to list view tab + {tabState: {'pages-controller-cms-content': {'tabSelector': '.content-listview'}}} + ); + } + }; + } // Build a list for allowed children as submenu entries var pagetype = node.data('pagetype'), diff --git a/javascript/lang/en_US.js b/javascript/lang/en_US.js index 667c15e6..fa21cabc 100644 --- a/javascript/lang/en_US.js +++ b/javascript/lang/en_US.js @@ -33,6 +33,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { 'Tree.EditPage': 'Edit', 'Tree.ThisPageOnly': 'This page only', 'Tree.ThisPageAndSubpages': 'This page and subpages', + 'Tree.ShowAsList': 'Show children as list', 'CMSMain.ConfirmRestoreFromLive': "Do you really want to copy the published content to the draft site?", 'CMSMain.RollbackToVersion': "Do you really want to roll back to version #%s of this page?", 'URLSEGMENT.Edit': 'Edit', diff --git a/templates/Includes/CMSMain_TreeView.ss b/templates/Includes/CMSMain_TreeView.ss index 83cec419..79e9c543 100644 --- a/templates/Includes/CMSMain_TreeView.ss +++ b/templates/Includes/CMSMain_TreeView.ss @@ -19,7 +19,7 @@ $ExtraTreeTools <% end_if %> -
+
$SiteTreeAsUL
diff --git a/templates/Includes/CMSPagesController_Content.ss b/templates/Includes/CMSPagesController_Content.ss index 967ecd8d..da373bfc 100644 --- a/templates/Includes/CMSPagesController_Content.ss +++ b/templates/Includes/CMSPagesController_Content.ss @@ -7,10 +7,10 @@