this.$el.html('')\r
icon = new Pettanr.Image.Icon({item: @model(), half: true})\r
caption = Pettanr.AppHelper.t_m(@model().singular())\r
- url = Pettanr.url(@model().table_name(), 'index', {})\r
- linked_icon = new Pettanr.Tag.A({\r
- attr: {href: '/' + url}, handler_name: url, content: icon.render().el\r
+ url = @model().index_url()\r
+ linked_icon = new Tag.A({\r
+ attr: {href: '/' + url}, content: icon.render().el\r
})\r
- linked_caption = new Pettanr.Tag.A({\r
- attr: {href: '/' + url}, handler_name: url, content: caption\r
+ linked_caption = new Tag.A({\r
+ attr: {href: '/' + url}, content: caption\r
})\r
+ @listenTo(linked_icon, 'click', @click)\r
+ @listenTo(linked_caption, 'click', @click)\r
this.$el.append(linked_icon.render().el)\r
this.$el.append(linked_caption.render().el)\r
this\r
human_name: () ->\r
@model.model_name.human\r
\r
+ click: () ->\r
+ @trigger('click', @model().index_url())\r
+ \r