2025-02-25 17:28:40 -05:00
|
|
|
<%# locals: (breadcrumbs:, sidebar_toggle_enabled: true) %>
|
2025-02-25 10:14:07 -06:00
|
|
|
|
|
|
|
<nav class="flex items-center gap-2 mb-6">
|
2025-02-25 17:28:40 -05:00
|
|
|
<% if sidebar_toggle_enabled %>
|
|
|
|
<button data-action="sidebar#toggle" class="p-2 inline-flex rounded-lg items-center justify-center hover:bg-gray-100 cursor-pointer">
|
|
|
|
<%= icon("panel-left", color: "gray") %>
|
|
|
|
</button>
|
|
|
|
<% end %>
|
2025-02-25 10:14:07 -06:00
|
|
|
|
2025-02-25 17:28:40 -05:00
|
|
|
<div class="py-2 flex items-center gap-2">
|
|
|
|
<% breadcrumbs.each_with_index do |(name, path), index| %>
|
|
|
|
<% if index > 0 %>
|
|
|
|
<%= icon("chevron-right", color: "gray", size: "sm") %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if path.present? && index < breadcrumbs.size - 1 %>
|
|
|
|
<%= link_to name, path, class: "text-sm text-gray-500 font-medium" %>
|
|
|
|
<% elsif index == breadcrumbs.size - 1 %>
|
|
|
|
<span class="text-gray-900 font-medium text-sm"><%= name %></span>
|
|
|
|
<% else %>
|
|
|
|
<span class="text-sm text-gray-500 font-medium"><%= name %></span>
|
|
|
|
<% end %>
|
2025-02-25 10:14:07 -06:00
|
|
|
<% end %>
|
2025-02-25 17:28:40 -05:00
|
|
|
</div>
|
|
|
|
</nav>
|