diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index d879f29d1c..0d8f3a642f 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -382,25 +382,37 @@
@can('update', $license) - {{ trans('admin/licenses/general.edit') }} - {{ trans('admin/licenses/general.clone') }} + {{ trans('admin/licenses/general.edit') }} + {{ trans('admin/licenses/general.clone') }} @endcan - @can('checkout', $license) - @if ($license->availCount()->count() > 0) - Checkout - Checkout Remaining to All Users - @else - Checkout - Checkout Remaining to All Users - @endif - @endcan + @can('checkout', $license) + @if ($license->availCount()->count() > 0) + + Checkout + + Checkout Remaining to All Users + @else + + Checkout + + + Checkout Remaining to All Users + + @endif + @endcan - @can('checkin', $license) - @if (($license->seats - $license->availCount()->count()) > 0 ) - Checkin All - @endif - @endcan + @can('checkin', $license) + @if (($license->seats - $license->availCount()->count()) > 0 ) + + Checkin All + + @else + + Checkin All + + @endif + @endcan @can('delete', $license) @@ -592,8 +604,24 @@
-@can('update', \App\Models\License::class) - @include ('modals.confirm-action', ['item_type' => 'user', 'item_id' => $user->id]) +@can('checkin', \App\Models\License::class) + @include ('modals.confirm-action', + [ + 'modal_name' => 'checkinFromAllModal', + 'route' => route('licenses.bulkcheckin', $license->id), + 'title' => trans('general.license_checkin_all_confirm_modal_header'), + 'body' => trans_choice('general.license_checkin_all_confirm_modal_body', 2, ['count' => ($license->seats - $license->availCount()->count())]) + ]) +@endcan + +@can('checkout', \App\Models\License::class) + @include ('modals.confirm-action', + [ + 'modal_name' => 'checkoutFromAllModal', + 'route' => route('licenses.bulkcheckout', $license->id), + 'title' => trans('general.license_checkout_all_confirm_modal_header'), + 'body' => trans_choice('general.license_checkout_all_confirm_modal_body', 2, ['count' => $license->availCount()->count()]) + ]) @endcan @can('update', \App\Models\License::class)