From 6095c31fb9ddc2a419fbfe86669339e4fcb9595d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=B6hm?= Date: Tue, 27 Aug 2024 09:34:31 +0200 Subject: [PATCH] Modified navbar with login, logout,.. --- app/views/layouts/_footer.html.erb | 3 +++ app/views/layouts/_header.html.erb | 29 ++++++++++++++++++++++++ app/views/layouts/application.html.erb | 31 ++------------------------ 3 files changed, 34 insertions(+), 29 deletions(-) create mode 100644 app/views/layouts/_footer.html.erb create mode 100644 app/views/layouts/_header.html.erb diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb new file mode 100644 index 0000000..827995b --- /dev/null +++ b/app/views/layouts/_footer.html.erb @@ -0,0 +1,3 @@ + diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb new file mode 100644 index 0000000..65ad76e --- /dev/null +++ b/app/views/layouts/_header.html.erb @@ -0,0 +1,29 @@ +
+ Plottservice Fachbereich AB + <% if user_signed_in? && current_user&.admin? || current_user&.operator? %> + + <% end %> + +
\ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 11378a8..8fda818 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -12,37 +12,10 @@ <%= render "layouts/flash" %> -
- Plottservice Fachbereich AB - - -
+ <%= render "layouts/header" %>
<%= yield %>
- + <%= render "layouts/footer" %>