mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts: code/controllers/SilverStripeNavigator.php
This commit is contained in:
commit
53c2059a01
@ -122,11 +122,6 @@ class CMSPageHistoryController extends CMSMain {
|
||||
|
||||
$fields = $fields->makeReadonly();
|
||||
|
||||
foreach($fields->dataFields() as $field) {
|
||||
$field->dontEscape = true;
|
||||
$field->reserveNL = true;
|
||||
}
|
||||
|
||||
if($compareID) {
|
||||
$link = Controller::join_links(
|
||||
$this->Link('show'),
|
||||
|
@ -208,7 +208,7 @@ class SilverStripeNavigatorItem extends ViewableData {
|
||||
(!$currentDraft || ($currentDraft && $this->record->Version != $currentDraft->Version))
|
||||
&& (!$currentLive || ($currentLive && $this->record->Version != $currentLive->Version))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->record->_cached_isArchived;
|
||||
}
|
||||
@ -228,7 +228,7 @@ class SilverStripeNavigatorItem_CMSLink extends SilverStripeNavigatorItem {
|
||||
_t('ContentController.CMS', 'CMS')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function getTitle() {
|
||||
return _t('ContentController.CMS', 'CMS', 'Used in navigation. Should be a short label');
|
||||
}
|
||||
@ -238,13 +238,13 @@ class SilverStripeNavigatorItem_CMSLink extends SilverStripeNavigatorItem {
|
||||
}
|
||||
|
||||
public function isActive() {
|
||||
return (Controller::curr() instanceof CMSMain);
|
||||
return (Controller::curr() instanceof LeftAndMain);
|
||||
}
|
||||
|
||||
public function canView($member = null) {
|
||||
return (
|
||||
// Don't show in CMS
|
||||
!(Controller::curr() instanceof CMSMain)
|
||||
// Don't show in CMS
|
||||
!(Controller::curr() instanceof LeftAndMain)
|
||||
// Don't follow redirects in preview, they break the CMS editing form
|
||||
&& !($this->record instanceof RedirectorPage)
|
||||
);
|
||||
@ -375,7 +375,7 @@ class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem {
|
||||
$this->recordLink = $this->record->PreviewLink();
|
||||
return "<a class=\"ss-ui-button\" href=\"$this->recordLink?archiveDate={$this->record->LastEdited}\" target=\"_blank\">". _t('ContentController.ARCHIVEDSITE', 'Preview version') ."</a>";
|
||||
}
|
||||
|
||||
|
||||
public function getTitle() {
|
||||
return _t('SilverStripeNavigator.ARCHIVED', 'Archived');
|
||||
}
|
||||
@ -404,5 +404,5 @@ class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem {
|
||||
public function isActive() {
|
||||
return $this->isArchived();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user