1 class Pettanr.Views.PanelPicture.ShowModule
\r
2 class Pettanr.Views.PanelPicture.ShowModule.Header extends Pettanr.Views.Show.Header
\r
4 initialize: (options) ->
\r
7 class Pettanr.Views.PanelPicture.Show extends Backbone.View
\r
11 initialize: (options) ->
\r
12 @item = options.item
\r
13 @operators = options.operators
\r
14 icon_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id')})
\r
15 caption_url = icon_url
\r
16 prof_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id'), format: 'prof'})
\r
17 @header = new Pettanr.Views.PanelPicture.ShowModule.Header({
\r
19 operators: @operators,
\r
20 caption: @item.get('caption'),
\r
22 caption_url: caption_url,
\r
25 @panel = @item.panel({with_elements: true})
\r
26 @panel.fetch({cache: false}).done => # with elements
\r
27 @author = new Pettanr.Views.Show.HeaderAuthor({item: @panel})
\r
28 @body = new Pettanr.Views.Panel.Body({
\r
30 operators: @operators,
\r
33 @credits = new Pettanr.Views.Panel.Show.Credits({panel: @panel})
\r
34 rb = new Tag.RowBreak()
\r
35 this.$el.append(rb.render().el)
\r
40 this.$el.append(@header.render().el)
\r
41 this.$el.append(@author.render().el)
\r
42 this.$el.append(@body.render().el)
\r
43 this.$el.append(@credits.render().el)
\r