mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 14:36:28 +08:00
e68ecf1f1d
* UX: Add link to Groups in admin dashboard. * UX: Site settings have immediate effect.
32 lines
786 B
JavaScript
32 lines
786 B
JavaScript
import computed from "ember-addons/ember-computed-decorators";
|
|
|
|
export default Ember.Controller.extend({
|
|
application: Ember.inject.controller(),
|
|
|
|
@computed("siteSettings.enable_group_directory")
|
|
showGroups(enableGroupDirectory) {
|
|
return !enableGroupDirectory;
|
|
},
|
|
|
|
@computed("siteSettings.enable_badges")
|
|
showBadges(enableBadges) {
|
|
return this.currentUser.get("admin") && enableBadges;
|
|
},
|
|
|
|
@computed("application.currentPath")
|
|
adminContentsClassName(currentPath) {
|
|
return currentPath
|
|
.split(".")
|
|
.filter(segment => {
|
|
return (
|
|
segment !== "index" &&
|
|
segment !== "loading" &&
|
|
segment !== "show" &&
|
|
segment !== "admin"
|
|
);
|
|
})
|
|
.map(Ember.String.dasherize)
|
|
.join(" ");
|
|
}
|
|
});
|