mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 12:23:36 +08:00
FIX: When navigating to a topic via a link that's not found, the
formatting was broken.
This commit is contained in:
parent
becfcefb3c
commit
7b317c1ad7
|
@ -437,7 +437,7 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
|
|||
return canDelete;
|
||||
}.property('selectedPostsCount'),
|
||||
|
||||
hasError: Ember.computed.or('errorBodyHtml', 'message'),
|
||||
hasError: Ember.computed.or('notFoundHtml', 'message'),
|
||||
|
||||
multiSelectChanged: function() {
|
||||
// Deselect all posts when multi select is turned off
|
||||
|
|
|
@ -827,7 +827,7 @@ Discourse.PostStream = Em.Object.extend({
|
|||
// If the result was 404 the post is not found
|
||||
if (status === 404) {
|
||||
topic.set('errorTitle', I18n.t('topic.not_found.title'));
|
||||
topic.set('errorBodyHtml', result.responseText);
|
||||
topic.set('notFoundHtml', result.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,12 +119,11 @@
|
|||
{{else}}
|
||||
{{#if hasError}}
|
||||
<div class='container'>
|
||||
{{#if notFoundHtml}}
|
||||
{{{notFoundHtml}}}
|
||||
{{else}}
|
||||
<div class="topic-error">
|
||||
{{{errorBodyHtml}}}
|
||||
|
||||
{{#if message}}
|
||||
{{message}}
|
||||
{{/if}}
|
||||
{{message}}
|
||||
{{#if noRetry}}
|
||||
{{#unless currentUser}}
|
||||
<button {{action showLogin}} class='btn btn-primary topic-retry'><i class="fa fa-user"></i>{{i18n log_in}}</button>
|
||||
|
@ -136,6 +135,7 @@
|
|||
{{#if retrying}}
|
||||
<div class='spinner'>{{i18n loading}}</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='container'>
|
||||
|
|
Loading…
Reference in New Issue
Block a user