Skip to content

Commit

Permalink
BUG: Add "add new" button to Pages list view (fixes 7649)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Naomi Guyer committed Oct 15, 2012
1 parent 7959642 commit 06e184a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion templates/Includes/CMSMain_ListView.ss
@@ -1,5 +1,5 @@
<div class="cms-content-toolbar">
<%--<% include CMSPagesController_ContentToolActions %>--%>
<% include CMSPagesController_ContentToolActions %>
</div>

<div class="ss-dialog cms-page-add-form-dialog cms-dialog-content" id="cms-page-add-form" title="<% _t('CMSMain.AddNew', 'Add new page') %>">
Expand Down
1 change: 1 addition & 0 deletions templates/Includes/CMSMain_TreeView.ss
@@ -1,4 +1,5 @@
<div class="cms-content-toolbar">
<% include CMSPagesController_ContentToolActions %>
<% include CMSPagesController_ContentToolbar %>
</div>

Expand Down
3 changes: 0 additions & 3 deletions templates/Includes/CMSPagesController_ContentToolActions.ss
Expand Up @@ -2,6 +2,3 @@
<a class="cms-page-add-button ss-ui-button ss-ui-action-constructive" data-icon="add" href="$LinkPageAdd" data-url-addpage="{$LinkPageAdd}?ParentID=%s"><% _t('CMSMain.AddNewButton', 'Add new') %></a>
</div>

<div class="cms-content-batchactions">
$BatchActionsForm
</div>
6 changes: 5 additions & 1 deletion templates/Includes/CMSPagesController_ContentToolbar.ss
@@ -1,3 +1,7 @@
<div class="cms-content-batchactions">
$BatchActionsForm
</div>

<div class="cms-tree-view-modes">
<span><% _t("TreeTools.DisplayLabel","Display:") %></span>
<% if CanOrganiseSitetree %>
Expand All @@ -11,4 +15,4 @@
<label for="view-mode-multiselect"><% _t("MULTISELECT","Multi-selection") %></label>
</div>
</div>
<% include CMSPagesController_ContentToolActions %>

0 comments on commit 06e184a

Please sign in to comment.