From 06e184a97f361719d312dbf35dfc4d0ceea0e0d7 Mon Sep 17 00:00:00 2001 From: Naomi Guyer Date: Mon, 15 Oct 2012 14:59:04 +1300 Subject: [PATCH] BUG: Add "add new" button to Pages list view (fixes 7649) Rearranged the templates around CMSPagesController_ContentToolbar and uncommented the toolbar from the pages list view so the add new button would be included with including actions that aren't applicable to the gridfield. Linked to https://github.com/silverstripe/sapphire/pull/684/commits --- templates/Includes/CMSMain_ListView.ss | 2 +- templates/Includes/CMSMain_TreeView.ss | 1 + templates/Includes/CMSPagesController_ContentToolActions.ss | 3 --- templates/Includes/CMSPagesController_ContentToolbar.ss | 6 +++++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/templates/Includes/CMSMain_ListView.ss b/templates/Includes/CMSMain_ListView.ss index 2ca34245..0cf247d2 100644 --- a/templates/Includes/CMSMain_ListView.ss +++ b/templates/Includes/CMSMain_ListView.ss @@ -1,5 +1,5 @@
- <%--<% include CMSPagesController_ContentToolActions %>--%> + <% include CMSPagesController_ContentToolActions %>
diff --git a/templates/Includes/CMSMain_TreeView.ss b/templates/Includes/CMSMain_TreeView.ss index 9c54d888..ae9f1d08 100644 --- a/templates/Includes/CMSMain_TreeView.ss +++ b/templates/Includes/CMSMain_TreeView.ss @@ -1,4 +1,5 @@
+ <% include CMSPagesController_ContentToolActions %> <% include CMSPagesController_ContentToolbar %>
diff --git a/templates/Includes/CMSPagesController_ContentToolActions.ss b/templates/Includes/CMSPagesController_ContentToolActions.ss index 62052846..b0298842 100644 --- a/templates/Includes/CMSPagesController_ContentToolActions.ss +++ b/templates/Includes/CMSPagesController_ContentToolActions.ss @@ -2,6 +2,3 @@ <% _t('CMSMain.AddNewButton', 'Add new') %>
-
- $BatchActionsForm -
\ No newline at end of file diff --git a/templates/Includes/CMSPagesController_ContentToolbar.ss b/templates/Includes/CMSPagesController_ContentToolbar.ss index 6717ce38..79118538 100644 --- a/templates/Includes/CMSPagesController_ContentToolbar.ss +++ b/templates/Includes/CMSPagesController_ContentToolbar.ss @@ -1,3 +1,7 @@ +
+ $BatchActionsForm +
+
<% _t("TreeTools.DisplayLabel","Display:") %> <% if CanOrganiseSitetree %> @@ -11,4 +15,4 @@
-<% include CMSPagesController_ContentToolActions %> +