Refactor users/index

This commit is contained in:
Matthew Dillon 2015-11-05 17:48:58 -07:00
parent 2d7d22f847
commit e6510992dc
5 changed files with 49 additions and 33 deletions

View file

@ -0,0 +1,7 @@
import Ember from 'ember';
const { Component } = Ember;
export default Component.extend({
users: null,
});

View file

@ -0,0 +1,33 @@
<h3 id="total-users">Total users: {{users.length}}</h3>
<table class="flakes-table">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Role</th>
<th>Date Registered</th>
</tr>
</thead>
<tbody>
{{#each users as |user|}}
<tr>
<td>
{{#link-to 'protected.users.show' user}}
{{user.name}}
{{/link-to}}
</td>
<td>
{{user.email}}
</td>
<td>
{{user.fullRole}}
</td>
<td>
{{null-time user.createdAt 'LL'}}
</td>
</tr>
{{/each}}
</tbody>
</table>