1 module ApplicationHelper
3 request.protocol + request.host_with_port + filename
12 label.constantize.model_name.human
14 l.first.constantize.human_attribute_name(l.last)
19 def t_select_items(items)
20 items.map {|i| [t(i[0]), i[1]] }
23 def t_selected_item(name, index)
24 t(MagicNumber[name][index][0])
27 def icon_tag name, opt = {}
28 title = opt[:object] ? (name.to_s + ' ID:' + opt[:object].id.to_s) : name
29 size = opt[:size] ? opt[:size].to_i : 35
30 tag :img, :src => asset_path(name.to_s.downcase + '.gif'), :width => size, :height => size, :alt => name.to_s + ' Icon', :title => title
33 def author_icon opt = {}
37 def artist_icon opt = {}
41 def comic_icon opt = {}
45 def story_icon opt = {}
49 def panel_icon opt = {}