Fix up full name, again
This commit is contained in:
parent
c350dd6fcc
commit
9d57e1bbfb
4 changed files with 4 additions and 9 deletions
|
@ -23,12 +23,8 @@ export default Model.extend({
|
||||||
sortOrder : attr('number'),
|
sortOrder : attr('number'),
|
||||||
canEdit : attr('boolean'),
|
canEdit : attr('boolean'),
|
||||||
|
|
||||||
// Used internally for sorting
|
|
||||||
fullName: computed('species', 'strainName', function() {
|
|
||||||
return `${this.get('species.speciesName')} ${this.get('strainNameMU')}`;
|
|
||||||
}),
|
|
||||||
|
|
||||||
fullNameMU: computed('species', 'strainName', function() {
|
fullNameMU: computed('species', 'strainName', function() {
|
||||||
return htmlSafe(`<em>${this.get('species.speciesName')}</em> ${this.get('strainName')}`);
|
const type = this.get('typeStrain') ? '<sup>T</sup>' : '';
|
||||||
|
return htmlSafe(`<em>${this.get('species.speciesName')}</em> ${this.get('strainName')}${type}`);
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{{strain.fullNameMU}}{{{if strain.typeStrain '<sup>T</sup>' ''}}}
|
|
|
@ -6,7 +6,7 @@ const { Component, computed: { sort } } = Ember;
|
||||||
export default Component.extend(SetupMetaData, {
|
export default Component.extend(SetupMetaData, {
|
||||||
strains: null,
|
strains: null,
|
||||||
|
|
||||||
sortParams: ['fullName'],
|
sortParams: ['sortOrder'],
|
||||||
sortedStrains: sort('strains', 'sortParams'),
|
sortedStrains: sort('strains', 'sortParams'),
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{{#link-to 'protected.strains.show' strain classBinding="strain.typeStrain:type-strain"}}
|
{{#link-to 'protected.strains.show' strain classBinding="strain.typeStrain:type-strain"}}
|
||||||
{{full-strain-name strain=strain}}
|
{{strain.fullNameMU}}
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Reference in a new issue