Module: Admin::PagesHelper
- Defined in:
- app/helpers/admin/pages_helper.rb
Instance Method Summary collapse
Instance Method Details
#display_events(page) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/helpers/admin/pages_helper.rb', line 14 def display_events(page) html = "" page.available_events.each do |event| html << link_to(t("pages.events.#{event}"), method("#{event}_admin_page_path").call(page)) html << ' ' end raw(html) end |
#display_page_category(page) ⇒ Object
4 5 6 7 8 |
# File 'app/helpers/admin/pages_helper.rb', line 4 def display_page_category(page) if page.category page.category.name end end |
#display_state(page) ⇒ Object
10 11 12 |
# File 'app/helpers/admin/pages_helper.rb', line 10 def display_state(page) t("pages.states.#{page.state}") end |