Move badges admin tab to after users, show only if enabled.
This commit is contained in:
parent
4f71256542
commit
a4461022a3
|
@ -6,4 +6,8 @@
|
|||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminController = Discourse.Controller.extend({});
|
||||
Discourse.AdminController = Discourse.Controller.extend({
|
||||
showBadges: function() {
|
||||
return this.get('currentUser.admin') && Discourse.SiteSettings.enable_badges;
|
||||
}.property()
|
||||
});
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
<li>{{#link-to 'adminSiteContents'}}{{i18n admin.site_content.title}}{{/link-to}}</li>
|
||||
{{/if}}
|
||||
<li>{{#link-to 'adminUsersList'}}{{i18n admin.users.title}}{{/link-to}}</li>
|
||||
{{#if showBadges}}
|
||||
<li>{{#link-to 'admin.badges'}}{{i18n admin.badges.title}}{{/link-to}}</li>
|
||||
{{/if}}
|
||||
{{#if currentUser.admin}}
|
||||
<li>{{#link-to 'admin.groups'}}{{i18n admin.groups.title}}{{/link-to}}</li>
|
||||
{{/if}}
|
||||
|
@ -24,7 +27,6 @@
|
|||
<li>{{#link-to 'admin.customize'}}{{i18n admin.customize.title}}{{/link-to}}</li>
|
||||
<li>{{#link-to 'admin.api'}}{{i18n admin.api.title}}{{/link-to}}</li>
|
||||
<li>{{#link-to 'admin.backups'}}{{i18n admin.backups.title}}{{/link-to}}</li>
|
||||
<li>{{#link-to 'admin.badges'}}{{i18n admin.badges.title}}{{/link-to}}</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
|
||||
|
|
Loading…
Reference in New Issue