Header shows profile for users

This commit is contained in:
2024-09-09 15:07:33 +02:00
parent d3b085e87b
commit c101bc395d

View File

@@ -1,6 +1,6 @@
<header class="container flex items-center justify-between px-4 py-6 mx-auto border-b-2 border-gray-300">
<a href="/" class="text-4xl font-bold text-hsrm-gray">Plottservice Fachbereich AB</a>
<% if user_signed_in? && (current_user.admin? || current_user.operator?) %>
<% if user_signed_in? %>
<nav>
<ul class="flex justify-center space-x-2 font-semibold items-color">
<li class="relative">
@@ -8,6 +8,7 @@
<%= link_to "Profil", profile_path %>
</button>
</li>
<% if (current_user.admin? || current_user.operator?) %>
<li class="relative">
<button class="px-4 py-2 cursor-default <%= current_user.admin? && 'hover:text-hsrm-red' || 'text-hsrm-gray-light' %> border-b-4 <%= admin_tab? && 'border-hsrm-red-light' %>">
<%= link_to_if current_user.admin?, "Admin", admin_dashboard_path %>
@@ -18,6 +19,7 @@
<%= link_to 'Operator', operator_jobs_path %>
</button>
</li>
<% end %>
</ul>
</nav>
<% end %>