33 lines
1.5 KiB
Plaintext
33 lines
1.5 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 der Kategorie -->
|
|
<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. Suchleiste steht außerhalb des Frames (CSV-Export hier auf 'false') -->
|
|
<%= render "items/search_bar", show_csv: false %>
|
|
|
|
<!-- 2. NUR DAS LIST-PARTIAL WIRD IN DEN FRAME GEPAKT -->
|
|
<%= turbo_frame_tag "items_list_frame" do %>
|
|
<% if @items.any? %>
|
|
<%= render "items/list", items: @items %>
|
|
<% else %>
|
|
<div class="text-center py-12 text-gray-400 bg-white border border-gray-200 rounded-xl shadow-sm">
|
|
<p class="text-sm">Keine passenden Artikel in dieser Kategorie gefunden.</p>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|