2019-11-08 05:38:28 +08:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2019-10-24 01:06:54 +08:00
|
|
|
import Controller from "@ember/controller";
|
2019-04-26 18:16:21 +08:00
|
|
|
|
2019-10-24 01:06:54 +08:00
|
|
|
export default Controller.extend({
|
2019-11-08 05:38:28 +08:00
|
|
|
@discourseComputed
|
2017-02-10 01:11:53 +08:00
|
|
|
adminRoutes: function() {
|
2019-05-27 16:15:39 +08:00
|
|
|
return this.model
|
2018-06-15 23:03:24 +08:00
|
|
|
.map(p => {
|
|
|
|
if (p.get("enabled")) {
|
|
|
|
return p.admin_route;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.compact();
|
2019-04-26 18:16:21 +08:00
|
|
|
},
|
|
|
|
|
2018-07-03 11:14:53 +08:00
|
|
|
actions: {
|
|
|
|
clearFilter() {
|
|
|
|
this.setProperties({ filter: "", onlyOverridden: false });
|
|
|
|
},
|
|
|
|
|
|
|
|
toggleMenu() {
|
|
|
|
$(".admin-detail").toggleClass("mobile-closed mobile-open");
|
|
|
|
}
|
|
|
|
}
|
2015-02-07 06:32:59 +08:00
|
|
|
});
|