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
|
2020-09-04 19:42:47 +08:00
|
|
|
adminRoutes: function () {
|
2019-05-27 16:15:39 +08:00
|
|
|
return this.model
|
2020-09-04 19:42:47 +08:00
|
|
|
.map((p) => {
|
2017-02-10 01:11:53 +08:00
|
|
|
if (p.get("enabled")) {
|
|
|
|
return p.admin_route;
|
2016-10-21 01:26:41 +08:00
|
|
|
}
|
2017-02-10 01:11:53 +08:00
|
|
|
})
|
|
|
|
.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");
|
2020-09-04 19:42:47 +08:00
|
|
|
},
|
|
|
|
},
|
2015-02-07 06:32:59 +08:00
|
|
|
});
|