laravel 8
This commit is contained in:
		| @@ -19,9 +19,9 @@ | ||||
|                 <div class="row"> | ||||
|                     {{ Form::textGroup('name', trans('general.name'), 'font') }} | ||||
|  | ||||
|                     @permission('read-auth-users') | ||||
|                     @can('read-auth-users') | ||||
|                         {{ Form::checkboxGroup('users', trans_choice('general.users', 2), $users, 'name') }} | ||||
|                     @endpermission | ||||
|                     @endcan | ||||
|  | ||||
|                     {{ Form::radioGroup('enabled', trans('general.enabled'), true) }} | ||||
|                 </div> | ||||
|   | ||||
| @@ -20,21 +20,21 @@ | ||||
|                 <div class="row"> | ||||
|                     {{ Form::textGroup('name', trans('general.name'), 'font') }} | ||||
|  | ||||
|                     @permission('read-auth-users') | ||||
|                     @can('read-auth-users') | ||||
|                         {{ Form::checkboxGroup('users', trans_choice('general.users', 2), $users, 'name') }} | ||||
|                     @endpermission | ||||
|                     @endcan | ||||
|  | ||||
|                     {{ Form::radioGroup('enabled', trans('general.enabled'), $dashboard->enabled) }} | ||||
|                 </div> | ||||
|             </div> | ||||
|  | ||||
|             @permission('update-common-dashboards') | ||||
|             @can('update-common-dashboards') | ||||
|                 <div class="card-footer"> | ||||
|                     <div class="row save-buttons"> | ||||
|                         {{ Form::saveButtons('dashboards.index') }} | ||||
|                     </div> | ||||
|                 </div> | ||||
|             @endpermission | ||||
|             @endcan | ||||
|         {!! Form::close() !!} | ||||
|     </div> | ||||
| @endsection | ||||
|   | ||||
| @@ -2,11 +2,11 @@ | ||||
|  | ||||
| @section('title', trans_choice('general.dashboards', 2)) | ||||
|  | ||||
| @permission('create-common-dashboards') | ||||
| @can('create-common-dashboards') | ||||
|     @section('new_button') | ||||
|         <a href="{{ route('dashboards.create') }}" class="btn btn-success btn-sm">{{ trans('general.add_new') }}</a> | ||||
|     @endsection | ||||
| @endpermission | ||||
| @endcan | ||||
|  | ||||
| @section('content') | ||||
|     <div class="card"> | ||||
| @@ -68,10 +68,10 @@ | ||||
|                                             <div class="dropdown-divider"></div> | ||||
|                                         @endif | ||||
|                                         <a class="dropdown-item" href="{{ route('dashboards.edit', $item->id) }}">{{ trans('general.edit') }}</a> | ||||
|                                         @permission('delete-common-dashboards') | ||||
|                                         @can('delete-common-dashboards') | ||||
|                                             <div class="dropdown-divider"></div> | ||||
|                                             {!! Form::deleteLink($item, 'dashboards.destroy') !!} | ||||
|                                         @endpermission | ||||
|                                         @endcan | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                             </td> | ||||
|   | ||||
| @@ -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