FIX: When navigating to a topic via a link that's not found, the

formatting was broken.
This commit is contained in:
Robin Ward 2014-08-07 15:56:09 -04:00
parent becfcefb3c
commit 7b317c1ad7
3 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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'>