Added condition badge in show and removed in_use
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

This commit is contained in:
2026-05-30 01:45:23 +02:00
parent 5c9e6a34b4
commit fd3149b13f
3 changed files with 29 additions and 15 deletions

View File

@@ -15,18 +15,22 @@
</div>
-->
<% content_for :title, "Artikel-Details: #{@item.name}" %>
<% content_for :title, "Artikel-Details" %>
<!-- OBERE AKTIONSLISTE (Yield im Top-Bar deines Hauptlayouts) -->
<% content_for :top_bar_actions do %>
<div class="flex items-center gap-2">
<%= link_to items_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>
Zurück
<div class="hidden md:inline">
Zurück
</div>
<% end %>
<%= link_to edit_item_path(@item), class: "py-2 px-3 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-lg 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="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" /></svg>
Bearbeiten
<div class="hidden md:inline">
Bearbeiten
</div>
<% end %>
</div>
<% end %>
@@ -42,9 +46,11 @@
<div class="bg-white border border-gray-200 rounded-xl shadow-sm p-4 md:p-6 space-y-4">
<div class="flex items-start justify-between flex-wrap gap-2">
<h2 class="text-lg md:text-xl font-bold text-gray-900 leading-tight"><%= @item.name %></h2>
<span class="inline-flex items-center py-0.5 px-2.5 rounded-full text-xs font-semibold bg-blue-50 text-blue-800 border border-blue-200 shrink-0">
<%= @item.category.name %>
</span>
<div class="flex items-center gap-2 shrink-0">
<%= render "layouts/badge", type: @item.condition_badge_type %>
<%= render "layouts/badge", type: :category, label: @item.category.name %>
</div>
</div>
<hr class="border-gray-200">