Added Room and some little design updates
This commit is contained in:
38
app/views/rooms/show.html.erb
Normal file
38
app/views/rooms/show.html.erb
Normal file
@@ -0,0 +1,38 @@
|
||||
<% 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>
|
||||
Reference in New Issue
Block a user