Pods, pods, everywhere
This commit is contained in:
		
							parent
							
								
									33f783bc42
								
							
						
					
					
						commit
						e623d52f34
					
				
					 66 changed files with 53 additions and 113 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +0,0 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
 | 
			
		||||
export default Ember.Component.extend({
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +0,0 @@
 | 
			
		|||
import SortableController from '../sortable';
 | 
			
		||||
 | 
			
		||||
export default SortableController.extend({
 | 
			
		||||
  sortBy: 'characteristic',
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +0,0 @@
 | 
			
		|||
import SortableController from '../sortable';
 | 
			
		||||
 | 
			
		||||
export default SortableController.extend({
 | 
			
		||||
  sortBy: 'fullName',
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
import DS from 'ember-data';
 | 
			
		||||
import Ember from 'ember';
 | 
			
		||||
import config from '../config/environment';
 | 
			
		||||
import config from '../../config/environment';
 | 
			
		||||
 | 
			
		||||
export default DS.RESTAdapter.extend({
 | 
			
		||||
  namespace: 'api/' + config.genus,
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
import SortableController from '../sortable';
 | 
			
		||||
import SortableController from '../../controllers/sortable';
 | 
			
		||||
 | 
			
		||||
export default SortableController.extend({
 | 
			
		||||
  sortBy: 'characteristicName',
 | 
			
		||||
							
								
								
									
										8
									
								
								app/pods/characteristics/route.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								app/pods/characteristics/route.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
 | 
			
		||||
  model: function() {
 | 
			
		||||
    return this.store.findAll('characteristic');
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
import config from '../config/environment';
 | 
			
		||||
import config from '../../../config/environment';
 | 
			
		||||
 | 
			
		||||
export default Ember.Component.extend({
 | 
			
		||||
  tagName: 'em',
 | 
			
		||||
| 
						 | 
				
			
			@ -1,8 +1,6 @@
 | 
			
		|||
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,4 +1,4 @@
 | 
			
		|||
import SortableController from '../sortable';
 | 
			
		||||
import SortableController from '../../../controllers/sortable';
 | 
			
		||||
 | 
			
		||||
export default SortableController.extend({
 | 
			
		||||
  sortBy: 'speciesName',
 | 
			
		||||
							
								
								
									
										8
									
								
								app/pods/species/index/route.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								app/pods/species/index/route.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
 | 
			
		||||
  model: function() {
 | 
			
		||||
    return this.store.findAll('species');
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
{{
 | 
			
		||||
  species/species-details
 | 
			
		||||
  species-details
 | 
			
		||||
  species=model
 | 
			
		||||
  isEditing=true
 | 
			
		||||
  save="save"
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
{{
 | 
			
		||||
  species/species-details
 | 
			
		||||
  species-details
 | 
			
		||||
  species=model
 | 
			
		||||
  isEditing=isEditing
 | 
			
		||||
  save="save"
 | 
			
		||||
							
								
								
									
										8
									
								
								app/pods/strains/index/route.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								app/pods/strains/index/route.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
 | 
			
		||||
  model: function() {
 | 
			
		||||
    return this.store.findAll('strain');
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -19,7 +19,7 @@
 | 
			
		|||
    {{#each strain in controller}}
 | 
			
		||||
      <tr>
 | 
			
		||||
        <td>
 | 
			
		||||
          {{#link-to 'measurements' strain.id}}
 | 
			
		||||
          {{#link-to 'strains.show' strain.id}}
 | 
			
		||||
            {{scientific-name strain=strain}}
 | 
			
		||||
          {{/link-to}}
 | 
			
		||||
        </td>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
{{
 | 
			
		||||
  strains/strain-details
 | 
			
		||||
  strain-details
 | 
			
		||||
  strain=strain
 | 
			
		||||
  species=species
 | 
			
		||||
  isEditing=true
 | 
			
		||||
| 
						 | 
				
			
			@ -1,12 +1,8 @@
 | 
			
		|||
{{
 | 
			
		||||
  strains/strain-details
 | 
			
		||||
  strain-details
 | 
			
		||||
  strain=strain
 | 
			
		||||
  species=species
 | 
			
		||||
  isEditing=isEditing
 | 
			
		||||
  save="save"
 | 
			
		||||
  cancel="cancel"
 | 
			
		||||
}}
 | 
			
		||||
 | 
			
		||||
<div class="measurements-container">
 | 
			
		||||
  {{outlet}}
 | 
			
		||||
</div>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
import DS from 'ember-data';
 | 
			
		||||
import config from '../config/environment';
 | 
			
		||||
import config from '../../config/environment';
 | 
			
		||||
 | 
			
		||||
export default DS.RESTAdapter.extend({
 | 
			
		||||
  namespace: 'api',
 | 
			
		||||
							
								
								
									
										8
									
								
								app/pods/users/route.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								app/pods/users/route.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
 | 
			
		||||
  model: function() {
 | 
			
		||||
    return this.store.findAll('user');
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -8,18 +8,18 @@ var Router = Ember.Router.extend({
 | 
			
		|||
Router.map(function() {
 | 
			
		||||
  this.route('login');
 | 
			
		||||
  this.route('about');
 | 
			
		||||
  this.resource('species', function() {
 | 
			
		||||
  this.route('characteristics');
 | 
			
		||||
  this.route('users');
 | 
			
		||||
 | 
			
		||||
  this.route('species', function() {
 | 
			
		||||
    this.route('new');
 | 
			
		||||
    this.route('show', { path: ':species_id' });
 | 
			
		||||
    this.route('new');
 | 
			
		||||
  });
 | 
			
		||||
  this.resource('strains', function() {
 | 
			
		||||
  this.route('strains', function() {
 | 
			
		||||
    this.route('new');
 | 
			
		||||
    this.route('show', { path: ':strain_id' }, function() {
 | 
			
		||||
      this.resource('measurements', function() {});
 | 
			
		||||
    });
 | 
			
		||||
    this.route('show', { path: ':strain_id' });
 | 
			
		||||
  });
 | 
			
		||||
  this.resource('characteristics', function() {});
 | 
			
		||||
  this.resource('users', function() {});
 | 
			
		||||
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export default Router;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +0,0 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend({
 | 
			
		||||
  model: function() {
 | 
			
		||||
    return this.store.findAll('characteristic');
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +0,0 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend(AuthenticatedRouteMixin);
 | 
			
		||||
| 
						 | 
				
			
			@ -1,7 +0,0 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend({
 | 
			
		||||
  model: function() {
 | 
			
		||||
    return this.modelFor('strains/show').strain.get('measurements');
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +0,0 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend(AuthenticatedRouteMixin);
 | 
			
		||||
| 
						 | 
				
			
			@ -1,7 +0,0 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend({
 | 
			
		||||
  model: function() {
 | 
			
		||||
    return this.store.findAll('species');
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +0,0 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend(AuthenticatedRouteMixin);
 | 
			
		||||
| 
						 | 
				
			
			@ -1,7 +0,0 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend({
 | 
			
		||||
  model: function() {
 | 
			
		||||
    return this.store.findAll('strain');
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +0,0 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend(AuthenticatedRouteMixin);
 | 
			
		||||
| 
						 | 
				
			
			@ -1,7 +0,0 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
 | 
			
		||||
export default Ember.Route.extend({
 | 
			
		||||
  model: function() {
 | 
			
		||||
    return this.store.findAll('user');
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -1,16 +0,0 @@
 | 
			
		|||
<table class="flakes-table">
 | 
			
		||||
  <thead>
 | 
			
		||||
    <tr>
 | 
			
		||||
      <th {{action "setSortBy" "characteristic"}}>Characteristic</th>
 | 
			
		||||
      <th {{action "setSortBy" "computedType"}}>Measurement Type</th>
 | 
			
		||||
      <th {{action "setSortBy" "computedValue"}}>Measurement</th>
 | 
			
		||||
      <th {{action "setSortBy" "notes"}}>Notes</th>
 | 
			
		||||
      <th {{action "setSortBy" "testMethod"}}>Test Method</th>
 | 
			
		||||
    </tr>
 | 
			
		||||
  </thead>
 | 
			
		||||
  <tbody>
 | 
			
		||||
    {{#each measurement in controller}}
 | 
			
		||||
      {{measurements/measurement-row measurement=measurement}}
 | 
			
		||||
    {{/each}}
 | 
			
		||||
  </tbody>
 | 
			
		||||
</table>
 | 
			
		||||
| 
						 | 
				
			
			@ -1 +0,0 @@
 | 
			
		|||
{{outlet}}
 | 
			
		||||
		Reference in a new issue