- symbol_option: (cb) ->\r
- this.fetch({cache: true}).done =>\r
- cb(@tmb_opt_img_tag())\r
- \r
- revision: () ->\r
- new Pettanr.OriginalPicture.Head({original_picture: this})\r
- \r
- history: () ->\r
- new Pettanr.OriginalPicture.History({original_picture: this})\r
+ filer_caption: (context, options) ->\r
+ controller = Manifest.manifest().controllers['original_pictures']\r
+ action = controller.actions['history']\r
+ list = action.find(id: @get('id'))\r
+ list.open(this, {\r
+ success: (pictures) => \r
+ caption = if _.isEmpty(pictures)\r
+ 'unpublished'\r
+ else\r
+ head = _.first(pictures)\r
+ Pettanr.to_s(head.get('revision'))\r
+ options.success.call(context, caption)\r
+ fail: (response, opt) =>\r
+ options.fail.call(context, response, opt)\r
+ })\r