Skip to content

Commit

Permalink
Merge pull request #114 from ohararyan/silverstripe-cms
Browse files Browse the repository at this point in the history
---

http://open.silverstripe.org/ticket/7214

Added watermark to show current state of preview.
  • Loading branch information
chillu committed May 7, 2012
2 parents 32f4672 + ad1f7c1 commit 1fa54ab
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/controllers/SilverStripeNavigator.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ function __construct($record) {
* For example, a "future state" item might show a date selector.
*/
function getHTML() {}

/**
* @return String
* Text displayed in watermark
*/
function getWatermark() {}

/**
* Optional link to a specific view of this record.
Expand Down Expand Up @@ -214,6 +220,10 @@ function getHTML() {
return "<a href=\"$this->recordLink\">". _t('ContentController.DRAFTSITE', 'Draft Site') ."</a>";
}
}

function getWatermark() {
return _t('ContentController.DRAFTSITE');
}

function getMessage() {
return "<div id=\"SilverStripeNavigatorMessage\" title=\"". _t('ContentControl.NOTEWONTBESHOWN', 'Note: this message will not be shown to your visitors') ."\">". _t('ContentController.DRAFTSITE', 'Draft Site') ."</div>";
Expand Down Expand Up @@ -258,6 +268,10 @@ function getHTML() {
return "<a href=\"$this->recordLink\">". _t('ContentController.PUBLISHEDSITE', 'Published Site') ."</a>";
}
}

function getWatermark() {
return _t('ContentController.PUBLISHEDSITE');
}

function getMessage() {
return "<div id=\"SilverStripeNavigatorMessage\" title=\"". _t('ContentControl.NOTEWONTBESHOWN', 'Note: this message will not be shown to your visitors') ."\">". _t('ContentController.PUBLISHEDSITE', 'Published Site') ."</div>";
Expand Down

0 comments on commit 1fa54ab

Please sign in to comment.