mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: Add a title
to the groups pages
This commit is contained in:
parent
b0f7e4ba00
commit
215eae9972
5 changed files with 22 additions and 12 deletions
|
@ -1,4 +1,9 @@
|
|||
export default Discourse.Route.extend({
|
||||
|
||||
titleToken() {
|
||||
return I18n.t('groups.members');
|
||||
},
|
||||
|
||||
model() {
|
||||
return this.modelFor("group");
|
||||
},
|
||||
|
|
|
@ -2,6 +2,10 @@ export function buildGroupPage(type) {
|
|||
return Discourse.Route.extend({
|
||||
type,
|
||||
|
||||
titleToken() {
|
||||
return I18n.t(`groups.${type}`);
|
||||
},
|
||||
|
||||
model() {
|
||||
return this.modelFor("group").findPosts({ type });
|
||||
},
|
||||
|
|
|
@ -2,25 +2,25 @@ import Group from 'discourse/models/group';
|
|||
|
||||
export default Discourse.Route.extend({
|
||||
|
||||
model: function(params) {
|
||||
titleToken() {
|
||||
return [ this.modelFor('group').get('name') ];
|
||||
},
|
||||
|
||||
model(params) {
|
||||
return Group.find(params.name);
|
||||
},
|
||||
|
||||
serialize: function(model) {
|
||||
serialize(model) {
|
||||
return { name: model.get('name').toLowerCase() };
|
||||
},
|
||||
|
||||
afterModel: function(model) {
|
||||
var self = this;
|
||||
return Group.findGroupCounts(model.get('name')).then(function (counts) {
|
||||
self.set('counts', counts);
|
||||
afterModel(model) {
|
||||
return Group.findGroupCounts(model.get('name')).then(counts => {
|
||||
this.set('counts', counts);
|
||||
});
|
||||
},
|
||||
|
||||
setupController: function(controller, model) {
|
||||
controller.setProperties({
|
||||
model: model,
|
||||
counts: this.get('counts')
|
||||
});
|
||||
setupController(controller, model) {
|
||||
controller.setProperties({ model, counts: this.get('counts') });
|
||||
}
|
||||
});
|
||||
|
|
|
@ -388,6 +388,7 @@ en:
|
|||
selector_placeholder: "Add members"
|
||||
owner: "owner"
|
||||
visible: "Group is visible to all users"
|
||||
index: "Groups"
|
||||
title:
|
||||
one: "group"
|
||||
other: "groups"
|
||||
|
|
Loading…
Reference in a new issue