travis-web/assets/scripts/app/views/profile-tabs.coffee
2015-02-02 15:55:43 +01:00

23 lines
517 B
CoffeeScript

BasicView = Travis.BasicView
View = BasicView.extend
templateName: 'profile/tabs'
tabBinding: 'controller.tab'
activate: ->
@get('controller').activate(event.target.name)
classHooks: (->
'active' if @get('tab') == 'hooks'
).property('tab')
classUser: (->
'active' if @get('tab') == 'user'
).property('tab')
displayUser: (->
@get('controller.account.login') == @get('controller.user.login')
).property('controller.account.login', 'controller.user.login')
ProfileTabsView = View