Merge pull request #114 from ohararyan/silverstripe-cms

---

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

Added watermark to show current state of preview.
This commit is contained in:
Ingo Schommer 2012-05-07 12:52:53 +02:00
commit 1fa54abf6c

View File

@ -120,6 +120,12 @@ class SilverStripeNavigatorItem extends ViewableData {
*/
function getHTML() {}
/**
* @return String
* Text displayed in watermark
*/
function getWatermark() {}
/**
* Optional link to a specific view of this record.
* Not all items are simple links, please use {@link getHTML()}
@ -215,6 +221,10 @@ class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem {
}
}
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>";
}
@ -259,6 +269,10 @@ class SilverStripeNavigatorItem_LiveLink extends SilverStripeNavigatorItem {
}
}
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>";
}