mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #5185 from jonom/tractorcow-pulls/3/menu-refactor
API refactor LeftAndMain_Menu.ss into individually overridable compon…
This commit is contained in:
commit
aa635f096b
@ -1,42 +1,14 @@
|
|||||||
<div class="cms-menu cms-panel cms-panel-layout west" id="cms-menu" data-layout-type="border">
|
<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-header north">
|
||||||
<div class="cms-logo">
|
<% include LeftAndMain_MenuLogo %>
|
||||||
<a href="$ApplicationLink" target="_blank" title="$ApplicationName (Version - $CMSVersion)">
|
<% include LeftAndMain_MenuStatus %>
|
||||||
$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>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cms-panel-content center">
|
<div class="cms-panel-content center">
|
||||||
<ul class="cms-menu-list">
|
<% include LeftAndMain_MenuList %>
|
||||||
<% 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}"> </span>
|
|
||||||
<span class="text">$Title</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<% end_loop %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cms-panel-toggle south">
|
<div class="cms-panel-toggle south">
|
||||||
<button class="sticky-toggle" type="button" title="Sticky nav">Sticky nav</button>
|
<% include LeftAndMain_MenuToggle %>
|
||||||
<span class="sticky-status-indicator">auto</span>
|
|
||||||
<a class="toggle-expand" href="#"><span>»</span></a>
|
|
||||||
<a class="toggle-collapse" href="#"><span>«</span></a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
10
admin/templates/Includes/LeftAndMain_MenuList.ss
Normal file
10
admin/templates/Includes/LeftAndMain_MenuList.ss
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<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}"> </span>
|
||||||
|
<span class="text">$Title</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% end_loop %>
|
||||||
|
</ul>
|
6
admin/templates/Includes/LeftAndMain_MenuLogo.ss
Normal file
6
admin/templates/Includes/LeftAndMain_MenuLogo.ss
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<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>
|
11
admin/templates/Includes/LeftAndMain_MenuStatus.ss
Normal file
11
admin/templates/Includes/LeftAndMain_MenuStatus.ss
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<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>
|
4
admin/templates/Includes/LeftAndMain_MenuToggle.ss
Normal file
4
admin/templates/Includes/LeftAndMain_MenuToggle.ss
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<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>»</span></a>
|
||||||
|
<a class="toggle-collapse" href="#"><span>«</span></a>
|
Loading…
Reference in New Issue
Block a user