Skip to content

Commit 6038fd7

Browse files
committed
Fix Nova navigation menu.
1 parent 4cbae71 commit 6038fd7

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
@if (auth()->user()->can("viewAny", config("genealabs-laravel-governor.models.role"))
2+
|| auth()->user()->can("viewAny", config("genealabs-laravel-governor.models.group"))
3+
|| auth()->user()->can("viewAny", config("genealabs-laravel-governor.models.team"))
4+
|| auth()->user()->can("viewAny", config("genealabs-laravel-governor.models.assignment"))
5+
)
6+
<h3 class="flex items-center font-normal text-white mb-4 text-base no-underline">
7+
<svg class="sidebar-icon" aria-hidden="true" focusable="false" data-prefix="far" data-icon="key" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="var(--sidebar-icon)" d="M320 48c79.529 0 144 64.471 144 144s-64.471 144-144 144c-18.968 0-37.076-3.675-53.66-10.339L224 368h-32v48h-48v48H48v-96l134.177-134.177A143.96 143.96 0 0 1 176 192c0-79.529 64.471-144 144-144m0-48C213.965 0 128 85.954 128 192c0 8.832.602 17.623 1.799 26.318L7.029 341.088A24.005 24.005 0 0 0 0 358.059V488c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24v-24h24c13.255 0 24-10.745 24-24v-20l40.049-40.167C293.106 382.604 306.461 384 320 384c106.035 0 192-85.954 192-192C512 85.965 426.046 0 320 0zm0 144c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z"></path></svg>
8+
<span class="sidebar-label">{{ __("Permissions") }}</span>
9+
</h3>
10+
<ul class="list-reset mb-8">
11+
12+
@if (auth()->user()->can("viewAny", config("genealabs-laravel-governor.models.role")))
13+
<li class="leading-tight mb-4 ml-8 text-sm">
14+
<router-link
15+
:to="{name: 'laravel-nova-governor-roles'}"
16+
class="text-white text-justify no-underline dim">
17+
Roles
18+
</router-link>
19+
</li>
20+
@endif
21+
22+
@if (auth()->user()->can("viewAny", config("genealabs-laravel-governor.models.group")))
23+
<li class="leading-tight mb-4 ml-8 text-sm">
24+
<router-link
25+
:to="{name: 'laravel-nova-governor-groups'}"
26+
class="text-white text-justify no-underline dim">
27+
Groups
28+
</router-link>
29+
</li>
30+
@endif
31+
32+
@if (auth()->user()->can("viewAny", config("genealabs-laravel-governor.models.team")))
33+
<li class="leading-tight mb-4 ml-8 text-sm">
34+
<router-link
35+
:to="{path: '/resources/governor-teams'}"
36+
class="text-white text-justify no-underline dim">
37+
Teams
38+
</router-link>
39+
</li>
40+
@endif
41+
42+
@if (auth()->user()->can("viewAny", config("genealabs-laravel-governor.models.assignment")))
43+
<li class="leading-tight mb-4 ml-8 text-sm">
44+
<router-link
45+
:to="{name: 'laravel-nova-governor-assignments'}"
46+
class="text-white text-justify no-underline dim">
47+
Assignments
48+
</router-link>
49+
</li>
50+
@endif
51+
52+
</ul>
53+
@endif

0 commit comments

Comments
 (0)