diff --git a/app/pods/protected/strains/show/measurements-table-row/component.js b/app/pods/protected/strains/show/measurements-table-row/component.js
new file mode 100644
index 0000000..f973194
--- /dev/null
+++ b/app/pods/protected/strains/show/measurements-table-row/component.js
@@ -0,0 +1,17 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+ tagName: 'tr',
+ isEditing: false,
+
+ actions: {
+ edit: function() {
+ this.toggleProperty('isEditing');
+ },
+
+ save: function() {
+ this.toggleProperty('isEditing');
+ console.log('saved');
+ }
+ },
+});
diff --git a/app/pods/protected/strains/show/measurements-table-row/template.hbs b/app/pods/protected/strains/show/measurements-table-row/template.hbs
new file mode 100644
index 0000000..b4f258e
--- /dev/null
+++ b/app/pods/protected/strains/show/measurements-table-row/template.hbs
@@ -0,0 +1,37 @@
+{{#if isEditing}}
+
+ {{input value='Foo'}}
+ |
+
+ {{input value='Bar'}}
+ |
+
+ {{input value='Baz'}}
+ |
+ {{#if canEdit}}
+
+
+ |
+ {{/if}}
+{{else}}
+
+ {{#link-to 'protected.characteristics.show' row.characteristic.id}}
+ {{{row.characteristic.characteristicName}}}
+ {{/link-to}}
+ |
+
+ {{row.measurement.value}}
+ |
+
+ {{row.measurement.notes}}
+ |
+ {{#if canEdit}}
+
+
+ |
+ {{/if}}
+{{/if}}
diff --git a/app/pods/protected/strains/show/measurements-table/template.hbs b/app/pods/protected/strains/show/measurements-table/template.hbs
index 188ac47..c00490d 100644
--- a/app/pods/protected/strains/show/measurements-table/template.hbs
+++ b/app/pods/protected/strains/show/measurements-table/template.hbs
@@ -1,27 +1,34 @@
{{#if measurementsPresent}}
+
+ {{#if canEdit}}
+
+
+
+
+ {{else}}
+
+
+
+ {{/if}}
+
Characteristic |
Value |
Notes |
+ {{#if canEdit}}
+ Edit |
+ {{/if}}
{{#each measurementsTable as |row|}}
-
-
- {{#link-to 'protected.characteristics.show' row.characteristic.id}}
- {{{row.characteristic.characteristicName}}}
- {{/link-to}}
- |
-
- {{row.measurement.value}}
- |
-
- {{row.measurement.notes}}
- |
-
+ {{
+ protected/strains/show/measurements-table-row
+ row=row
+ canEdit=canEdit
+ }}
{{/each}}
diff --git a/app/pods/protected/strains/show/template.hbs b/app/pods/protected/strains/show/template.hbs
index cf07781..dbe09fe 100644
--- a/app/pods/protected/strains/show/template.hbs
+++ b/app/pods/protected/strains/show/template.hbs
@@ -73,7 +73,11 @@
- Characteristics
-
- {{protected/strains/show/measurements-table model=model}}
+ {{
+ protected/strains/show/measurements-table
+ model=model
+ canEdit=false
+ }}
diff --git a/app/pods/protected/strains/strain-form/template.hbs b/app/pods/protected/strains/strain-form/template.hbs
index 79acd02..8260411 100644
--- a/app/pods/protected/strains/strain-form/template.hbs
+++ b/app/pods/protected/strains/strain-form/template.hbs
@@ -49,6 +49,13 @@
+
+ {{
+ protected/strains/show/measurements-table
+ model=strain
+ canEdit=strain.canEdit
+ }}
+
Cancel
diff --git a/app/styles/app.css b/app/styles/app.css
index 332f3c8..4116537 100644
--- a/app/styles/app.css
+++ b/app/styles/app.css
@@ -1,3 +1,10 @@
+input[type="text"] {
+ width: 100%;
+ box-sizing: border-box;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing: border-box;
+}
+
.ql-editor {
font-size: 18px;
}