Module: AppKit::NavigationHelper
- Defined in:
- app/helpers/app_kit/navigation_helper.rb
Instance Method Summary collapse
- #custom_navigation_link(item) ⇒ Object
- #navigation_link(item) ⇒ Object
- #resource_navigation_link(resource) ⇒ Object
Instance Method Details
#custom_navigation_link(item) ⇒ Object
15 16 17 18 19 |
# File 'app/helpers/app_kit/navigation_helper.rb', line 15 def (item) cls = "" cls = "active" if params[:controller].to_s == item.controller.to_s link_to icon(item.icon,item.title), main_app.send("#{item.path_helper}_path"), class: cls end |
#navigation_link(item) ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/helpers/app_kit/navigation_helper.rb', line 21 def (item) if item.has_resource? (item.resource) else (item) end end |
#resource_navigation_link(resource) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'app/helpers/app_kit/navigation_helper.rb', line 2 def (resource) cls = "" if params[:controller] == "app_kit/#{resource.controller_name}" cls << "active " end link_to ak_path(resource.model), class: cls do if resource. concat icon(resource., nil, class: 'fa-fw') end concat resource.plural_display_name end end |