From 8e040912ecd7c77a1cc9fd750b2168cfa5bf9a24 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Mon, 17 Feb 2014 11:26:25 +0100 Subject: [PATCH] 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. --- assets/scripts/app/routes.coffee | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/assets/scripts/app/routes.coffee b/assets/scripts/app/routes.coffee index 176890d6..8a8d0fde 100644 --- a/assets/scripts/app/routes.coffee +++ b/assets/scripts/app/routes.coffee @@ -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: