Characteristics details

This commit is contained in:
Matthew Dillon 2015-09-08 06:31:57 -07:00
parent ceccf6e536
commit fb296340c3
9 changed files with 48 additions and 53 deletions

View file

@ -0,0 +1,16 @@
import Ember from 'ember';
export default Ember.Component.extend({
measurementsTable: function() {
let measurements = this.get('model.measurements');
let table = [];
measurements.forEach((measurement) => {
let row = {};
row['measurement'] = measurement;
row['strain'] = this.store.peekRecord('strain', measurement.get('strain.id'));
table.push(row);
});
return table;
}.property(),
});

View file

@ -0,0 +1,26 @@
<table class="flakes-table">
<thead>
<tr>
<th>Strain</th>
<th>Value</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
{{#each measurementsTable as |row|}}
<tr>
<td>
{{#link-to 'protected.strains.show' row.strain.id}}
{{{row.strain.strainNameMU}}}
{{/link-to}}
</td>
<td>
{{row.measurement.value}}
</td>
<td>
{{row.measurement.notes}}
</td>
</tr>
{{/each}}
</tbody>
</table>