1 class Locmare.FilerModule.Header extends Backbone.View
\r
4 initialize: (options) ->
\r
5 @filer = options.filer
\r
9 icon = new Pettanr.Image.Icon({item: @model(), half: true})
\r
10 caption = Pettanr.AppHelper.t_m(@model().singular())
\r
11 url = Pettanr.url(@model().table_name(), 'index', {})
\r
12 linked_icon = new Pettanr.Tag.A({
\r
13 attr: {href: url}, handler_name: url, content: icon.render().el
\r
15 linked_caption = new Pettanr.Tag.A({
\r
16 attr: {href: '/' + url}, handler_name: url, content: caption
\r
18 this.$el.append(linked_icon.render().el)
\r
19 this.$el.append(linked_caption.render().el)
\r
26 @model.model_name.human
\r