Create and edit characteristics
This commit is contained in:
parent
fb296340c3
commit
de8ac653f6
14 changed files with 180 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
measurementsPresent: function() {
|
||||
return this.get('model.measurements.length') > 0;
|
||||
}.property('model.measurements'),
|
||||
|
||||
measurementsTable: function() {
|
||||
let measurements = this.get('model.measurements');
|
||||
let table = [];
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{#if measurementsPresent}}
|
||||
<table class="flakes-table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -24,3 +25,6 @@
|
|||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
No measurements on record.
|
||||
{{/if}}
|
||||
|
|
|
@ -7,12 +7,18 @@
|
|||
|
||||
{{! ROW 1 }}
|
||||
<div class="grid-2 gutter-20">
|
||||
<dl class="span-2">
|
||||
<dl class="span-1">
|
||||
<dt>Characteristic Type</dt>
|
||||
<dd>
|
||||
{{model.characteristicTypeName}}
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="span-1">
|
||||
<dt>Sort Order</dt>
|
||||
<dd>
|
||||
{{model.sortOrder}}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{{! ROW 2 }}
|
||||
|
@ -43,3 +49,9 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
{{#if model.canEdit}}
|
||||
<br>
|
||||
{{#link-to 'protected.characteristics.edit' model.id class="button-gray smaller"}}
|
||||
Edit
|
||||
{{/link-to}}
|
||||
{{/if}}
|
||||
|
|
Reference in a new issue