travis-web/assets/scripts/app/views/left.coffee

21 lines
521 B
CoffeeScript

@Travis.reopen
ReposView: Travis.BasicView.extend
templateName: 'repos/list'
tabBinding: 'controller.tab'
classRecent: (->
'active' if @get('tab') == 'recent'
).property('tab')
classOwned: (->
classes = []
classes.push('active') if @get('tab') == 'owned'
classes.push('display') if @get('controller.currentUser')
classes.join(' ')
).property('tab', 'controller.currentUser')
classSearch: (->
'active' if @get('tab') == 'search'
).property('tab')