Files
vault171/app/views/items/new.html.erb
David Böhm 44d019b4b5
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 Items and Dashboard
2026-05-22 03:52:54 +02:00

28 lines
1.1 KiB
Plaintext

<!-- <%# content_for :title, "New item" %>
<div class="md:w-2/3 w-full">
<h1 class="font-bold text-4xl">New item</h1>
<%#= render "form", item: @item %>
<%= link_to "Back to items", items_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
</div>
-->
<% content_for :title, "Neuen Artikel hinzufügen" %>
<!-- OBERE LEISTE (Zurück-Button in der Top-Bar via Layout-Yield) -->
<% content_for :top_bar_actions do %>
<%= 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 %>
<!-- Heroicon: arrow-left -->
<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 zur Übersicht
<% end %>
<% end %>
<div class="p-4 md:p-6">
<!-- Lädt das Formular-Partial und übergibt das leere Artikel-Objekt -->
<%= render "form", item: @item %>
</div>