mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-05-03 17:35:09 -04:00
30 lines
619 B
JavaScript
30 lines
619 B
JavaScript
/**
|
|
A controller for expanding information about a poster.
|
|
|
|
@class PosterExpansion
|
|
@extends Discourse.ObjectController
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.PosterExpansionController = Discourse.ObjectController.extend({
|
|
needs: ['topic'],
|
|
|
|
show: function(user, post) {
|
|
this.setProperties({model: user, post: post});
|
|
},
|
|
|
|
close: function() {
|
|
this.set('model', null);
|
|
},
|
|
|
|
actions: {
|
|
togglePosts: function(user) {
|
|
var postStream = this.get('controllers.topic.postStream');
|
|
postStream.toggleParticipant(user.get('username'));
|
|
this.close();
|
|
}
|
|
}
|
|
|
|
});
|
|
|
|
|