Fix profile info tab
This commit is contained in:
parent
e95e679e80
commit
0074acb8fe
|
@ -30,7 +30,7 @@ Travis.StatsLayoutController = Em.Controller.extend()
|
|||
Travis.ProfileLayoutController = Em.Controller.extend()
|
||||
Travis.AuthLayoutController = Em.Controller.extend()
|
||||
|
||||
Travis.ProfileInfoController = Em.Controller.extend
|
||||
Travis.AccountsInfoController = Em.Controller.extend
|
||||
needs: ['currentUser', 'repos']
|
||||
userBinding: 'controllers.currentUser'
|
||||
|
||||
|
|
|
@ -16,7 +16,11 @@ Travis.ProfileController = Travis.Controller.extend
|
|||
@connectTab('user')
|
||||
|
||||
connectTab: (tab) ->
|
||||
viewClass = Travis["#{$.camelize(tab)}View"]
|
||||
if tab == 'user'
|
||||
view = 'AccountsInfoView'
|
||||
else
|
||||
view = "#{$.camelize(tab)}View"
|
||||
viewClass = Travis[view]
|
||||
@set('tab', tab)
|
||||
|
||||
billingUrl: (->
|
||||
|
|
|
@ -429,12 +429,14 @@ Travis.AccountRoute = Travis.Route.extend
|
|||
else
|
||||
{}
|
||||
|
||||
Travis.ProfileInfoRoute = Travis.Route.extend
|
||||
Travis.AccountsInfoRoute = Travis.Route.extend
|
||||
setupController: ->
|
||||
@container.lookup('controller:profile').activate 'user'
|
||||
user = @controllerFor('currentUser').get('model')
|
||||
@controllerFor('account').set('model', user)
|
||||
@controllerFor('profile').activate 'user'
|
||||
|
||||
renderTemplate: ->
|
||||
@render 'user'
|
||||
@render 'accounts_info'
|
||||
|
||||
Travis.AuthRoute = Travis.Route.extend
|
||||
needsAuth: false
|
||||
|
|
|
@ -38,7 +38,7 @@ Travis.reopen
|
|||
Travis.Urls.githubAdmin(@get('hook.slug'))
|
||||
).property('hook.slug')
|
||||
|
||||
UserView: Travis.View.extend
|
||||
AccountsInfoView: Travis.View.extend
|
||||
templateName: 'profile/tabs/user'
|
||||
userBinding: 'controller.user'
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user