Pods, pods, everywhere

This commit is contained in:
Matthew Dillon 2015-06-04 12:18:59 -08:00
parent 33f783bc42
commit e623d52f34
66 changed files with 53 additions and 113 deletions

View 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('strain');
}
});

View file

@ -0,0 +1,30 @@
<h2>{{genus-name}} Strains</h2>
<h3>Total strains: {{controller.length}}</h3>
{{#if (can "add strain")}}
{{! Does nothing ATM }}
{{#link-to 'strains.new' class="button-gray smaller"}}
Add Strain
{{/link-to}}
{{/if}}
<table class="flakes-table">
<thead>
<tr>
<th {{action "setSortBy" "fullName"}}>Name</th>
<th {{action "setSortBy" "totalMeasurements"}}>Total Measurements</th>
</tr>
</thead>
<tbody>
{{#each strain in controller}}
<tr>
<td>
{{#link-to 'strains.show' strain.id}}
{{scientific-name strain=strain}}
{{/link-to}}
</td>
<td>{{strain.totalMeasurements}}</td>
</tr>
{{/each}}
</tbody>
</table>