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