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
c3b4d68664
@ -83,7 +83,7 @@ class SilverStripeNavigator extends ViewableData {
|
||||
$text = $item->getHTML();
|
||||
if($text) $html .= $text;
|
||||
$newMessage = $item->getMessage();
|
||||
if($newMessage) $message = $newMessage;
|
||||
if($newMessage && $item->isActive()) $message = $newMessage;
|
||||
}
|
||||
|
||||
return array(
|
||||
@ -263,7 +263,7 @@ class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem {
|
||||
$draftPage = $this->getDraftPage();
|
||||
if($draftPage) {
|
||||
$this->recordLink = Controller::join_links($draftPage->AbsoluteLink(), "?stage=Stage");
|
||||
return "<a href=\"$this->recordLink\">". _t('ContentController.DRAFTSITE', 'Draft Site') ."</a>";
|
||||
return "<a ". ($this->isActive() ? 'class="current" ' : '') ."href=\"$this->recordLink\">". _t('ContentController.DRAFTSITE', 'Draft Site') ."</a>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ class SilverStripeNavigatorItem_LiveLink extends SilverStripeNavigatorItem {
|
||||
$livePage = $this->getLivePage();
|
||||
if($livePage) {
|
||||
$this->recordLink = Controller::join_links($livePage->AbsoluteLink(), "?stage=Live");
|
||||
return "<a href=\"$this->recordLink\">". _t('ContentController.PUBLISHEDSITE', 'Published Site') ."</a>";
|
||||
return "<a ". ($this->isActive() ? 'class="current" ' : '') ."href=\"$this->recordLink\">". _t('ContentController.PUBLISHEDSITE', 'Published Site') ."</a>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -372,8 +372,8 @@ class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem {
|
||||
static $priority = 40;
|
||||
|
||||
public function getHTML() {
|
||||
$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>";
|
||||
$this->recordLink = $this->record->AbsoluteLink();
|
||||
return "<a class=\"ss-ui-button". ($this->isActive() ? ' current' : '') ."\" href=\"$this->recordLink?archiveDate={$this->record->LastEdited}\" target=\"_blank\">". _t('ContentController.ARCHIVEDSITE', 'Preview version') ."</a>";
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
@ -382,8 +382,7 @@ class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem {
|
||||
|
||||
public function getMessage() {
|
||||
if($date = Versioned::current_archived_date()) {
|
||||
$dateObj = Datetime::create();
|
||||
$dateObj->setValue($date);
|
||||
$dateObj = DBField::create_field('Datetime', $date);
|
||||
return "<div id=\"SilverStripeNavigatorMessage\" title=\"". _t('ContentControl.NOTEWONTBESHOWN', 'Note: this message will not be shown to your visitors') ."\">". _t('ContentController.ARCHIVEDSITEFROM', 'Archived site from') ."<br>" . $dateObj->Nice() . "</div>";
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#SilverStripeNavigator .bottomTabs a.current { font-weight: bold; text-decoration: none; }
|
||||
|
||||
#SilverStripeNavigatorMessage { font-family: 'Lucida Grande', Verdana, Arial, 'sans-serif'; position: absolute; right: 20px; top: 40px; padding: 10px; border-color: #c99; color: #fff; background-color: #c00; border: 1px solid #000; }
|
||||
#SilverStripeNavigatorMessage { font-family: 'Lucida Grande', Verdana, Arial, 'sans-serif'; position: fixed; z-index: 1000; right: 20px; top: 40px; padding: 10px; border-color: #c99; color: #fff; background-color: #c00; border: 1px solid #000; }
|
||||
|
||||
#SilverStripeNavigatorLinkPopup { display: none; position: absolute; top: -60px; height: 50px; width: 350px; left: 200px; background-color: white; border: 1px solid black; z-index: 100; color: black; padding: 5px; }
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
#SilverStripeNavigator {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
@ -51,7 +50,8 @@
|
||||
|
||||
#SilverStripeNavigatorMessage {
|
||||
font-family: 'Lucida Grande', Verdana, Arial, 'sans-serif';
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
right: 20px;
|
||||
top: 40px;
|
||||
padding: 10px;
|
||||
|
Loading…
Reference in New Issue
Block a user