Refactored users/edit
This commit is contained in:
parent
b742ddbb51
commit
1dd0910ed1
13 changed files with 92 additions and 65 deletions
|
@ -5,7 +5,9 @@ const { Component, computed, inject: { service } } = Ember;
|
|||
export default Component.extend({
|
||||
currentUser: service('session-account'),
|
||||
|
||||
isUser: computed('model.id', 'currentUser.account.id', function() {
|
||||
return this.get('model.id') === this.get('currentUser.account.id');
|
||||
user: null,
|
||||
|
||||
isUser: computed('user.id', 'currentUser.account.id', function() {
|
||||
return this.get('user.id') === this.get('currentUser.account.id');
|
||||
}),
|
||||
});
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
{{/if}}
|
||||
|
||||
<div class="span-1">
|
||||
{{#if model.canEdit}}
|
||||
{{#if user.canEdit}}
|
||||
{{#link-to 'protected.users.edit' user.id class="button-gray smaller"}}
|
||||
Edit
|
||||
{{/link-to}}
|
||||
|
|
Reference in a new issue