Added condition for items and started with localize
This commit is contained in:
@@ -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">
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
Reference in New Issue
Block a user