Added condition for items and started with localize
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-28 22:28:13 +02:00
parent edf3886b94
commit 9e18b233d9
10 changed files with 242 additions and 125 deletions

View File

@@ -63,6 +63,23 @@
</div>
</div>
<div class="space-y-1.5">
<!-- Rails schreibt das Label automatisch über die de.yml -->
<%= form.label :condition, Item.human_attribute_name(:condition), class: "block text-sm font-semibold text-gray-700" %>
<div class="relative">
<!-- PURE RAILS KONVENTION: Sicher, verständlich und stabil -->
<%= form.select :condition,
Item.conditions.keys.map { |cond| [Item.human_attribute_name("conditions.#{cond}"), cond] },
{},
class: "py-2.5 px-3 block w-full border border-gray-300 rounded-lg text-sm bg-gray-50/50 focus:border-blue-500 focus:ring-blue-500 appearance-none pr-10" %>
<!-- Kleiner Custom-Pfeil rechts -->
<div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-gray-400">
<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="M19.5 8.25l-7.5 7.5-7.5-7.5" /></svg>
</div>
</div>
</div>
<hr class="border-gray-200">
<!-- ========================================================================= -->