This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/helpers/admin/dashboards_helper.rb

25 lines
566 B
Ruby
Raw Normal View History

module Admin::DashboardsHelper
2012-05-08 21:53:07 +00:00
def get_link(title)
case title
when 'bulletin'
2012-05-15 13:26:09 +00:00
panel_announcement_front_end_bulletins_path
2012-05-08 21:53:07 +00:00
when'page_context'
2012-05-15 13:26:09 +00:00
panel_page_content_front_end_page_contexts_path
2012-05-08 21:53:07 +00:00
when'web_link'
2012-05-15 13:26:09 +00:00
panel_web_resource_front_end_web_links_path
2012-05-08 21:53:07 +00:00
end
end
def get_link_to_object(object)
2012-07-30 10:34:54 +00:00
case object.class.to_s.underscore
2012-05-08 21:53:07 +00:00
when 'bulletin'
2012-05-15 13:26:09 +00:00
panel_announcement_front_end_bulletin_path(object)
2012-05-08 21:53:07 +00:00
when'page_context'
2012-05-16 10:19:41 +00:00
"/#{object.page.path}"
2012-05-08 21:53:07 +00:00
when'web_link'
2012-05-15 13:26:09 +00:00
panel_web_resource_front_end_web_link_path(object)
2012-05-08 21:53:07 +00:00
end
end
end