diff --git a/app/pods/protected/species/edit/route.js b/app/pods/protected/species/edit/route.js index 6d09cb9..e9e9076 100644 --- a/app/pods/protected/species/edit/route.js +++ b/app/pods/protected/species/edit/route.js @@ -16,4 +16,9 @@ export default Ember.Route.extend({ } }, + setupController: function(controller, model) { + controller.set('model', model); + controller.set('metaData', this.store.metadataFor('species')); + }, + }); diff --git a/app/pods/protected/species/edit/template.hbs b/app/pods/protected/species/edit/template.hbs index c3b8a05..aa8272e 100644 --- a/app/pods/protected/species/edit/template.hbs +++ b/app/pods/protected/species/edit/template.hbs @@ -1,6 +1,7 @@ {{ protected/species/species-form species=model + metaData=metaData save="save" cancel="cancel" }} diff --git a/app/pods/protected/species/species-form/template.hbs b/app/pods/protected/species/species-form/template.hbs index 011f62f..2b2ae76 100644 --- a/app/pods/protected/species/species-form/template.hbs +++ b/app/pods/protected/species/species-form/template.hbs @@ -11,8 +11,9 @@ {{input type="checkbox" checked=species.typeSpecies}} {{if species.typeSpecies 'Yes' 'No'}} -
-
+ {{#unless species.isNew}} +
+
{{#each species.strains as |strain index|}} {{if index ","}} @@ -20,11 +21,13 @@ {{{strain.strainNameMU}}} {{/link-to}} {{/each}} - {{add-button label="Add Strain" link="protected.strains.new"}} + {{add-button label="Add Strain" link="protected.strains.new" canAdd=metaData.canAdd}}
-
-
+ {{/unless}} + +
+
{{text-editor value=species.etymology}}