mirror of
https://github.com/jonom/silverstripe-betternavigator.git
synced 2024-10-22 14:05:51 +02:00
parent
1a02603fb4
commit
58fe5c8dd6
@ -35,7 +35,7 @@ class BetterNavigatorExtension extends DataExtension {
|
||||
}
|
||||
}
|
||||
// Only show edit link if user has permission to edit this page
|
||||
$editLink = (($this->owner->dataRecord->canEdit() && Permission::check('CMS_ACCESS_CMSMain')) || $isDev) ? $nav['CMSLink']['Link'] : false;
|
||||
$editLink = (($this->owner->dataRecord->canEdit() && Permission::check('CMS_ACCESS_CMSMain')) || $isDev) ? Controller::join_links('/', $nav['CMSLink']['Link']) : false;
|
||||
|
||||
// Is the logged in member nominated as a developer?
|
||||
$member = Member::currentUser();
|
||||
@ -49,8 +49,8 @@ class BetterNavigatorExtension extends DataExtension {
|
||||
'Member' => $member,
|
||||
'Stage' => Versioned::current_stage(),
|
||||
'Viewing' => $viewing, // What we're viewing doesn't necessarily align with the active Stage
|
||||
'LoginLink' => Config::inst()->get('Security', 'login_url') . $backURL,
|
||||
'LogoutLink' => 'Security/logout' . $backURL,
|
||||
'LoginLink' => Controller::join_links('/', Config::inst()->get('Security', 'login_url'), $backURL),
|
||||
'LogoutLink' => Controller::join_links('/Security/logout', $backURL),
|
||||
'EditLink' => $editLink,
|
||||
'Mode' => Director::get_environment_type(),
|
||||
'IsDeveloper' => $isDeveloper
|
||||
|
@ -60,8 +60,8 @@
|
||||
<% end_if %>
|
||||
|
||||
<a href="$Link?flush=1" title="Flush templates and manifest, and regenerate images for this page (behaviour varies by Framework version)"><span class="bn-icon-flush"></span>Flush caches</a>
|
||||
<a href="dev/build/?flush=1" target="_blank" title="Build database and flush caches (excludes template caches pre SS-3.1.7)"><span class="bn-icon-db"></span>Build database</a>
|
||||
<a href="dev" target="_blank"><span class="bn-icon-tools"></span>Dev menu</a>
|
||||
<a href="/dev/build/?flush=1" target="_blank" title="Build database and flush caches (excludes template caches pre SS-3.1.7)"><span class="bn-icon-db"></span>Build database</a>
|
||||
<a href="/dev/" target="_blank"><span class="bn-icon-tools"></span>Dev menu</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user