mirror of
https://github.com/discourse/discourse.git
synced 2025-01-26 15:20:46 +08:00
01281b6364
FIX: missing download my posts button FIX: moderators had no way of seeing responses and edits etc
31 lines
729 B
JavaScript
31 lines
729 B
JavaScript
import ViewingActionType from "discourse/mixins/viewing-action-type";
|
|
|
|
export default Discourse.Route.extend(ViewingActionType, {
|
|
|
|
renderTemplate() {
|
|
this.render('user/notifications');
|
|
},
|
|
|
|
actions: {
|
|
didTransition() {
|
|
this.controllerFor("user-notifications")._showFooter();
|
|
return true;
|
|
}
|
|
},
|
|
|
|
model() {
|
|
const username = this.modelFor("user").get("username");
|
|
|
|
if (this.get("currentUser.username") === username || this.get("currentUser.admin")) {
|
|
return this.store.find("notification", { username } );
|
|
}
|
|
},
|
|
|
|
|
|
setupController(controller, model) {
|
|
controller.set("model", model);
|
|
controller.set("user", this.modelFor("user"));
|
|
this.viewingActionType(-1);
|
|
}
|
|
});
|