blue-twilight/resources/views/themes/base/partials/admin_manage_widget.blade.php

60 lines
3.1 KiB
PHP
Raw Permalink Normal View History

@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');
$canManageComments = Auth::user()->can('admin:manage-comments');
$canManageServices = Auth::user()->can('admin:manage-services');
@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">
<ul class="nav">
@if ($canManageAlbums)
<li class="nav-item">
<a class="btn btn-link" href="{{ route('albums.index') }}"><i class="fa fa-fw fa-book"></i> @lang('navigation.breadcrumb.albums')</a>
</li>
@endif
@if ($canManageLabels)
<li class="nav-item">
<a class="btn btn-link" href="{{ route('labels.index') }}"><i class="fa fa-fw fa-tags"></i> @lang('navigation.breadcrumb.labels')</a>
</li>
@endif
@if ($canManageComments)
<li class="nav-item">
<a class="btn btn-link" href="{{ route('comments.index') }}"><i class="fa fa-fw fa-edit"></i> @lang('navigation.breadcrumb.comments')</a>
</li>
@endif
@if ($canManageUsers)
<li class="nav-item">
<a class="btn btn-link" href="{{ route('users.index') }}"><i class="fa fa-fw fa-user"></i> @lang('navigation.breadcrumb.users')</a>
</li>
@endif
@if ($canManageGroups)
<li class="nav-item">
<a class="btn btn-link" href="{{ route('groups.index') }}"><i class="fa fa-fw fa-users"></i> @lang('navigation.breadcrumb.groups')</a>
</li>
@endif
@if ($canManageStorage)
<li class="nav-item">
<a class="btn btn-link" href="{{ route('storage.index') }}"><i class="fa fa-fw fa-folder"></i> @lang('navigation.breadcrumb.storage')</a>
</li>
@endif
@if ($canManageServices)
<li class="nav-item">
<a class="btn btn-link" href="{{ route('services.index') }}"><i class="fa fa-fw fa-sync"></i> @lang('navigation.breadcrumb.services')</a>
</li>
@endif
@if ($canConfigure)
<li class="nav-item">
<a class="btn btn-link" href="{{ route('admin.settings') }}"><i class="fa fa-fw fa-cog"></i> @lang('navigation.breadcrumb.settings')</a>
</li>
@endif
</ul>
</div>
</div>
@endif