From dbd6099b890f5db1665444dbbd3c0264afd28af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Wed, 5 Aug 2015 22:55:32 +0200 Subject: [PATCH] FIX: make sure the global notice shows up on ALL the pages --- .../javascripts/admin/templates/admin.hbs | 1 - .../discourse/templates/application.hbs | 6 ++- .../discourse/templates/discovery.hbs | 12 ++--- .../javascripts/discourse/templates/topic.hbs | 52 +++++++++---------- .../discourse/templates/user/user.hbs | 5 -- 5 files changed, 35 insertions(+), 41 deletions(-) diff --git a/app/assets/javascripts/admin/templates/admin.hbs b/app/assets/javascripts/admin/templates/admin.hbs index d8e88712c4f..c7746a6d4a6 100644 --- a/app/assets/javascripts/admin/templates/admin.hbs +++ b/app/assets/javascripts/admin/templates/admin.hbs @@ -1,5 +1,4 @@
- {{global-notice}}
diff --git a/app/assets/javascripts/discourse/templates/application.hbs b/app/assets/javascripts/discourse/templates/application.hbs index 23822e0f409..7eb87f79e34 100644 --- a/app/assets/javascripts/discourse/templates/application.hbs +++ b/app/assets/javascripts/discourse/templates/application.hbs @@ -1,6 +1,10 @@ {{render "header"}} -
+
+
+ {{custom-html "top"}} + {{global-notice}} +
{{outlet}} {{render "user-card"}}
diff --git a/app/assets/javascripts/discourse/templates/discovery.hbs b/app/assets/javascripts/discourse/templates/discovery.hbs index 195db18b2e7..1e4548bbe26 100644 --- a/app/assets/javascripts/discourse/templates/discovery.hbs +++ b/app/assets/javascripts/discourse/templates/discovery.hbs @@ -1,10 +1,8 @@ -
- {{custom-html "top"}} - {{global-notice}} +
{{discourse-banner user=currentUser banner=site.banner}}
-
+
{{outlet "navigation-bar"}}
@@ -12,17 +10,17 @@ {{conditional-loading-spinner condition=loading}} -
+
-
+
{{outlet "header-list-container"}}
-
+
{{plugin-outlet "discovery-list-container-top"}} {{outlet "list-container"}}
diff --git a/app/assets/javascripts/discourse/templates/topic.hbs b/app/assets/javascripts/discourse/templates/topic.hbs index 5267a9febc9..c3fd2fdc489 100644 --- a/app/assets/javascripts/discourse/templates/topic.hbs +++ b/app/assets/javascripts/discourse/templates/topic.hbs @@ -1,25 +1,23 @@ -
- {{custom-html "top"}} - {{global-notice}} - {{#if model}} +{{#if model}} +
{{discourse-banner user=currentUser banner=site.banner overlay=view.hasScrolled hide=model.errorLoading}} - {{/if}} -
+
+{{/if}} {{plugin-outlet "topic-above-post-stream"}} {{#if model.postStream.loaded}} {{#if model.postStream.firstPostPresent}} -
-
+
+
{{#if editingTopic}} {{#if model.isPrivateMessage}} {{fa-icon "envelope"}} - {{autofocus-text-field id='edit-title' value=buffered.title maxLength=maxTitleLength}} + {{autofocus-text-field id="edit-title" value=buffered.title maxLength=maxTitleLength}} {{else}} - {{autofocus-text-field id='edit-title' value=buffered.title maxLength=maxTitleLength}} + {{autofocus-text-field id="edit-title" value=buffered.title maxLength=maxTitleLength}}
{{category-chooser valueAttribute="id" value=buffered.category_id source=buffered.category_id}} {{/if}} @@ -36,13 +34,13 @@ {{#if model.details.loaded}} {{topic-status topic=model}} - + {{{model.fancyTitle}}} {{/if}} {{#if model.details.can_edit}} - {{fa-icon "pencil"}} + {{fa-icon "pencil"}} {{/if}} @@ -61,10 +59,10 @@ {{view "selected-posts"}}
-
-
+
+
- {{render 'topic-progress'}} + {{render "topic-progress"}} {{conditional-loading-spinner condition=model.postStream.loadingAbove}} @@ -83,21 +81,21 @@ {{conditional-loading-spinner condition=model.postStream.loadingBelow}}
-
+
{{#conditional-loading-spinner condition=model.postStream.loadingFilter}} {{#if loadedAllPosts}} - {{view 'topic-closing' topic=model}} - {{view 'topic-footer-buttons' topic=model}} + {{view "topic-closing" topic=model}} + {{view "topic-footer-buttons" topic=model}} {{#if model.pending_posts_count}} -
+
{{{i18n "queue.has_pending_posts" count=model.pending_posts_count}}} - {{#link-to 'queued-posts'}} - {{fa-icon 'check'}} - {{i18n 'queue.view_pending'}} + {{#link-to "queued-posts"}} + {{fa-icon "check"}} + {{i18n "queue.view_pending"}} {{/link-to}}
{{/if}} @@ -105,9 +103,9 @@ {{plugin-outlet "topic-above-suggested"}} {{#if model.details.suggested_topics.length}} -
-

{{i18n 'suggested_topics.title'}}

-
+
+

{{i18n "suggested_topics.title"}}

+
{{basic-topic-list topics=model.details.suggested_topics postsAction="showTopicEntrance"}}

{{{view.browseMoreMessage}}}

@@ -122,10 +120,10 @@
{{else}} -
+
{{#conditional-loading-spinner condition=noErrorYet}} {{#if model.notFoundHtml}} -
{{{model.notFoundHtml}}}
+
{{{model.notFoundHtml}}}
{{else}}
{{model.message}}
diff --git a/app/assets/javascripts/discourse/templates/user/user.hbs b/app/assets/javascripts/discourse/templates/user/user.hbs index f042fa2635d..a21b59dd92c 100644 --- a/app/assets/javascripts/discourse/templates/user/user.hbs +++ b/app/assets/javascripts/discourse/templates/user/user.hbs @@ -1,8 +1,3 @@ -
- {{custom-html "top"}} - {{global-notice}} -
-