Module: Admin::SearchHelper
- Includes:
- ListViewHelper
- Defined in:
- app/helpers/admin/search_helper.rb
Instance Method Summary collapse
- #cell_class(object) ⇒ Object
- #link_attrs(object) ⇒ Object
- #link_text(object) ⇒ Object
- #link_url(object) ⇒ Object
Instance Method Details
#cell_class(object) ⇒ Object
28 29 30 |
# File 'app/helpers/admin/search_helper.rb', line 28 def cell_class(object) 'page' end |
#link_attrs(object) ⇒ Object
24 25 26 |
# File 'app/helpers/admin/search_helper.rb', line 24 def link_attrs(object) {:title => object.url } if Page === object end |
#link_text(object) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/helpers/admin/search_helper.rb', line 4 def link_text(object) case object when Page icon = object.virtual? ? 'virtual-page' : 'page' %Q{#{image(icon, :height => 18)} <span class="title">#{object.title}</span>} when Snippet %Q{#{image('snippet', :height => 18)} <span class="title">#{object.name}</span>} when Banner %Q{#{image('pictures', :height => 18)} <span class="title">#{object.name}</span>} end end |
#link_url(object) ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/helpers/admin/search_helper.rb', line 16 def link_url(object) case object when Page; edit_admin_page_path(:id => object) when Snippet; edit_admin_snippet_path(:id => object) when Banner; (:id => object) end end |