mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-19 03:52:25 -05:00
be9feeb918
This is a lot simpler and removes the need for stubbing singletons in unit tests.
24 lines
648 B
JavaScript
24 lines
648 B
JavaScript
import ObjectController from 'discourse/controllers/object';
|
|
|
|
// Lists of topics on a user's page.
|
|
export default ObjectController.extend({
|
|
needs: ["application", "user"],
|
|
hideCategory: false,
|
|
showParticipants: false,
|
|
|
|
_showFooter: function() {
|
|
this.set("controllers.application.showFooter", !this.get("canLoadMore"));
|
|
}.observes("canLoadMore"),
|
|
|
|
actions: {
|
|
loadMore: function() {
|
|
this.get('model').loadMore();
|
|
}
|
|
},
|
|
|
|
showNewPM: function(){
|
|
return this.get('controllers.user.viewingSelf') &&
|
|
Discourse.User.currentProp('can_send_private_messages');
|
|
}.property('controllers.user.viewingSelf'),
|
|
|
|
});
|