Genbank URL
This commit is contained in:
parent
559c0a3d9f
commit
e4f01246c2
4 changed files with 31 additions and 1 deletions
10
app/pods/components/genbank-url/component.js
Normal file
10
app/pods/components/genbank-url/component.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'a',
|
||||
attributeBindings: ['href', 'target'],
|
||||
href: function() {
|
||||
return 'http://www.ncbi.nlm.nih.gov/nucleotide/' + this.get('genbank');
|
||||
}.property(),
|
||||
target: '_blank',
|
||||
});
|
1
app/pods/components/genbank-url/template.hbs
Normal file
1
app/pods/components/genbank-url/template.hbs
Normal file
|
@ -0,0 +1 @@
|
|||
{{genbank}}
|
|
@ -61,7 +61,7 @@
|
|||
{{#if isEditing}}
|
||||
{{input value=strain.genbank}}
|
||||
{{else}}
|
||||
{{strain.genbank}}
|
||||
{{genbank-url genbank=strain.genbank}}
|
||||
{{/if}}
|
||||
{{display-errors a=strain.errors.genbank}}
|
||||
</dd>
|
||||
|
|
Reference in a new issue