super(options)\r
\r
render: () ->\r
- i = new Pettanr.AppHelperImg({src: @icon_file_name(), size: @icon_size()})\r
- this.$el.html(i.render().el)\r
+ icon = new Pettanr.Image.SymbolImg({\r
+ class_name: 'face', \r
+ attr: {\r
+ src: @icon_file_name()\r
+ }\r
+ })\r
+ a = new Tag.A({\r
+ attr: {href: @url()}, \r
+ content: icon.render().el\r
+ })\r
+ this.$el.html(a.render().el)\r
+ @delegateEvents({\r
+ 'click .face': 'profiler'\r
+ })\r
this\r
\r
- path_name: () ->\r
- '/' + @manifest().item_class.path_name() + '/' + @item.get('id').toString() + '.prof'\r
- \r
- item_template_file_name: () ->\r
- 'default'\r
+ url: () ->\r
+ controller = Manifest.manifest().controllers[@item.table_name()]\r
+ action = controller.actions['show']\r
+ params = {\r
+ controller: controller,\r
+ action: action,\r
+ id: @item.get('id'),\r
+ format: 'prof'\r
+ }\r
+ '/' + action.url(params)\r
\r
icon_file_name: () ->\r
'/images/prof.gif'\r
\r
- icon_size: () ->\r
- Manifest.manifest().magic_numbers['thumbnail_width']\r
- \r
is_visible: () ->\r
true\r
\r