1 class Pettanr.OriginalPicture extends Peta.Content
\r
13 is_visible: (operators) ->
\r
17 @get('id') + '.' + @get('ext')
\r
20 'image/' + @get('ext')
\r
23 '/original_pictures/' + @filename()
\r
26 {src: @r_url(), width: @get('width'), height: @get('height')}
\r
28 tmb_opt_img_tag: () ->
\r
29 wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height'))
\r
30 {src: @r_url(), width: wh[0], height: wh[1]}
\r
32 symbol_option: () ->
\r
36 head = @history()[0]
\r
42 is_unpublished: () ->
\r
43 @get('published_at') == null and @get('stopped_at') == null
\r
46 @get('stopped_at') != null
\r
48 is_unlicensed: () ->
\r
49 dt = @get('published_at') || @get('stopped_at')
\r
50 return false if not dt
\r
51 @get('uploaded_at') > dt
\r
54 @get('published_at') != null
\r
60 class Pettanr.OriginalPicture.Collection extends Backbone.Collection
\r
61 model: Pettanr.OriginalPicture
\r
62 url: '/original_pictures'
\r