|
39 | 39 | <%# right %> |
40 | 40 | <div class="flex items-center gap-2"> |
41 | 41 | <% if signed_in? %> |
42 | | - <details class="relative group flex items-center" data-controller="dropdown" data-action="keydown.esc@window->dropdown#close"> |
43 | | - <summary class="inline-flex items-center gap-1 font-medium text-sm cursor-pointer [&::-webkit-details-marker]:hidden"> |
44 | | - <span class="font-medium font-mono">Admin</span> |
45 | | - <%= inline_svg_tag "svg/chevron-down.svg", class: "w-4 h-4 stroke-2 transition-transform duration-200 group-open:rotate-180" %> |
46 | | - </summary> |
47 | | - <div class="absolute right-0 mt-5 bg-base-200 border border-base-content/20 z-1 rounded-lg p-1 space-y-1"> |
48 | | - <%= active_link_to "Avo", "/admin/avo/resources/users", class_active: "du-btn-active", class: "whitespace-nowrap du-btn du-btn-ghost justify-start w-full" %> |
49 | | - <%= active_link_to "Profitable", "/profitable", class_active: "du-btn-active", class: "whitespace-nowrap du-btn du-btn-ghost justify-start w-full" %> |
50 | | - <%= active_link_to "Jobs", "/jobs", class_active: "du-btn-active", class: "whitespace-nowrap du-btn du-btn-ghost justify-start w-full" %> |
51 | | - </div> |
52 | | - </details> |
| 42 | + <% if current_user.admin? %> |
| 43 | + <details class="relative group flex items-center" data-controller="dropdown" data-action="keydown.esc@window->dropdown#close"> |
| 44 | + <summary class="inline-flex items-center gap-1 font-medium text-sm cursor-pointer [&::-webkit-details-marker]:hidden"> |
| 45 | + <span class="font-medium font-mono">Admin</span> |
| 46 | + <%= inline_svg_tag "svg/chevron-down.svg", class: "w-4 h-4 stroke-2 transition-transform duration-200 group-open:rotate-180" %> |
| 47 | + </summary> |
| 48 | + <div class="absolute right-0 mt-5 bg-base-200 border border-base-content/20 z-1 rounded-lg p-1 space-y-1"> |
| 49 | + <%= active_link_to "Avo", "/admin/avo/resources/users", class_active: "du-btn-active", class: "whitespace-nowrap du-btn du-btn-ghost justify-start w-full" %> |
| 50 | + <%= active_link_to "Profitable", "/profitable", class_active: "du-btn-active", class: "whitespace-nowrap du-btn du-btn-ghost justify-start w-full" %> |
| 51 | + <%= active_link_to "Jobs", "/jobs", class_active: "du-btn-active", class: "whitespace-nowrap du-btn du-btn-ghost justify-start w-full" %> |
| 52 | + </div> |
| 53 | + </details> |
| 54 | + <% end %> |
53 | 55 | <details class="relative group flex items-center" data-controller="dropdown" data-action="keydown.esc@window->dropdown#close"> |
54 | 56 | <summary class="inline-flex items-center gap-1 font-medium text-sm cursor-pointer [&::-webkit-details-marker]:hidden"> |
55 | 57 | <%= user_avatar(current_user) %> |
|
0 commit comments