145 lines
3.7 KiB
Handlebars
145 lines
3.7 KiB
Handlebars
<div class="span-1">
|
|
<fieldset class="flakes-information-box {{if isEditing 'is-editing'}}">
|
|
<legend>
|
|
Strain
|
|
{{#if isEditing}}
|
|
{{input value=strain.strainName}}
|
|
{{else}}
|
|
{{strain.strainNameMU}}
|
|
{{/if}}
|
|
{{display-errors a=strain.errors.strainName}}
|
|
</legend>
|
|
|
|
{{! ROW 1 }}
|
|
<div class="grid-4 gutter-50">
|
|
<dl class="span-2">
|
|
<dt>Species</dt>
|
|
<dd>
|
|
{{#if isEditing}}
|
|
{{
|
|
select-2
|
|
content=species
|
|
optionLabelPath="speciesName"
|
|
value=strain.species
|
|
}}
|
|
{{else}}
|
|
{{#link-to 'species.show' strain.species}}
|
|
<em>{{strain.species.speciesName}}</em>
|
|
{{/link-to}}
|
|
{{/if}}
|
|
</dd>
|
|
</dl>
|
|
<dl class="span-2">
|
|
<dt>Type Strain?</dt>
|
|
<dd>
|
|
{{#if isEditing}}
|
|
{{input type="checkbox" checked=strain.typeStrain}}
|
|
{{/if}}
|
|
{{if strain.typeStrain 'Yes' 'No'}}
|
|
{{display-errors a=strain.errors.typeStrain}}
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
{{! ROW 2 }}
|
|
<div class="grid-6">
|
|
<dl class="span-2">
|
|
<dt>Accession Numbers</dt>
|
|
<dd>
|
|
{{#if isEditing}}
|
|
{{input value=strain.accessionNumbers}}
|
|
{{else}}
|
|
{{strain.accessionNumbers}}
|
|
{{/if}}
|
|
{{display-errors a=strain.errors.accessionNumbers}}
|
|
</dd>
|
|
</dl>
|
|
<dl class="span-2">
|
|
<dt>Genbank</dt>
|
|
<dd>
|
|
{{#if isEditing}}
|
|
{{input value=strain.genbank}}
|
|
{{else}}
|
|
{{genbank-url genbank=strain.genbank}}
|
|
{{/if}}
|
|
{{display-errors a=strain.errors.genbank}}
|
|
</dd>
|
|
</dl>
|
|
<dl class="span-2">
|
|
<dt>Whole Genome Sequence</dt>
|
|
<dd>
|
|
{{#if isEditing}}
|
|
{{input value=strain.wholeGenomeSequence}}
|
|
{{else}}
|
|
{{strain.wholeGenomeSequence}}
|
|
{{/if}}
|
|
{{display-errors a=strain.errors.wholeGenomeSequence}}
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
{{! ROW 3 }}
|
|
<div class="grid-4">
|
|
<dl class="span-4">
|
|
<dt>Isolated From</dt>
|
|
<dd>
|
|
{{#if isEditing}}
|
|
{{textarea value=strain.isolatedFrom cols="70" rows="3"}}
|
|
{{else}}
|
|
{{strain.isolatedFrom}}
|
|
{{/if}}
|
|
{{display-errors a=strain.errors.isolatedFrom}}
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
{{! ROW 4 }}
|
|
<div class="grid-4">
|
|
<dl class="span-4">
|
|
<dt>Notes</dt>
|
|
<dd>
|
|
{{#if isEditing}}
|
|
{{textarea value=strain.notes cols="70" rows="3"}}
|
|
{{else}}
|
|
{{strain.notes}}
|
|
{{/if}}
|
|
{{display-errors a=strain.errors.notes}}
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
{{! ROW 5 }}
|
|
<div class="grid-4">
|
|
<dl class="span-1">
|
|
<dt>Record Created</dt>
|
|
<dd>{{null-time strain.createdAt 'LL'}}</dd>
|
|
</dl>
|
|
<dl class="span-1">
|
|
<dt>Record Updated</dt>
|
|
<dd>{{null-time strain.updatedAt 'LL'}}</dd>
|
|
</dl>
|
|
<dl class="span-1">
|
|
<dt>Record Deleted</dt>
|
|
<dd>{{null-time strain.deletedAt 'LL'}}</dd>
|
|
</dl>
|
|
<dl class="span-1"></dl>
|
|
</div>
|
|
|
|
{{! ROW 6 }}
|
|
{{#if canEdit}}
|
|
<div class="grid-4">
|
|
<div class="span-1">
|
|
{{! Does nothing ATM }}
|
|
<a class="smaller {{if isEditing 'button-red' 'button-gray'}}" {{action 'cancel'}}>
|
|
{{#if isEditing}}Cancel{{else}}Edit{{/if}}
|
|
</a>
|
|
{{#if isEditing}}
|
|
<a class="button-green smaller" {{action 'save'}}>
|
|
Save
|
|
</a>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
</fieldset>
|
|
</div>
|