Pods, pods, everywhere
This commit is contained in:
parent
33f783bc42
commit
e623d52f34
66 changed files with 53 additions and 113 deletions
5
app/pods/characteristics/controller.js
Normal file
5
app/pods/characteristics/controller.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
import SortableController from '../../controllers/sortable';
|
||||
|
||||
export default SortableController.extend({
|
||||
sortBy: 'characteristicName',
|
||||
});
|
8
app/pods/characteristics/route.js
Normal file
8
app/pods/characteristics/route.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import Ember from 'ember';
|
||||
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
|
||||
|
||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||
model: function() {
|
||||
return this.store.findAll('characteristic');
|
||||
}
|
||||
});
|
19
app/pods/characteristics/template.hbs
Normal file
19
app/pods/characteristics/template.hbs
Normal file
|
@ -0,0 +1,19 @@
|
|||
<h2>{{genus-name}} Characteristics</h2>
|
||||
<h3>Total characteristics: {{controller.length}}</h3>
|
||||
|
||||
<table class="flakes-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th {{action "setSortBy" "characteristicName"}}>Name</th>
|
||||
<th {{action "setSortBy" "characteristicType"}}>Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each characteristic in controller}}
|
||||
<tr>
|
||||
<td>{{characteristic.characteristicName}}</td>
|
||||
<td>{{characteristic.characteristicType}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
Reference in a new issue