--- /dev/null
+class Pettanr.Views.Common\r
+class Pettanr.Views.Common.Icon extends Backbone.View\r
+ tagName: 'span'\r
+ \r
+ initialize: (options) ->\r
+ @item = options.item\r
+ @half = options.half\r
+ @icon_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id')})\r
+ @icon = new Pettanr.Image.Icon({item: @item, half: @half})\r
+ @icon_button = new Tag.A({\r
+ attr: {href: '/' + @icon_url}, \r
+ handler_name: @icon_url,\r
+ class_name: 'icon',\r
+ content: @icon.render().el\r
+ })\r
+ \r
+ render: () ->\r
+ this.$el.html(@icon_button.render().el)\r
+ this\r
+ \r