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();
|
$fields = $fields->makeReadonly();
|
||||||
|
|
||||||
foreach($fields->dataFields() as $field) {
|
|
||||||
$field->dontEscape = true;
|
|
||||||
$field->reserveNL = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($compareID) {
|
if($compareID) {
|
||||||
$link = Controller::join_links(
|
$link = Controller::join_links(
|
||||||
$this->Link('show'),
|
$this->Link('show'),
|
||||||
|
@ -208,7 +208,7 @@ class SilverStripeNavigatorItem extends ViewableData {
|
|||||||
(!$currentDraft || ($currentDraft && $this->record->Version != $currentDraft->Version))
|
(!$currentDraft || ($currentDraft && $this->record->Version != $currentDraft->Version))
|
||||||
&& (!$currentLive || ($currentLive && $this->record->Version != $currentLive->Version))
|
&& (!$currentLive || ($currentLive && $this->record->Version != $currentLive->Version))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->record->_cached_isArchived;
|
return $this->record->_cached_isArchived;
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ class SilverStripeNavigatorItem_CMSLink extends SilverStripeNavigatorItem {
|
|||||||
_t('ContentController.CMS', 'CMS')
|
_t('ContentController.CMS', 'CMS')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
return _t('ContentController.CMS', 'CMS', 'Used in navigation. Should be a short label');
|
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() {
|
public function isActive() {
|
||||||
return (Controller::curr() instanceof CMSMain);
|
return (Controller::curr() instanceof LeftAndMain);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canView($member = null) {
|
public function canView($member = null) {
|
||||||
return (
|
return (
|
||||||
// Don't show in CMS
|
// Don't show in CMS
|
||||||
!(Controller::curr() instanceof CMSMain)
|
!(Controller::curr() instanceof LeftAndMain)
|
||||||
// Don't follow redirects in preview, they break the CMS editing form
|
// Don't follow redirects in preview, they break the CMS editing form
|
||||||
&& !($this->record instanceof RedirectorPage)
|
&& !($this->record instanceof RedirectorPage)
|
||||||
);
|
);
|
||||||
@ -375,7 +375,7 @@ class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem {
|
|||||||
$this->recordLink = $this->record->PreviewLink();
|
$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>";
|
return "<a class=\"ss-ui-button\" href=\"$this->recordLink?archiveDate={$this->record->LastEdited}\" target=\"_blank\">". _t('ContentController.ARCHIVEDSITE', 'Preview version') ."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
return _t('SilverStripeNavigator.ARCHIVED', 'Archived');
|
return _t('SilverStripeNavigator.ARCHIVED', 'Archived');
|
||||||
}
|
}
|
||||||
@ -404,5 +404,5 @@ class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem {
|
|||||||
public function isActive() {
|
public function isActive() {
|
||||||
return $this->isArchived();
|
return $this->isArchived();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user