Skip to content
Browse files

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

  • Loading branch information...
1 parent f545f52 commit ad1f7c1f76fa83390b3f580aa41948e44b5ec727 Ryan O'Hara committed
Showing with 14 additions and 0 deletions.
  1. +14 −0 code/controllers/SilverStripeNavigator.php
View
14 code/controllers/SilverStripeNavigator.php
@@ -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 getWatermarkHTML() {}
/**
* Optional link to a specific view of this record.
@@ -214,6 +220,10 @@ function getHTML() {
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 @@ function getHTML() {
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>";

0 comments on commit ad1f7c1

Please sign in to comment.
Something went wrong with that request. Please try again.