laravel 8
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
@section('title', $dashboard->name)
|
||||
|
||||
@section('dashboard_action')
|
||||
@permission(['create-common-widgets', 'read-common-dashboards'])
|
||||
@canany(['create-common-widgets', 'read-common-dashboards'])
|
||||
<span class="dashboard-action">
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-sm items-align-center py-2 mt--1" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@ -11,25 +11,25 @@
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-sm-right dropdown-menu-xs-right dropdown-menu-arrow">
|
||||
@permission('create-common-widgets')
|
||||
@can('create-common-widgets')
|
||||
{!! Form::button(trans('general.title.add', ['type' => trans_choice('general.widgets', 1)]), [
|
||||
'type' => 'button',
|
||||
'class' => 'dropdown-item',
|
||||
'title' => trans('general.title.add', ['type' => trans_choice('general.widgets', 1)]),
|
||||
'@click' => 'onCreateWidget()',
|
||||
]) !!}
|
||||
@endpermission
|
||||
@permission('update-common-dashboards')
|
||||
@endcan
|
||||
@can('update-common-dashboards')
|
||||
<div class="dropdown-divider"></div>
|
||||
@permission('create-common-dashboards')
|
||||
@can('create-common-dashboards')
|
||||
<a class="dropdown-item" href="{{ route('dashboards.create') }}">{{ trans('general.title.create', ['type' => trans_choice('general.dashboards', 1)]) }}</a>
|
||||
@endpermission
|
||||
@endcan
|
||||
<a class="dropdown-item" href="{{ route('dashboards.index') }}">{{ trans('general.title.manage', ['type' => trans_choice('general.dashboards', 2)]) }}</a>
|
||||
@endpermission
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
@endpermission
|
||||
@endcanany
|
||||
|
||||
@php
|
||||
$text = json_encode([
|
||||
|
Reference in New Issue
Block a user