25 lines
566 B
Ruby
25 lines
566 B
Ruby
|
module Admin::DashboardsHelper
|
||
|
|
||
|
def get_link(title)
|
||
|
case title
|
||
|
when 'bulletin'
|
||
|
panel_announcement_front_end_bulletins_path
|
||
|
when'page_context'
|
||
|
panel_page_content_front_end_page_contexts_path
|
||
|
when'web_link'
|
||
|
panel_web_resource_front_end_web_links_path
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def get_link_to_object(object)
|
||
|
case object.class.to_s.underscore
|
||
|
when 'bulletin'
|
||
|
panel_announcement_front_end_bulletin_path(object)
|
||
|
when'page_context'
|
||
|
"/#{object.page.path}"
|
||
|
when'web_link'
|
||
|
panel_web_resource_front_end_web_link_path(object)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
end
|