Sort meas table in chars

Fixes #13.
This commit is contained in:
Matthew Ryan Dillon 2015-10-19 15:38:59 -07:00
parent f7f04fd25c
commit 0676058276
3 changed files with 34 additions and 19 deletions

View file

@ -1,14 +1,19 @@
{{#if measurementsPresent}}
{{#if paramsChanged}}
<button class="button-gray smaller" {{action 'resetSortParam'}}>
Reset sort
</button>
{{/if}}
<table class="flakes-table">
<thead>
<tr>
<th>Strain</th>
<th>Value</th>
<th>Notes</th>
<th {{action "changeSortParam" "strain.strainName"}} class="click">Strain</th>
<th {{action "changeSortParam" "value"}} class="click">Value</th>
<th {{action "changeSortParam" "notes"}} class="click">Notes</th>
</tr>
</thead>
<tbody>
{{#each measurementsTable as |row|}}
{{#each sortedMeasurements as |row|}}
<tr>
<td>
{{#link-to 'protected.strains.show' row.strain.id}}
@ -16,10 +21,10 @@
{{/link-to}}
</td>
<td>
{{row.measurement.value}}
{{row.value}}
</td>
<td>
{{row.measurement.notes}}
{{row.notes}}
</td>
</tr>
{{/each}}