1 class Pettanr.Views.Common
\r
2 class Pettanr.Views.Common.Icon extends Backbone.View
\r
5 initialize: (options) ->
\r
8 @icon_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id')})
\r
9 @icon = new Pettanr.Image.Icon({item: @item, half: @half})
\r
10 @icon_button = new Tag.A({
\r
11 attr: {href: '/' + @icon_url},
\r
12 handler_name: @icon_url,
\r
14 content: @icon.render().el
\r
18 this.$el.html(@icon_button.render().el)
\r