This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/routes/user-notifications.js.es6
riking 69bc552054 FEATURE: Actually show more notifications
The "Show more notifications..." link in the notifications dropdown now
links to /my/notifications, which is a historical view of all
notifications you have recieved.

Notification history is loaded in blocks of 60 at a time.

Admins can see others' notification history. (This was requested for
'debugging purposes', though that's what impersonation is for, IMO.)
2014-09-09 16:29:08 -07:00

20 lines
655 B
JavaScript

export default Discourse.Route.extend({
model: function() {
var user = this.modelFor('user');
return Discourse.NotificationContainer.loadHistory(undefined, user.get('username'));
},
setupController: function(controller, model) {
this.controllerFor('user').set('indexStream', false);
if (this.controllerFor('user_activity').get('content')) {
this.controllerFor('user_activity').set('userActionType', -1);
}
controller.set('model', model);
controller.set('user', this.modelFor('user'));
},
renderTemplate: function() {
this.render('user-notification-history', {into: 'user', outlet: 'userOutlet'});
}
});