mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 05:47:28 -08:00
Gates the dropdown based on user permissions
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
f6d7ea19e4
commit
2218c94aa3
|
@ -1,24 +1,33 @@
|
||||||
<div id="userBulkEditToolbar">
|
@can('view', \App\Models\User::class)
|
||||||
|
<div id="userBulkEditToolbar">
|
||||||
{{ Form::open([
|
{{ Form::open([
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'route' => ['users/bulkedit'],
|
'route' => ['users/bulkedit'],
|
||||||
'class' => 'form-inline',
|
'class' => 'form-inline',
|
||||||
'id' => 'usersBulkForm']) }}
|
'id' => 'usersBulkForm']) }}
|
||||||
|
|
||||||
@if (request('status')!='deleted')
|
@if (request('status')!='deleted')
|
||||||
@can('delete', \App\Models\User::class)
|
@can('delete', \App\Models\User::class)
|
||||||
<div id="users-toolbar">
|
<div id="users-toolbar">
|
||||||
<label for="bulk_actions" class="sr-only">{{ trans('general.bulk_actions') }}</label>
|
<label for="bulk_actions" class="sr-only">{{ trans('general.bulk_actions') }}</label>
|
||||||
<select name="bulk_actions" class="form-control select2" style="min-width:300px;" aria-label="bulk_actions">
|
<select name="bulk_actions" class="form-control select2" style="min-width:300px;" aria-label="bulk_actions">
|
||||||
<option value="edit">{{ trans('general.bulk_edit') }}</option>
|
|
||||||
<option value="delete">{!! trans('general.bulk_checkin_delete') !!}</option>
|
@can('update', \App\Models\User::class)
|
||||||
<option value="merge">{!! trans('general.merge_users') !!}</option>
|
<option value="edit">{{ trans('general.bulk_edit') }}</option>
|
||||||
<option value="bulkpasswordreset">{{ trans('button.send_password_link') }}</option>
|
<option value="merge">{!! trans('general.merge_users') !!}</option>
|
||||||
<option value="print">{{ trans('admin/users/general.print_assigned') }}</option>
|
@endcan
|
||||||
</select>
|
|
||||||
<button class="btn btn-primary" id="bulkUserEditButton" disabled>{{ trans('button.go') }}</button>
|
@can('delete', \App\Models\User::class)
|
||||||
</div>
|
<option value="delete">{!! trans('general.bulk_checkin_delete') !!}</option>
|
||||||
@endcan
|
@endcan
|
||||||
@endif
|
|
||||||
{{ Form::close() }}
|
<option value="bulkpasswordreset">{{ trans('button.send_password_link') }}</option>
|
||||||
</div>
|
<option value="print">{{ trans('admin/users/general.print_assigned') }}</option>
|
||||||
|
</select>
|
||||||
|
<button class="btn btn-primary" id="bulkUserEditButton" disabled>{{ trans('button.go') }}</button>
|
||||||
|
</div>
|
||||||
|
@endcan
|
||||||
|
@endif
|
||||||
|
{{ Form::close() }}
|
||||||
|
</div>
|
||||||
|
@endcan
|
||||||
|
|
Loading…
Reference in a new issue