diff --git a/app/assets/javascripts/discourse/raw-views/topic-status.js.es6 b/app/assets/javascripts/discourse/raw-views/topic-status.js.es6 index e5d5befde9b..8b6af94cbb3 100644 --- a/app/assets/javascripts/discourse/raw-views/topic-status.js.es6 +++ b/app/assets/javascripts/discourse/raw-views/topic-status.js.es6 @@ -1,10 +1,11 @@ import computed from 'ember-addons/ember-computed-decorators'; export default Ember.Object.extend({ + showDefault: null, - @computed - renderDiv() { - return this.get('statuses').length > 0 && !this.noDiv; + @computed('defaultIcon') + renderDiv(defaultIcon) { + return (defaultIcon || this.get('statuses').length > 0) && !this.noDiv; }, @computed @@ -61,6 +62,11 @@ export default Ember.Object.extend({ } }); + let defaultIcon = this.get('defaultIcon'); + if (results.length === 0 && defaultIcon) { + this.set('showDefault', defaultIcon); + } + return results; } }); diff --git a/app/assets/javascripts/discourse/templates/components/topic-entrance.hbs b/app/assets/javascripts/discourse/templates/components/topic-entrance.hbs index c6885392c4c..b62feb185e7 100644 --- a/app/assets/javascripts/discourse/templates/components/topic-entrance.hbs +++ b/app/assets/javascripts/discourse/templates/components/topic-entrance.hbs @@ -2,6 +2,6 @@ {{d-icon 'caret-up'}} {{{topDate}}} {{/d-button}} -{{#d-button action="enterBottom" class="full jump-button"}} +{{#d-button action="enterBottom" class="full jump-bottom"}} {{{bottomDate}}} {{d-icon 'caret-down'}} {{/d-button}} diff --git a/app/assets/javascripts/discourse/templates/topic-status.raw.hbs b/app/assets/javascripts/discourse/templates/topic-status.raw.hbs index cfcbe836cfb..c8b1c3a6f38 100644 --- a/app/assets/javascripts/discourse/templates/topic-status.raw.hbs +++ b/app/assets/javascripts/discourse/templates/topic-status.raw.hbs @@ -8,6 +8,7 @@ <{{status.openTag}} title='{{status.title}}' class='topic-status'>{{d-icon status.icon}} {{~/if ~}} {{~/each}} +{{~#if view.showDefault~}}{{d-icon view.showDefault}}{{~/if ~}} {{~#if view.renderDiv ~}} {{/if ~}}