debian-mirror-gitlab/app/views/shared/nav/_sidebar_menu.html.haml

20 lines
1.1 KiB
Text
Raw Normal View History

2021-04-29 21:17:54 +05:30
= nav_link(**sidebar_menu.all_active_routes, html_options: sidebar_menu.nav_link_html_options) do
2021-10-27 15:23:28 +05:30
- if sidebar_menu.menu_with_partial?
= render_if_exists sidebar_menu.menu_partial, **sidebar_menu.menu_partial_options
- else
2022-01-26 12:08:38 +05:30
= link_to sidebar_menu.link, **sidebar_menu.link_html_options, data: { qa_selector: 'sidebar_menu_link', qa_menu_item: sidebar_menu.title } do
2021-10-27 15:23:28 +05:30
- if sidebar_menu.icon_or_image?
%span.nav-icon-container
- 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)
2021-04-29 21:17:54 +05:30
2021-10-27 15:23:28 +05:30
%span.nav-item-name{ **sidebar_menu.title_html_options }
= sidebar_menu.title
- if sidebar_menu.has_pill?
2022-03-02 08:16:31 +05:30
= gl_badge_tag({ variant: :info, size: :sm }, { class: "count #{sidebar_menu.pill_html_options[:class]}" }) do
2021-10-27 15:23:28 +05:30
= number_with_delimiter(sidebar_menu.pill_count)
2021-04-29 21:17:54 +05:30
2021-12-11 22:18:48 +05:30
= render partial: 'shared/nav/sidebar_submenu', locals: { sidebar_menu: sidebar_menu }