1 class Pettanr.OriginalPicture extends Peta.Content
\r
2 url: '/original_pictures/'
\r
15 is_visible: (operators) ->
\r
19 @get('id') + '.' + @get('ext')
\r
22 'image/' + @get('ext')
\r
25 '/original_pictures/' + @filename()
\r
28 {src: @r_url(), width: @get('width'), height: @get('height')}
\r
30 tmb_opt_img_tag: () ->
\r
31 new Pettanr.Picture.SymbolPicture({
\r
38 symbol_option: (cb) ->
\r
40 this.fetch().done ->
\r
41 cb(_this.tmb_opt_img_tag())
\r
44 head = @history()[0]
\r
50 is_unpublished: () ->
\r
51 @get('published_at') == null and @get('stopped_at') == null
\r
54 @get('stopped_at') != null
\r
56 is_unlicensed: () ->
\r
57 dt = @get('published_at') || @get('stopped_at')
\r
58 return false if not dt
\r
59 @get('uploaded_at') > dt
\r
62 @get('published_at') != null
\r
68 class Pettanr.OriginalPicture.Collection extends Backbone.Collection
\r
69 model: Pettanr.OriginalPicture
\r
70 url: '/original_pictures'
\r