Cleaned up scientific naming.
This commit is contained in:
		
							parent
							
								
									d587f14af4
								
							
						
					
					
						commit
						fdc29a6baa
					
				
					 9 changed files with 49 additions and 12 deletions
				
			
		
							
								
								
									
										8
									
								
								app/components/scientific-name.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								app/components/scientific-name.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -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
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
import SortableController from '../sortable';
 | 
			
		||||
 | 
			
		||||
export default SortableController.extend({
 | 
			
		||||
  sortBy: 'strainName',
 | 
			
		||||
  sortBy: 'fullName',
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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') + ')';
 | 
			
		||||
  })
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
<h2>Hymenobacter Characteristics</h2>
 | 
			
		||||
<h2><em>Hymenobacter</em> Characteristics</h2>
 | 
			
		||||
<h3>Total characteristics: {{controller.length}}</h3>
 | 
			
		||||
 | 
			
		||||
<table class="flakes-table">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								app/templates/components/scientific-name.hbs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								app/templates/components/scientific-name.hbs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
<em>{{strain.speciesName}}</em> (strain {{strain.strainName}})
 | 
			
		||||
| 
						 | 
				
			
			@ -1,17 +1,21 @@
 | 
			
		|||
<h2>Hymenobacter Strains</h2>
 | 
			
		||||
<h2><em>Hymenobacter</em> Strains</h2>
 | 
			
		||||
<h3>Total strains: {{controller.length}}</h3>
 | 
			
		||||
 | 
			
		||||
<table class="flakes-table">
 | 
			
		||||
  <thead>
 | 
			
		||||
    <tr>
 | 
			
		||||
      <th {{action "setSortBy" "strainName"}}>Name</th>
 | 
			
		||||
      <th {{action "setSortBy" "fullName"}}>Name</th>
 | 
			
		||||
      <th {{action "setSortBy" "totalMeasurements"}}>Measurements</th>
 | 
			
		||||
    </tr>
 | 
			
		||||
  </thead>
 | 
			
		||||
  <tbody>
 | 
			
		||||
    {{#each strain in controller}}
 | 
			
		||||
      <tr>
 | 
			
		||||
        <td>{{link-to strain.strainName 'measurements' strain}}</td>
 | 
			
		||||
        <td>
 | 
			
		||||
          {{#link-to 'measurements' strain}}
 | 
			
		||||
            {{scientific-name strain=strain}}
 | 
			
		||||
          {{/link-to}}
 | 
			
		||||
        </td>
 | 
			
		||||
        <td>{{strain.totalMeasurements}}</td>
 | 
			
		||||
      </tr>
 | 
			
		||||
    {{/each}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,12 +1,12 @@
 | 
			
		|||
<div class="grid-1">
 | 
			
		||||
  <div class="span-1">
 | 
			
		||||
    <fieldset class="flakes-information-box">
 | 
			
		||||
      <legend>{{model.strainName}}</legend>
 | 
			
		||||
      <legend>Strain {{model.strainName}}</legend>
 | 
			
		||||
      {{! ROW 1 }}
 | 
			
		||||
      <div class="grid-4">
 | 
			
		||||
        <dl class="span-2">
 | 
			
		||||
          <dt>Species</dt>
 | 
			
		||||
          <dd>{{model.speciesName}}</dd>
 | 
			
		||||
          <dd><em>{{model.speciesName}}</em></dd>
 | 
			
		||||
        </dl>
 | 
			
		||||
        <dl class="span-2">
 | 
			
		||||
          <dt>Type</dt>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue