Added new nav entry for jobs#index
This commit is contained in:
@@ -30,6 +30,10 @@ module ApplicationHelper
|
|||||||
controller_name=="profiles"
|
controller_name=="profiles"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def root_tab?
|
||||||
|
controller_name=="jobs"
|
||||||
|
end
|
||||||
|
|
||||||
def is_admin_or_operator?
|
def is_admin_or_operator?
|
||||||
current_user.admin? || current_user.operator?
|
current_user.admin? || current_user.operator?
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
<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 FAB</a>
|
||||||
<% if user_signed_in? %>
|
<% 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">
|
||||||
|
<button class="px-4 py-2 cursor-default hover:text-hsrm-red border-b-4 <%= root_tab? && 'border-hsrm-red-light' %>">
|
||||||
|
<%= link_to "Aktuelle Druckaufträge", root_path %>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
<li class="relative">
|
<li class="relative">
|
||||||
<button class="px-4 py-2 cursor-default hover:text-hsrm-red border-b-4 <%= profile_tab? && 'border-hsrm-red-light' %>">
|
<button class="px-4 py-2 cursor-default hover:text-hsrm-red border-b-4 <%= profile_tab? && 'border-hsrm-red-light' %>">
|
||||||
<%= link_to "Profil", profile_path %>
|
<%= link_to "Profil", profile_path %>
|
||||||
|
|||||||
Reference in New Issue
Block a user