summaryrefslogtreecommitdiff
path: root/app/views/layouts/nav/breadcrumbs/_collapsed_dropdown.html.haml
blob: 610ff9001f7f8ca93e34ebfb1ee76cd8246bf60a (plain)
1
2
3
4
5
6
7
8
9
10
11
- dropdown_location = local_assigns.fetch(:location, nil)
- button_tooltip = local_assigns.fetch(:title, _("Show parent pages"))
- if defined?(@breadcrumb_dropdown_links) && @breadcrumb_dropdown_links.key?(dropdown_location)
  %li.dropdown
    %button.text-expander.has-tooltip.js-breadcrumbs-collapsed-expander{ type: "button", data: { toggle: "dropdown", container: "body" }, "aria-label": button_tooltip, title: button_tooltip }
      = icon("ellipsis-h")
    = sprite_icon("angle-right", css_class: "breadcrumbs-list-angle")
    .dropdown-menu
      %ul
        - @breadcrumb_dropdown_links[dropdown_location].each_with_index do |link, index|
          %li{ style: "text-indent: #{[index * 16, 60].min}px;" }= link