class Pettanr.View.Summary.Binder extends Pettanr.View initialize: (options) -> super(options) @item = options.item @visible_t = options.visible_t @visible_column_name = options.visible_column_name @load() load: () -> @visible = new Tag.Div({ content: Pettanr.AppHelper.t_selected_item(@visible_t, @item.get(@visible_column_name)) }) @item.get_parent('author', this, { success: (@author) => @author_icon_with_caption = @author.icon_with_caption_view(true, 'name', 12) @listenTo(@author_icon_with_caption, 'click', @author_click) @trigger('ready') }) render: () -> this.$el.html('') this.$el.append(@visible.render().el) this.$el.append(@author_icon_with_caption.render().el) this author_click: () -> @trigger('http_get', @author_icon_with_caption.url())