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({
|
||||
sortProperties: ['name'],
|
||||
refreshingAutoGroups: false,
|
||||
isAuto: function(){
|
||||
return this.get('type') === 'automatic';
|
||||
}.property('type'),
|
||||
|
||||
actions: {
|
||||
refreshAutoGroups: function(){
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
export default Discourse.Route.extend({
|
||||
model(params) {
|
||||
this.set("type", params.type);
|
||||
return Discourse.Group.findAll().then(function(groups) {
|
||||
return groups.filterBy("type", params.type);
|
||||
});
|
||||
},
|
||||
|
||||
setupController(controller, model){
|
||||
controller.set("type", this.get("type"));
|
||||
controller.set("model", model);
|
||||
},
|
||||
|
||||
actions: {
|
||||
newGroup() {
|
||||
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>
|
||||
<div class='controls'>
|
||||
{{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}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue