UX: add link to group member from groups admin page

UX: remove uneeded refresh button from custom groups
This commit is contained in:
Sam 2015-04-10 09:49:26 +10:00
parent eed8ddbb5c
commit e143eb595f
4 changed files with 12 additions and 1 deletions

View File

@ -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(){

View File

@ -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;

View File

@ -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}}

View File

@ -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>