From f93c4af02994893a1d8dd1c6f12d974a4e4499de Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 20 Nov 2015 19:00:07 -0700 Subject: [PATCH] Hide measurements on new strain Fixes #65 --- .../strains/strain-form/template.hbs | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/app/pods/protected/strains/strain-form/template.hbs b/app/pods/protected/strains/strain-form/template.hbs index 9747a86..e44096f 100644 --- a/app/pods/protected/strains/strain-form/template.hbs +++ b/app/pods/protected/strains/strain-form/template.hbs @@ -53,18 +53,24 @@ -
- {{ - protected/strains/measurements-table - strain=strain - add-characteristic=(action "addCharacteristic") - allCharacteristics=allCharacteristics - save-measurement=(action "saveMeasurement") - delete-measurement=(action "deleteMeasurement") - canEdit=strain.canEdit - canAdd=metaData.canAdd - }} -
+ {{#if isNew}} +
+ Please save before adding measurements +
+ {{else}} +
+ {{ + protected/strains/measurements-table + strain=strain + add-characteristic=(action "addCharacteristic") + allCharacteristics=allCharacteristics + save-measurement=(action "saveMeasurement") + delete-measurement=(action "deleteMeasurement") + canEdit=strain.canEdit + canAdd=metaData.canAdd + }} +
+ {{/if}}
Cancel