Commit e581c638 authored by Bertrand PINEL's avatar Bertrand PINEL

Add Bootstrp and model table to make things look better

parent 5aad4d27
import Ember from 'ember';
export default Ember.Controller.extend({
rackTableColumns: Ember.computed(function() {
var col = Ember.A([
propertyName: "name",
title: "Name"
propertyName: 'nbColumns',
title: 'Nombre de colonnes',
propertyName: 'nbRows',
title: 'Nombre de lignes',
"template": "customcell/imagecell",
title: 'Image',
return col;
rackTableContent: Ember.computed(function() {
return this.get("model");
<h1>Ember Cellar</h1> <div class="container">
<div class="page-header">
<h1>Ember Cellar</h1>
<p class="lead">Basic layout using Bootstrap for a simple wine application</p>
{{!`record` - row from model, current column is available as `column`}}
<img src='{{record.image}}' height="128" width="128"/>
<h2>List of Racks</h2> <h2>List of Racks</h2>
<div class="detail"> {{models-table
{{#each model as |rack|}} data=rackTableContent
<article class="listing"> columns=rackTableColumns}}
<div class="detail">
<span>Nb Colums:</span> {{rack.nbColumns}}
<span>Nb Rows:</span> {{rack.nbRows}}
<div class="detail">
<img src={{rack.image}} width='235px' height='235px'/>
{{outlet}} {{outlet}}
...@@ -3,7 +3,11 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); ...@@ -3,7 +3,11 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) { module.exports = function(defaults) {
var app = new EmberApp(defaults, { var app = new EmberApp(defaults, {
// Add options here 'ember-bootstrap': {
'bootstrapVersion': 3,
'importBootstrapFont': true,
'importBootstrapCSS': true
}); });
// Use `app.import` to add additional libraries to the generated // Use `app.import` to add additional libraries to the generated
import { moduleFor, test } from 'ember-qunit';
moduleFor('controller:racks', 'Unit | Controller | racks', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
// Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.subject();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment