travis-web/app/routes/build.coffee
Piotr Sarnacki dfc22014a8 Set page titles relevant to page is loaded
I used ember-cli-document-title addon.
2015-02-17 14:35:59 +01:00

29 lines
705 B
CoffeeScript

`import TravisRoute from 'travis/routes/basic'`
Route = TravisRoute.extend
titleToken: (model) ->
"Build ##{model.get('number')}"
serialize: (model, params) ->
id = if model.get then model.get('id') else model
{ build_id: id }
setupController: (controller, model) ->
if model && !model.get
model = @store.recordForId('build', model)
@store.find('build', model)
repo = @controllerFor('repo')
@controllerFor('build').set('build', model)
repo.activate('build')
model: (params) ->
@store.find('build', params.build_id)
deactivate: ->
@controllerFor('job').set('job', null)
@controllerFor('build').set('build', null)
`export default Route`