mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: add link to group member from groups admin page
UX: remove uneeded refresh button from custom groups
This commit is contained in:
parent
eed8ddbb5c
commit
e143eb595f
@ -1,6 +1,9 @@
|
|||||||
export default Ember.ArrayController.extend({
|
export default Ember.ArrayController.extend({
|
||||||
sortProperties: ['name'],
|
sortProperties: ['name'],
|
||||||
refreshingAutoGroups: false,
|
refreshingAutoGroups: false,
|
||||||
|
isAuto: function(){
|
||||||
|
return this.get('type') === 'automatic';
|
||||||
|
}.property('type'),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
refreshAutoGroups: function(){
|
refreshAutoGroups: function(){
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
export default Discourse.Route.extend({
|
export default Discourse.Route.extend({
|
||||||
model(params) {
|
model(params) {
|
||||||
|
this.set("type", params.type);
|
||||||
return Discourse.Group.findAll().then(function(groups) {
|
return Discourse.Group.findAll().then(function(groups) {
|
||||||
return groups.filterBy("type", params.type);
|
return groups.filterBy("type", params.type);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setupController(controller, model){
|
||||||
|
controller.set("type", this.get("type"));
|
||||||
|
controller.set("model", model);
|
||||||
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
newGroup() {
|
newGroup() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
@ -1 +1 @@
|
|||||||
{{avatar member imageSize="small"}} {{member.username}} {{#unless automatic}}<a class='remove' {{action "removeMember" member}}>{{fa-icon "times"}}</a>{{/unless}}
|
<a href='{{unbound member.adminPath}}'>{{avatar member imageSize="small"}}</a> {{member.username}} {{#unless automatic}}<a class='remove' {{action "removeMember" member}}>{{fa-icon "times"}}</a>{{/unless}}
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div class='controls'>
|
<div class='controls'>
|
||||||
{{d-button action="newGroup" icon="plus" label="admin.groups.new"}}
|
{{d-button action="newGroup" icon="plus" label="admin.groups.new"}}
|
||||||
|
{{#if controller.isAuto}}
|
||||||
{{d-button action="refreshAutoGroups" icon="refresh" label="admin.groups.refresh" disabled=refreshingAutoGroups}}
|
{{d-button action="refreshAutoGroups" icon="refresh" label="admin.groups.refresh" disabled=refreshingAutoGroups}}
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user