Small layout adjustments and form errors in partial outsourced
This commit is contained in:
@@ -1,15 +1,6 @@
|
||||
<%= form_with(model: room, class: "space-y-6 max-w-xl mx-auto bg-white border border-gray-200 rounded-xl shadow-sm p-6 md:p-8") do |form| %>
|
||||
|
||||
<% if room.errors.any? %>
|
||||
<div class="p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50 border border-red-200" role="alert">
|
||||
<h2 class="font-bold mb-1"><%= pluralize(room.errors.count, "Fehler") %> verhinderten das Speichern:</h2>
|
||||
<ul class="list-disc list-inside text-xs">
|
||||
<% room.errors.each do |error| %>
|
||||
<li><%= error.full_message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= render "layouts/form_errors", model: room %>
|
||||
|
||||
<div>
|
||||
<h2 class="text-xl font-bold text-gray-800">
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
<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="M12 4.5v15m7.5-7.5h-15" />
|
||||
</svg>
|
||||
Raum anlegen
|
||||
<div class="hidden md:inline">
|
||||
Raum anlegen
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<% content_for :title, "Neuen Raum hinzufügen" %>
|
||||
<% content_for :title, "Raum anlegen" %>
|
||||
|
||||
<% content_for :top_bar_actions do %>
|
||||
<%= link_to rooms_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 zur Übersicht
|
||||
<div class="hidden md:inline">
|
||||
Zurück zur Übersicht
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user