class Pettanr.Views.PanelPicture.ShowModule class Pettanr.Views.PanelPicture.ShowModule.Header extends Pettanr.Views.Show.Header initialize: (options) -> super(options) class Pettanr.Views.PanelPicture.Show extends Backbone.View tagName: 'div' className: 'show' initialize: (options) -> @item = options.item @operators = options.operators icon_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id')}) caption_url = icon_url prof_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id'), format: 'prof'}) @header = new Pettanr.Views.PanelPicture.ShowModule.Header({ item: @item, operators: @operators, caption: @item.get('caption'), icon_url: icon_url, caption_url: caption_url, prof_url: prof_url }) @panel = @item.panel({with_elements: true}) @panel.fetch({cache: false}).done => # with elements @author = new Pettanr.Views.Show.HeaderAuthor({item: @panel}) @body = new Pettanr.Views.Panel.Body({ panel: @panel, operators: @operators, spot: @item }) @credits = new Pettanr.Views.Panel.Show.Credits({panel: @panel}) rb = new Tag.RowBreak() this.$el.append(rb.render().el) @render() render: () -> this.$el.html('') this.$el.append(@header.render().el) this.$el.append(@author.render().el) this.$el.append(@body.render().el) this.$el.append(@credits.render().el) this