Merge pull request #2556 from riking/topic_error
Don't show Try Again for access errors on topics
This commit is contained in:
commit
8f36d3367f
|
@ -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 {
|
||||
|
|
|
@ -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}}
|
||||
{{#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>
|
||||
|
|
Loading…
Reference in New Issue