UX: Add link to Groups in admin dashboard. (#6480)
* UX: Add link to Groups in admin dashboard. * UX: Site settings have immediate effect.
This commit is contained in:
parent
39b7e32848
commit
e68ecf1f1d
|
@ -3,9 +3,14 @@ import computed from "ember-addons/ember-computed-decorators";
|
|||
export default Ember.Controller.extend({
|
||||
application: Ember.inject.controller(),
|
||||
|
||||
@computed
|
||||
showBadges() {
|
||||
return this.currentUser.get("admin") && this.siteSettings.enable_badges;
|
||||
@computed("siteSettings.enable_group_directory")
|
||||
showGroups(enableGroupDirectory) {
|
||||
return !enableGroupDirectory;
|
||||
},
|
||||
|
||||
@computed("siteSettings.enable_badges")
|
||||
showBadges(enableBadges) {
|
||||
return this.currentUser.get("admin") && enableBadges;
|
||||
},
|
||||
|
||||
@computed("application.currentPath")
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
{{nav-item route='adminSiteSettings' label='admin.site_settings.title'}}
|
||||
{{/if}}
|
||||
{{nav-item route='adminUsersList' label='admin.users.title'}}
|
||||
{{#if showGroups}}
|
||||
{{nav-item route='groups' label='admin.groups.title'}}
|
||||
{{/if}}
|
||||
{{#if showBadges}}
|
||||
{{nav-item route='adminBadges' label='admin.badges.title'}}
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue