mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
FIX: Add a title
to the groups pages
This commit is contained in:
parent
b0f7e4ba00
commit
215eae9972
@ -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') });
|
||||
}
|
||||
});
|
||||
|
@ -1 +1 @@
|
||||
empty
|
||||
empty
|
||||
|
@ -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 New Issue
Block a user