From e5a4dc6eac4aef1ce8adc0e00ef0f5823b1dc6b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 27 Feb 2014 19:50:20 +0100 Subject: [PATCH] FEATURE: add a banner when read-only mode is enabled --- app/assets/javascripts/admin/templates/admin.js.handlebars | 5 +++++ .../discourse/templates/discovery.js.handlebars | 7 ++++++- .../javascripts/discourse/templates/topic.js.handlebars | 7 ++++++- .../discourse/templates/user/user.js.handlebars | 7 +++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/admin/templates/admin.js.handlebars b/app/assets/javascripts/admin/templates/admin.js.handlebars index 1cbe5c3a4b4..f8044020fe4 100644 --- a/app/assets/javascripts/admin/templates/admin.js.handlebars +++ b/app/assets/javascripts/admin/templates/admin.js.handlebars @@ -1,4 +1,9 @@
+ {{#if Discourse.isReadOnly}} +
+
{{i18n "read_only_mode.enabled"}}
+
+ {{/if}}
diff --git a/app/assets/javascripts/discourse/templates/discovery.js.handlebars b/app/assets/javascripts/discourse/templates/discovery.js.handlebars index 842e07f19a3..a8635ffa634 100644 --- a/app/assets/javascripts/discourse/templates/discovery.js.handlebars +++ b/app/assets/javascripts/discourse/templates/discovery.js.handlebars @@ -1,4 +1,9 @@ -{{customHTML "top"}} +
+ {{customHTML "top"}} + {{#if Discourse.isReadOnly}} +
{{i18n "read_only_mode.enabled"}}
+ {{/if}} +
diff --git a/app/assets/javascripts/discourse/templates/topic.js.handlebars b/app/assets/javascripts/discourse/templates/topic.js.handlebars index ead53fcb3e7..032a07e7e1d 100644 --- a/app/assets/javascripts/discourse/templates/topic.js.handlebars +++ b/app/assets/javascripts/discourse/templates/topic.js.handlebars @@ -1,4 +1,9 @@ -{{customHTML "top"}} +
+ {{customHTML "top"}} + {{#if Discourse.isReadOnly}} +
{{i18n "read_only_mode.enabled"}}
+ {{/if}} +
{{#if postStream.loaded}} diff --git a/app/assets/javascripts/discourse/templates/user/user.js.handlebars b/app/assets/javascripts/discourse/templates/user/user.js.handlebars index 259aaa1b57d..8a7accc4c61 100644 --- a/app/assets/javascripts/discourse/templates/user/user.js.handlebars +++ b/app/assets/javascripts/discourse/templates/user/user.js.handlebars @@ -1,3 +1,10 @@ +
+ {{customHTML "top"}} + {{#if Discourse.isReadOnly}} +
{{i18n "read_only_mode.enabled"}}
+ {{/if}} +
+ {{#unless loading}}