Merge pull request #304 from creative-commoners/pulls/2.0/namespace-templates

API Move templates to namespaced location, remove unused templates
This commit is contained in:
Damian Mooyman 2017-09-07 16:43:46 +12:00 committed by GitHub
commit aab69e0baa
5 changed files with 4 additions and 49 deletions

View File

@ -3,6 +3,7 @@
namespace SilverStripe\Subsites\Controller;
use SilverStripe\Admin\LeftAndMain;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Subsites\Model\Subsite;
@ -17,7 +18,7 @@ class SubsiteXHRController extends LeftAndMain
/**
* Relax the access permissions, so anyone who has access to any CMS subsite can access this controller.
* @param null $member
* @param Member|null $member
* @return bool
*/
public function canView($member = null)
@ -62,6 +63,6 @@ class SubsiteXHRController extends LeftAndMain
*/
public function SubsiteList()
{
return $this->renderWith('Includes/SubsiteList');
return $this->renderWith(['type' => 'Includes', self::class . '_subsitelist']);
}
}

View File

@ -1 +0,0 @@
<a href="$NewFromTemplateLink" class="action ss-ui-action-constructive ss-ui-button ui-button ui-widget ui-state-default ui-corner-all new new-link" data-icon="add"><% _t('GridFieldAddFromTemplateButton.AddFromTemplate', 'Add New from Template') %></a>

View File

@ -1,45 +0,0 @@
<div class="cms-menu cms-panel cms-panel-layout west" id="cms-menu" data-layout-type="border">
<div class="cms-logo-header north">
<div class="cms-logo">
<a href="$ApplicationLink" target="_blank" title="$ApplicationName (Version - $CMSVersion)">
$ApplicationName <% if $CMSVersion %><abbr class="version">$CMSVersion</abbr><% end_if %>
</a>
<span><% if $SiteConfig %>$SiteConfig.Title<% else %>$ApplicationName<% end_if %></span>
</div>
<div class="cms-login-status">
<a href="$LogoutURL" class="logout-link font-icon-logout" title="<%t LeftAndMain_Menu_ss.LOGOUT 'Log out' %>"></a>
<% with $CurrentMember %>
<span>
<%t LeftAndMain_Menu_ss.Hello 'Hi' %>
<a href="{$AbsoluteBaseURL}admin/myprofile" class="profile-link">
<% if $FirstName && $Surname %>$FirstName $Surname<% else_if $FirstName %>$FirstName<% else %>$Email<% end_if %>
</a>
</span>
<% end_with %>
</div>
<% if $ListSubsites %>
<% include SubsiteList %>
<% end_if %>
</div>
<div class="cms-panel-content center">
<ul class="cms-menu-list">
<% loop $MainMenu %>
<li class="$LinkingMode $FirstLast <% if $LinkingMode == 'link' %><% else %>opened<% end_if %>" id="Menu-$Code" title="$Title.ATT">
<a href="$Link" $AttributesHTML>
<span class="icon icon-16 icon-{$Code.LowerCase}">&nbsp;</span>
<span class="text">$Title</span>
</a>
</li>
<% end_loop %>
</ul>
</div>
<div class="cms-panel-toggle south">
<button class="sticky-toggle" type="button" title="Sticky nav">Sticky nav</button>
<span class="sticky-status-indicator">auto</span>
<a class="toggle-expand" href="#"><span>&raquo;</span></a>
<a class="toggle-collapse" href="#"><span>&laquo;</span></a>
</div>
</div>

View File

@ -6,7 +6,7 @@
<% include SilverStripe\\Admin\\LeftAndMain_MenuStatus %>
<% if $ListSubsites %>
<% include SubsiteList %>
<% include SilverStripe\\Subsites\\Controller\\SubsiteXHRController_subsitelist %>
<% end_if %>
</div>