diff --git a/app/components/ccdb-pagination.js b/app/components/ccdb-pagination.js new file mode 100644 index 0000000..1ef4a00 --- /dev/null +++ b/app/components/ccdb-pagination.js @@ -0,0 +1,5 @@ +import Ember from 'ember'; + +export default Ember.Component.extend({ + classNames: ['row'], +}); diff --git a/app/components/ccdb-table.js b/app/components/ccdb-table.js index 328b9d3..fce3474 100644 --- a/app/components/ccdb-table.js +++ b/app/components/ccdb-table.js @@ -8,6 +8,8 @@ export default Component.extend({ columns: null, table: null, + classNames: ['row'], + init() { this._super(...arguments); const table = new Table(this.get('columns'), this.get('model')); diff --git a/app/components/filter-collections.js b/app/components/filter-collections.js new file mode 100644 index 0000000..16e66b5 --- /dev/null +++ b/app/components/filter-collections.js @@ -0,0 +1,5 @@ +import Ember from 'ember'; + +export default Ember.Component.extend({ + tagName: 'form', +}); diff --git a/app/router.js b/app/router.js index 3234f26..03cadfc 100644 --- a/app/router.js +++ b/app/router.js @@ -9,7 +9,10 @@ const Router = Ember.Router.extend({ Router.map(function() { this.route('login'); this.route('logout'); - this.route('collections'); + this.route('collections', function() { + this.route('1'); + this.route('new'); + }); }); export default Router; diff --git a/app/routes/collections/1.js b/app/routes/collections/1.js new file mode 100644 index 0000000..26d9f31 --- /dev/null +++ b/app/routes/collections/1.js @@ -0,0 +1,4 @@ +import Ember from 'ember'; + +export default Ember.Route.extend({ +}); diff --git a/app/routes/collections.js b/app/routes/collections/index.js similarity index 100% rename from app/routes/collections.js rename to app/routes/collections/index.js diff --git a/app/routes/collections/new.js b/app/routes/collections/new.js new file mode 100644 index 0000000..26d9f31 --- /dev/null +++ b/app/routes/collections/new.js @@ -0,0 +1,4 @@ +import Ember from 'ember'; + +export default Ember.Route.extend({ +}); diff --git a/app/styles/app.css b/app/styles/app.css index 1a8070d..b74ca4b 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -1,3 +1,14 @@ +.content { + padding-left: 40px; + padding-right: 40px; + padding-top: 20px; + padding-bottom: 20px; +} + +.top-buffer { + padding-top: 20px; +} + .form-signin { max-width: 330px; padding: 15px; diff --git a/app/templates/collections/1.hbs b/app/templates/collections/1.hbs new file mode 100644 index 0000000..7b8bc2c --- /dev/null +++ b/app/templates/collections/1.hbs @@ -0,0 +1,147 @@ +

Collection Detail

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ProjectStudy LocationMethodType# of TrapsStartEndExperiments
PerchlorateRSMTEmbryos2010-06-072010-06-07Perchlorate diel; Perchlorate rescue
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ + +
+
+
+
+ +
+
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExperimentTypeSpeciesSexContainerReplicatesFlaw
Perchlorate diel10 ppm perchlorate, iodide supplementedThreespine sticklebackBoth SexesJar1; 2; 3
Perchlorate diel10 ppm perchlorate, iodide supplementedThreespine sticklebackBoth SexesJar1; 2; 3
Perchlorate diel10 ppm perchlorate, iodide supplementedThreespine sticklebackBoth SexesJar1; 2; 3
Perchlorate diel10 ppm perchlorate, iodide supplementedThreespine sticklebackBoth SexesJar1; 2; 3
Perchlorate diel10 ppm perchlorate, iodide supplementedThreespine sticklebackBoth SexesJar1; 2; 3
Perchlorate diel10 ppm perchlorate, iodide supplementedThreespine sticklebackBoth SexesJar1; 2; 3
+
+
...
+
+
+
diff --git a/app/templates/collections.hbs b/app/templates/collections/index.hbs similarity index 100% rename from app/templates/collections.hbs rename to app/templates/collections/index.hbs diff --git a/app/templates/collections/new.hbs b/app/templates/collections/new.hbs new file mode 100644 index 0000000..10dac87 --- /dev/null +++ b/app/templates/collections/new.hbs @@ -0,0 +1,130 @@ +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
diff --git a/app/templates/components/ccdb-pagination.hbs b/app/templates/components/ccdb-pagination.hbs new file mode 100644 index 0000000..15bd26e --- /dev/null +++ b/app/templates/components/ccdb-pagination.hbs @@ -0,0 +1,36 @@ +
+
+ Showing 1-100 of 102 entries +
+
+ +
+
diff --git a/app/templates/components/collections-container.hbs b/app/templates/components/collections-container.hbs index b6a7d07..cef684c 100644 --- a/app/templates/components/collections-container.hbs +++ b/app/templates/components/collections-container.hbs @@ -1 +1,5 @@ +{{#link-to "collections.new" class="btn btn-default"}}New Collection{{/link-to}} +
+{{filter-collections}} +{{ccdb-pagination}} {{ccdb-table model=model columns=columns}} diff --git a/app/templates/components/filter-collections.hbs b/app/templates/components/filter-collections.hbs new file mode 100644 index 0000000..f1f9fb8 --- /dev/null +++ b/app/templates/components/filter-collections.hbs @@ -0,0 +1,73 @@ +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+
+ + + +
+
+
+
diff --git a/ember-cli-build.js b/ember-cli-build.js index 2e0af58..3fb70dd 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -11,7 +11,6 @@ module.exports = function(defaults) { }); app.import('bower_components/bootstrap/dist/css/bootstrap.min.css'); - app.import('bower_components/bootstrap/dist/css/bootstrap-theme.min.css'); return app.toTree(); }; diff --git a/tests/integration/components/ccdb-pagination-test.js b/tests/integration/components/ccdb-pagination-test.js new file mode 100644 index 0000000..2297928 --- /dev/null +++ b/tests/integration/components/ccdb-pagination-test.js @@ -0,0 +1,25 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('ccdb-pagination', 'Integration | Component | ccdb pagination', { + integration: true +}); + +test('it renders', function(assert) { + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{ccdb-pagination}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#ccdb-pagination}} + template block text + {{/ccdb-pagination}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/integration/components/filter-collections-test.js b/tests/integration/components/filter-collections-test.js new file mode 100644 index 0000000..db25d68 --- /dev/null +++ b/tests/integration/components/filter-collections-test.js @@ -0,0 +1,25 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('filter-collections', 'Integration | Component | filter collections', { + integration: true +}); + +test('it renders', function(assert) { + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{filter-collections}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#filter-collections}} + template block text + {{/filter-collections}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/unit/routes/collections/1-test.js b/tests/unit/routes/collections/1-test.js new file mode 100644 index 0000000..713679d --- /dev/null +++ b/tests/unit/routes/collections/1-test.js @@ -0,0 +1,11 @@ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('route:collections/1', 'Unit | Route | collections/1', { + // Specify the other units that are required for this test. + // needs: ['controller:foo'] +}); + +test('it exists', function(assert) { + let route = this.subject(); + assert.ok(route); +}); diff --git a/tests/unit/routes/collections/new-test.js b/tests/unit/routes/collections/new-test.js new file mode 100644 index 0000000..1784b29 --- /dev/null +++ b/tests/unit/routes/collections/new-test.js @@ -0,0 +1,11 @@ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('route:collections/new', 'Unit | Route | collections/new', { + // Specify the other units that are required for this test. + // needs: ['controller:foo'] +}); + +test('it exists', function(assert) { + let route = this.subject(); + assert.ok(route); +});