Header shows profile for users
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<header class="container flex items-center justify-between px-4 py-6 mx-auto border-b-2 border-gray-300">
|
<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>
|
<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>
|
<nav>
|
||||||
<ul class="flex justify-center space-x-2 font-semibold items-color">
|
<ul class="flex justify-center space-x-2 font-semibold items-color">
|
||||||
<li class="relative">
|
<li class="relative">
|
||||||
@@ -8,16 +8,18 @@
|
|||||||
<%= link_to "Profil", profile_path %>
|
<%= link_to "Profil", profile_path %>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li class="relative">
|
<% if (current_user.admin? || current_user.operator?) %>
|
||||||
<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' %>">
|
<li class="relative">
|
||||||
<%= link_to_if current_user.admin?, "Admin", admin_dashboard_path %>
|
<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' %>">
|
||||||
</button>
|
<%= link_to_if current_user.admin?, "Admin", admin_dashboard_path %>
|
||||||
</li>
|
</button>
|
||||||
<li class="relative">
|
</li>
|
||||||
<button class="px-4 py-2 cursor-default hover:text-hsrm-red border-b-4 <%= operator_tab? && 'border-hsrm-red-light' %>">
|
<li class="relative">
|
||||||
<%= link_to 'Operator', operator_jobs_path %>
|
<button class="px-4 py-2 cursor-default hover:text-hsrm-red border-b-4 <%= operator_tab? && 'border-hsrm-red-light' %>">
|
||||||
</button>
|
<%= link_to 'Operator', operator_jobs_path %>
|
||||||
</li>
|
</button>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user