diff --git a/app/components/scientific-name.js b/app/components/scientific-name.js
new file mode 100644
index 0000000..26c2df5
--- /dev/null
+++ b/app/components/scientific-name.js
@@ -0,0 +1,8 @@
+import Ember from 'ember';
+import layout from '../templates/components/scientific-name';
+
+export default Ember.Component.extend({
+ layout: layout,
+ tagName: 'span',
+ strain: null, // passed in
+});
diff --git a/app/controllers/strains/index.js b/app/controllers/strains/index.js
index 09496c9..86fd495 100644
--- a/app/controllers/strains/index.js
+++ b/app/controllers/strains/index.js
@@ -1,5 +1,5 @@
import SortableController from '../sortable';
export default SortableController.extend({
- sortBy: 'strainName',
+ sortBy: 'fullName',
});
diff --git a/app/models/strain.js b/app/models/strain.js
index 293cc9f..74503ee 100644
--- a/app/models/strain.js
+++ b/app/models/strain.js
@@ -12,5 +12,8 @@ export default DS.Model.extend({
createdAt: DS.attr('date'),
updatedAt: DS.attr('date'),
deletedAt: DS.attr('date'),
- totalMeasurements: DS.attr('number')
+ totalMeasurements: DS.attr('number'),
+ fullName: Ember.computed('speciesName', 'strainName', function() {
+ return this.get('speciesName') + ' (' + this.get('strainName') + ')';
+ })
});
diff --git a/app/templates/characteristics/index.hbs b/app/templates/characteristics/index.hbs
index b882ae1..fbd2d23 100644
--- a/app/templates/characteristics/index.hbs
+++ b/app/templates/characteristics/index.hbs
@@ -1,4 +1,4 @@
-
Hymenobacter Characteristics
+Hymenobacter Characteristics
Total characteristics: {{controller.length}}
diff --git a/app/templates/components/scientific-name.hbs b/app/templates/components/scientific-name.hbs
new file mode 100644
index 0000000..4683ffa
--- /dev/null
+++ b/app/templates/components/scientific-name.hbs
@@ -0,0 +1 @@
+{{strain.speciesName}} (strain {{strain.strainName}})
diff --git a/app/templates/strains/index.hbs b/app/templates/strains/index.hbs
index 10d5fd4..b84fce6 100644
--- a/app/templates/strains/index.hbs
+++ b/app/templates/strains/index.hbs
@@ -1,17 +1,21 @@
-Hymenobacter Strains
+Hymenobacter Strains
Total strains: {{controller.length}}
- Name |
+ Name |
Measurements |
{{#each strain in controller}}
- {{link-to strain.strainName 'measurements' strain}} |
+
+ {{#link-to 'measurements' strain}}
+ {{scientific-name strain=strain}}
+ {{/link-to}}
+ |
{{strain.totalMeasurements}} |
{{/each}}
diff --git a/app/templates/strains/show.hbs b/app/templates/strains/show.hbs
index 0c10449..4a06500 100644
--- a/app/templates/strains/show.hbs
+++ b/app/templates/strains/show.hbs
@@ -1,12 +1,12 @@