34 lines
1.9 KiB
PHP
34 lines
1.9 KiB
PHP
@php
|
|
$canConfigure = Auth::user()->can('admin:configure');
|
|
$canManageAlbums = Auth::user()->can('admin:manage-albums');
|
|
$canManageGroups = Auth::user()->can('admin:manage-groups');
|
|
$canManageLabels = Auth::user()->can('admin:manage-labels');
|
|
$canManageStorage = Auth::user()->can('admin:manage-storage');
|
|
$canManageUsers = Auth::user()->can('admin:manage-users');
|
|
@endphp
|
|
|
|
@if ($canConfigure || $canManageAlbums || $canManageGroups || $canManageStorage || $canManageUsers)
|
|
<div class="card admin-sidebar-card">
|
|
<div class="card-header">@lang('admin.manage_widget.panel_header')</div>
|
|
<div class="card-body">
|
|
@if ($canManageAlbums)
|
|
<a class="btn btn-link" href="{{ route('albums.index') }}"><i class="fa fa-fw fa-picture-o"></i> @lang('navigation.breadcrumb.albums')</a>
|
|
@endif
|
|
@if ($canManageLabels)
|
|
<a class="btn btn-link" href="{{ route('labels.index') }}"><i class="fa fa-fw fa-tags"></i> @lang('navigation.breadcrumb.labels')</a>
|
|
@endif
|
|
@if ($canManageUsers)
|
|
<a class="btn btn-link" href="{{ route('users.index') }}"><i class="fa fa-fw fa-user"></i> @lang('navigation.breadcrumb.users')</a>
|
|
@endif
|
|
@if ($canManageGroups)
|
|
<a class="btn btn-link" href="{{ route('groups.index') }}"><i class="fa fa-fw fa-users"></i> @lang('navigation.breadcrumb.groups')</a>
|
|
@endif
|
|
@if ($canManageStorage)
|
|
<a class="btn btn-link" href="{{ route('storage.index') }}"><i class="fa fa-fw fa-folder"></i> @lang('navigation.breadcrumb.storage')</a>
|
|
@endif
|
|
@if ($canConfigure)
|
|
<a class="btn btn-link" href="{{ route('admin.settings') }}"><i class="fa fa-fw fa-cog"></i> @lang('navigation.breadcrumb.settings')</a>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endif |