Fix caches

This commit is contained in:
Piotr Sarnacki 2015-02-10 10:09:51 +01:00
parent b4e69ea837
commit aacad11258
3 changed files with 7 additions and 3 deletions

View File

@ -3,6 +3,7 @@
`import loadInitializers from 'ember/load-initializers'`
`import config from './config/environment'`
`import mb from 'travis/helpers/mb'`
`import label from 'travis/helpers/label'`
`import travisField from 'travis/helpers/travis-field'`
`import travisErrors from 'travis/helpers/travis-errors'`
@ -15,6 +16,7 @@ Ember.Handlebars.registerHelper('travis-errors', travisErrors)
Ember.Handlebars.registerHelper('tipsy', tipsy)
#Ember.Handlebars.registerHelper('input', input)
Ember.Handlebars.registerHelper('filter-input', filterInput)
Ember.Handlebars.registerBoundHelper('mb', mb)
Ember.MODEL_FACTORY_INJECTIONS = true

View File

@ -1,5 +1,7 @@
helper = Ember.Handlebars.makeBoundHelper (size) ->
`import Ember from "ember"`
fn = (size) ->
if size
(size / 1024 / 1024).toFixed(2)
`export default helper`
`export default fn`

View File

@ -13,7 +13,7 @@
</a>
<ul class="caches-list">
{{#each cache in caches itemController="cacheItem"}}
{{#each cache in caches itemController="cachesItem"}}
<li class="cache-info">
<span class="label">Slug:</span> {{cache.slug}},
<span class="label">Last modified:</span> {{cache.last_modified}},