Added Items and Dashboard
This commit is contained in:
27
app/views/items/new.html.erb
Normal file
27
app/views/items/new.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<!-- <%# 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>
|
||||
|
||||
Reference in New Issue
Block a user