parent
d353dc6e75
commit
4a54813440
6 changed files with 90 additions and 9 deletions
7
app/pods/protected/users/show/controller.js
Normal file
7
app/pods/protected/users/show/controller.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
isUser: Ember.computed('model.id', 'session.currentUser.id', function() {
|
||||
return this.get('model.id') === this.get('session.currentUser.id');
|
||||
}),
|
||||
});
|
|
@ -38,12 +38,20 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<br>
|
||||
{{#link-to 'protected.users.show' model.id class="button-gray smaller"}}
|
||||
Change Password (Does nothing at the moment)
|
||||
{{/link-to}}
|
||||
{{#if model.canEdit}}
|
||||
<br>
|
||||
{{#link-to 'protected.users.edit' model.id class="button-gray smaller"}}
|
||||
Edit
|
||||
{{/link-to}}
|
||||
{{/if}}
|
||||
<div class="grid-2 gutter-20">
|
||||
{{#if isUser}}
|
||||
<div class="span-1">
|
||||
{{#link-to 'protected.users.changepassword' model.id class="button-gray smaller"}}
|
||||
Change Password
|
||||
{{/link-to}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="span-1">
|
||||
{{#if model.canEdit}}
|
||||
{{#link-to 'protected.users.edit' model.id class="button-gray smaller"}}
|
||||
Edit
|
||||
{{/link-to}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in a new issue