From 1f18b7dd7dc2a875ee659aae5ee972c106166379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=B6hm?= Date: Sat, 30 May 2026 03:17:48 +0200 Subject: [PATCH] Some more layout adjustments --- app/views/categories/edit.html.erb | 4 ++-- app/views/categories/new.html.erb | 4 ++-- app/views/categories/show.html.erb | 6 ++++-- app/views/items/edit.html.erb | 6 ++++-- app/views/items/new.html.erb | 6 ++++-- app/views/rooms/edit.html.erb | 4 ++-- app/views/rooms/new.html.erb | 4 ++-- app/views/rooms/show.html.erb | 6 ++++-- 8 files changed, 24 insertions(+), 16 deletions(-) diff --git a/app/views/categories/edit.html.erb b/app/views/categories/edit.html.erb index 172a87a..949ec06 100644 --- a/app/views/categories/edit.html.erb +++ b/app/views/categories/edit.html.erb @@ -1,10 +1,10 @@ <% content_for :title, "Kategorie bearbeiten" %> <% content_for :top_bar_actions do %> - <%= link_to categories_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 %> + <%= link_to "javascript:history.back()", 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 %> <% end %> <% end %> diff --git a/app/views/categories/new.html.erb b/app/views/categories/new.html.erb index 4546fbc..fa7e33c 100644 --- a/app/views/categories/new.html.erb +++ b/app/views/categories/new.html.erb @@ -1,10 +1,10 @@ <% content_for :title, "Kategorien anlegen" %> <% content_for :top_bar_actions do %> - <%= link_to categories_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 %> + <%= link_to "javascript:history.back()", 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 %> <% end %> <% end %> diff --git a/app/views/categories/show.html.erb b/app/views/categories/show.html.erb index 549c86c..a76548e 100644 --- a/app/views/categories/show.html.erb +++ b/app/views/categories/show.html.erb @@ -1,9 +1,11 @@ <% content_for :title, "Kategorie: #{@category.name}" %> <% content_for :top_bar_actions do %> - <%= link_to categories_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 %> + <%= link_to "javascript:history.back()", 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 %> - Alle Kategorien + <% end %> <% end %> diff --git a/app/views/items/edit.html.erb b/app/views/items/edit.html.erb index 9949b55..e8a828f 100644 --- a/app/views/items/edit.html.erb +++ b/app/views/items/edit.html.erb @@ -2,10 +2,12 @@ <% content_for :top_bar_actions do %> - <%= link_to item_path(@item), 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 %> + <%= link_to "javascript:history.back()", 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 %> - Zurück zu den Details + <% end %> <% end %> diff --git a/app/views/items/new.html.erb b/app/views/items/new.html.erb index 65bd7ff..584c3b2 100644 --- a/app/views/items/new.html.erb +++ b/app/views/items/new.html.erb @@ -2,10 +2,12 @@ <% 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 %> + <%= link_to "javascript:history.back()", 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 %> - Zurück zur Übersicht + <% end %> <% end %> diff --git a/app/views/rooms/edit.html.erb b/app/views/rooms/edit.html.erb index ec83e19..c406838 100644 --- a/app/views/rooms/edit.html.erb +++ b/app/views/rooms/edit.html.erb @@ -1,10 +1,10 @@ <% content_for :title, "Raum bearbeiten: #{@room.name}" %> <% 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 %> + <%= link_to "javascript:history.back()", 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 %> <% end %> <% end %> diff --git a/app/views/rooms/new.html.erb b/app/views/rooms/new.html.erb index e1eff05..8c9b66d 100644 --- a/app/views/rooms/new.html.erb +++ b/app/views/rooms/new.html.erb @@ -1,10 +1,10 @@ <% 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 %> + <%= link_to "javascript:history.back()", 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 %> <% end %> <% end %> diff --git a/app/views/rooms/show.html.erb b/app/views/rooms/show.html.erb index 4710615..b08210e 100644 --- a/app/views/rooms/show.html.erb +++ b/app/views/rooms/show.html.erb @@ -1,9 +1,11 @@ <% content_for :title, "Standort: #{@room.name}" %> <% 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 %> + <%= link_to "javascript:history.back()", 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 %> - Alle Räume + <% end %> <% end %>