class Pettanr.View extends Backbone.View @rb: (options = null) -> rb = new Tag.RowBreak(options).render().el rb: (options = null) -> @constructor.rb(options) div: (content, options = {}) -> options.content = content new Tag.Span(options) span: (content, options = {}) -> options.content = content new Tag.Div(options) @replace_empty: (caption) -> if Pettanr.is_blank(caption) empty = new Pettanr.View.EmptyDiv() empty.render().el else caption @face_button: (item, image, options = {}) -> icon = new Pettanr.View.Icon(image) new Pettanr.View.Button(item.show_url(), icon.render().el, options) @mini_face_button: (item, image, options = {}) -> icon = new Pettanr.View.Minicon(image) new Pettanr.View.Button(item.show_url(), icon.render().el, options) @prof_button: (url, options = {}) -> file = Pettanr.View.Image.icon_prof_file() icon = new Pettanr.View.Icon(file) new Pettanr.View.Button(url, icon.render().el, options) @mini_prof_button: (url, options = {}) -> file = Pettanr.View.Image.icon_prof_file() icon = new Pettanr.View.Minicon(file) new Pettanr.View.Button(url, icon.render().el, options)