ENHANCEMENT: Add Watermark for preview states (TRAC-7214)

This commit is contained in:
Ryan O'Hara 2012-05-04 11:26:40 +12:00
parent f545f52c1a
commit ad1f7c1f76

View File

@ -119,6 +119,12 @@ class SilverStripeNavigatorItem extends ViewableData {
* For example, a "future state" item might show a date selector.
*/
function getHTML() {}
/**
* @return String
* Text displayed in watermark
*/
function getWatermarkHTML() {}
/**
* Optional link to a specific view of this record.
@ -214,6 +220,10 @@ class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem {
return "<a href=\"$this->recordLink\">". _t('ContentController.DRAFTSITE', 'Draft Site') ."</a>";
}
}
function getWatermarkHTML() {
return "Draft Site";
}
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>";
@ -258,6 +268,10 @@ class SilverStripeNavigatorItem_LiveLink extends SilverStripeNavigatorItem {
return "<a href=\"$this->recordLink\">". _t('ContentController.PUBLISHEDSITE', 'Published Site') ."</a>";
}
}
function getWatermarkHTML() {
return "Published Site";
}
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>";