36 lines
1.8 KiB
Plaintext
36 lines
1.8 KiB
Plaintext
<% content_for :title, "Kategorie: #{@category.name}" %>
|
|
|
|
<% content_for :top_bar_actions do %>
|
|
<%= link_to categories_path, class: "py-2 px-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 flex items-center gap-1.5 shadow-sm transition" do %>
|
|
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" /></svg>
|
|
Alle Kategorien
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<div class="w-full space-y-6">
|
|
<!-- Beschreibungskarte -->
|
|
<div class="bg-white border border-gray-200 rounded-xl p-6 shadow-sm">
|
|
<h2 class="text-sm font-bold text-gray-400 uppercase tracking-wider">Beschreibung</h2>
|
|
<p class="text-sm text-gray-600 mt-1 leading-relaxed"><%= @category.description.presence || "Keine Beschreibung hinterlegt." %></p>
|
|
</div>
|
|
|
|
<div>
|
|
<!-- 1. Gleiche Suchleiste laden (CSV-Export bleibt hier deaktiviert!) -->
|
|
<%= render "items/search_bar", show_csv: false %>
|
|
|
|
<!-- 2. Artikelliste laden -->
|
|
<% if @items.any? %>
|
|
<%= render "items/list", items: @items %>
|
|
<% else %>
|
|
<div class="text-center py-16 text-gray-400 bg-white border border-gray-200 rounded-xl shadow-sm">
|
|
<svg class="mx-auto h-12 w-12 text-gray-300" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l5.25 3.03M12 12.75v9" />
|
|
</svg>
|
|
<p class="text-sm mt-3 font-medium">Bisher sind keine Inventargegenstände erfasst.</p>
|
|
<p class="text-xs text-gray-400 mt-1">Klicke oben rechts auf "Artikel hinzufügen", um das erste Gerät einzubuchen.</p>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|