Still redirect to getting started, but render it in 'main' outlet

Rendering views outside of routes cycle seems problematic at the moment,
so redirection is our best bet. However, the way I initially did it in
cc90200 causes problems for people who don't have any own repositories
set up for Travis CI, but still want to log in and browse around -
rendering getting started page as a full page hides left sidebar with a
list of repositories.

This commit changes getting started page to render in the main outlet,
just as before redirection changes.
This commit is contained in:
Piotr Sarnacki 2014-02-17 11:26:25 +01:00
parent cc90200d66
commit 8e040912ec

View File

@ -79,6 +79,7 @@ Travis.Router.reopen
Travis.Router.map ->
@resource 'index', path: '/', ->
@resource 'getting_started'
@route 'current', path: '/'
@resource 'repo', path: '/:owner/:name', ->
@route 'index', path: '/'
@ -93,7 +94,6 @@ Travis.Router.map ->
@resource 'repo.settings', path: '/:owner/:name/settings', ->
@route 'tab', path: ':tab'
@route 'getting_started'
@route 'first_sync'
@route 'stats', path: '/stats'
@route 'auth', path: '/auth'
@ -119,15 +119,8 @@ Travis.SetupLastBuild = Ember.Mixin.create
@render('builds/not_found', into: 'repo', outlet: 'pane')
Travis.GettingStartedRoute = Travis.Route.extend
setupController: ->
$('body').attr('id', 'home')
@container.lookup('controller:repos').activate()
@container.lookup('controller:application').connectLayout 'simple'
@_super.apply(this, arguments)
renderTemplate: ->
@render 'top', outlet: 'top'
@_super.apply(this, arguments)
@render('no_owned_repos')
Travis.FirstSyncRoute = Travis.Route.extend
actions: