Files
vault171/app/views/items/index.html.erb
David Böhm d8c6a7ab82
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled
Small layout adjustments and form errors in partial outsourced
2026-05-30 02:11:51 +02:00

28 lines
1.1 KiB
Plaintext

<% content_for :title, "Gesamtbestand" %>
<!-- OBERE AKTIONSLISTE -->
<% content_for :top_bar_actions do %>
<%= link_to new_item_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 %>
<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="M12 4.5v15m7.5-7.5h-15" /></svg>
<div class="hidden md:inline">
Artikel anlegen
</div>
<% end %>
<% end %>
<div class="w-full space-y-4">
<!-- 1. Die Suchleiste steht AUSSERHALB des Frames. Sie wird beim Tippen nicht neu geladen! -->
<%= render "items/search_bar", show_csv: true %>
<!-- 2. NUR DIE LISTE WIRD IN DEN TURBO-FRAME GEPAKT -->
<%= turbo_frame_tag "items_list_frame" do %>
<% 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">
<p class="text-sm font-medium">Keine passenden Inventargegenstände gefunden.</p>
</div>
<% end %>
<% end %>
</div>