class Pettanr.Views.Sheet.ShowModule class Pettanr.Views.Sheet.ShowModule.Header extends Pettanr.Views.Show.Header initialize: (options) -> super(options) class Pettanr.Views.Sheet.ShowModule.Owner extends Pettanr.Views.Show.Owner initialize: (options) -> super(options) class Pettanr.Views.Sheet.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 = Pettanr.url(@item.table_name(), 'play', {id: @item.get('id')}) prof_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id'), format: 'prof'}) @header = new Pettanr.Views.Sheet.ShowModule.Header({ item: @item, caption: @item.get('caption'), operators: @operators, icon_url: icon_url, caption_url: caption_url, prof_url: prof_url }) @author = new Pettanr.Views.Show.HeaderAuthor({item: @item}) @owner = new Pettanr.Views.Sheet.ShowModule.Owner({item: @item, operators: @operators}) render: () -> this.$el.html('') this.$el.append(@header.render().el) this.$el.append(@author.render().el) this.$el.append(@owner.render().el) if @item.is_own(@operators) this