Merge pull request #2556 from riking/topic_error

Don't show Try Again for access errors on topics
This commit is contained in:
Sam 2014-07-18 17:18:22 +10:00
commit 8f36d3367f
2 changed files with 8 additions and 4 deletions

View File

@ -833,6 +833,7 @@ Discourse.PostStream = Em.Object.extend({
// If the result is 403 it means invalid access
if (status === 403) {
topic.set('errorTitle', I18n.t('topic.invalid_access.title'));
topic.set('noRetry', true);
if (Discourse.User.current()) {
topic.set('message', I18n.t('topic.invalid_access.description'));
} else {

View File

@ -122,11 +122,14 @@
{{#if message}}
{{message}}
{{#unless currentUser}}
<button {{action showLogin}} class='btn btn-primary btn-small'><i class="fa fa-user"></i>{{i18n log_in}}</button>
{{/unless}}
{{/if}}
<button class="btn btn-primary topic-retry" {{action retryLoading}}>{{i18n errors.buttons.again}}</button>
{{#if noRetry}}
{{#unless currentUser}}
<button {{action showLogin}} class='btn btn-primary topic-retry'><i class="fa fa-user"></i>{{i18n log_in}}</button>
{{/unless}}
{{else}}
<button class="btn btn-primary topic-retry" {{action retryLoading}}>{{i18n errors.buttons.again}}</button>
{{/if}}
</div>
{{#if retrying}}
<div class='spinner'>{{i18n loading}}</div>