2021-04-29 21:17:54 +05:30
|
|
|
= nav_link(**sidebar_menu.all_active_routes, html_options: sidebar_menu.nav_link_html_options) do
|
|
|
|
= link_to sidebar_menu.link, **sidebar_menu.container_html_options, data: { qa_selector: 'sidebar_menu_link', qa_menu_item: sidebar_menu.title } do
|
|
|
|
- if sidebar_menu.icon_or_image?
|
2021-06-08 01:23:25 +05:30
|
|
|
%span.nav-icon-container
|
2021-04-29 21:17:54 +05:30
|
|
|
- if sidebar_menu.image_path
|
|
|
|
= image_tag(sidebar_menu.image_path, **sidebar_menu.image_html_options)
|
|
|
|
- elsif sidebar_menu.sprite_icon
|
|
|
|
= sprite_icon(sidebar_menu.sprite_icon, **sidebar_menu.sprite_icon_html_options)
|
|
|
|
|
|
|
|
%span.nav-item-name{ **sidebar_menu.title_html_options }
|
|
|
|
= sidebar_menu.title
|
|
|
|
- if sidebar_menu.has_pill?
|
|
|
|
%span.badge.badge-pill.count{ **sidebar_menu.pill_html_options }
|
|
|
|
= number_with_delimiter(sidebar_menu.pill_count)
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
%ul.sidebar-sub-level-items{ class: ('is-fly-out-only' unless sidebar_menu.has_renderable_items?) }
|
2021-04-29 21:17:54 +05:30
|
|
|
= nav_link(**sidebar_menu.all_active_routes, html_options: { class: 'fly-out-top-item' } ) do
|
2021-06-08 01:23:25 +05:30
|
|
|
= link_to sidebar_menu.link, **sidebar_menu.collapsed_container_html_options do
|
2021-04-29 21:17:54 +05:30
|
|
|
%strong.fly-out-top-item-name
|
|
|
|
= sidebar_menu.title
|
|
|
|
- if sidebar_menu.has_pill?
|
|
|
|
%span.badge.badge-pill.count.fly-out-badge{ **sidebar_menu.pill_html_options }
|
|
|
|
= number_with_delimiter(sidebar_menu.pill_count)
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
- if sidebar_menu.has_items?
|
2021-04-29 21:17:54 +05:30
|
|
|
%li.divider.fly-out-top-item
|
|
|
|
= render partial: 'shared/nav/sidebar_menu_item', collection: sidebar_menu.renderable_items
|