Files
vault171/app/views/rooms/show.html.erb
David Böhm af10dca289
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
Added Room and some little design updates
2026-05-28 01:04:19 +02:00

39 lines
1.7 KiB
Plaintext

<% content_for :title, "Standort: #{@room.name}" %>
<% content_for :top_bar_actions do %>
<%= link_to rooms_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 Räume
<% end %>
<% end %>
<div class="w-full space-y-6">
<!-- Metadaten des Raums -->
<div class="bg-white border border-gray-200 rounded-xl p-6 shadow-sm grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm max-w-xl">
<div>
<p class="text-[10px] font-bold text-gray-400 uppercase tracking-wider">Gebäude</p>
<p class="text-gray-800 font-semibold mt-0.5"><%= @room.building %></p>
</div>
<div>
<p class="text-[10px] font-bold text-gray-400 uppercase tracking-wider">Stockwerk / Etage</p>
<p class="text-gray-800 font-semibold mt-0.5"><%= @room.floor %></p>
</div>
</div>
<div>
<!-- 1. Suchleiste steht außerhalb des Frames (CSV-Export hier deaktiviert) -->
<%= render "items/search_bar", show_csv: false %>
<!-- 2. NUR DAS REUSE-LIST-PARTIAL 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 an diesem Standort gefunden.</p>
</div>
<% end %>
<% end %>
</div>
</div>