Sort by strains and measurements

This commit is contained in:
Matthew Dillon 2015-03-19 13:01:43 -08:00
parent 86b3fb46d7
commit 37becad20a
11 changed files with 95 additions and 18 deletions

View file

@ -1,15 +1,15 @@
<table class="flakes-table">
<thead>
<tr>
<th>Characteristic</th>
<th>Measurement Type</th>
<th>Measurement</th>
<th>Notes</th>
<th>Test Method</th>
<th {{action "setSortBy" "characteristicName"}}>Characteristic</th>
<th {{action "setSortBy" "computedType"}}>Measurement Type</th>
<th {{action "setSortBy" "computedValue"}}>Measurement</th>
<th {{action "setSortBy" "notes"}}>Notes</th>
<th {{action "setSortBy" "testMethod"}}>Test Method</th>
</tr>
</thead>
<tbody>
{{#each model as |measurement|}}
{{#each controller as |measurement|}}
{{measurements/measurement-row measurement=measurement}}
{{/each}}
</tbody>

View file

@ -1,15 +1,15 @@
<h2>Strains</h2>
<h3>Total strains: {{model.length}}</h3>
<h2>Hymenobacter Strains</h2>
<h3>Total strains: {{controller.length}}</h3>
<table class="flakes-table">
<thead>
<tr>
<th>Name</th>
<th>Measurements</th>
<th {{action "setSortBy" "strainName"}}>Name</th>
<th {{action "setSortBy" "totalMeasurements"}}>Measurements</th>
</tr>
</thead>
<tbody>
{{#each strain in model}}
{{#each strain in controller}}
<tr>
<td>{{link-to strain.strainName 'measurements' strain}}</td>
<td>{{strain.totalMeasurements}}</td>