<% content_for :title, "Inventar-Kategorien" %>
<% content_for :top_bar_actions do %> <%= link_to new_category_path, class: "py-2 px-4 text-sm font-semibold rounded-lg bg-blue-600 text-white hover:bg-blue-700 flex items-center gap-1.5 shadow-sm transition" do %> Kategorie erstellen <% end %> <% end %>
<% @categories.each do |category| %>
<%= category.items.count %> <%= category.items.count == 1 ? "Objekt" : "Objekte" %>

<%= category.name %>

<%= category.description.presence || "Keine Beschreibung hinterlegt." %>

<%= link_to "Bearbeiten", edit_category_path(category), class: "text-gray-500 hover:text-gray-700 transition" %> <%= link_to category_path(category), class: "text-blue-600 hover:text-blue-800 flex items-center gap-0.5 transition" do %> Artikel ansehen → <% end %>
<% end %>