class Pettanr.View.Show extends Pettanr.View tagName: 'div' className: 'show' constructor: (@item, options) -> super(options) default_header_options: () -> { face: { click: () => @trigger('http_get', @item.show_url()) }, label: { click: () => @trigger('http_get', @item.show_url()) }, prof: { click: () => @trigger('http_get', @item.prof_url()) }, } binder_header_options: () -> { face: { click: () => @trigger('http_get', @item.show_url()) }, label: { url: @item.play_url(), click: () => @trigger('http_get', @item.play_url()) }, prof: { click: () => @trigger('http_get', @item.prof_url()) }, } default_footer_options: () -> { actions: { edit: { click: () => @trigger('http_get', @item.edit_url()) }, destroy: { click: () => redirect = (url) => @trigger('http_get', url) Pettanr.Proxy.destroy(@item, {redirect: redirect}) }, }, } edit_only_footer_options: () -> { actions: { edit: { click: () => @trigger('http_get', @item.edit_url()) }, }, } add_credits: (options = {icon: true}) -> @credits = new Pettanr.View.Credits(this, options) @listenTo(@credits, 'click:credit:icon', @click_credit_icon) this.$el.append(@credits.render().el) @append_rb() @credits.push(@panel.licensed_pictures()) add_credit: (picture, options = {icon: true}) -> credit = new Pettanr.View.Credit(picture, options) this.$el.append(credit.render().el) @listenTo(credit, 'click:icon', @click_credit_icon) @append_rb() click_authored_by: (author) -> @trigger('http_get', author.show_url()) click_credit_icon: (item) -> @trigger('http_get', item.show_url())