@extends('layouts/default')
{{-- Page title --}}
@section('title')
{{ trans('admin/licenses/general.view') }}
- {{ $license->name }}
@parent
@stop
@section('header_right')
@endsection
{{-- Page content --}}
@section('content')
@can('update', $license)
@endcan
{{ trans('general.assigned') }}
{{ trans('general.available') }}
{{ trans('general.history') }}
@can('licenses.files', $license)
{{ trans('general.files') }}
@endcan
@can('update', $license)
{{ trans('admin/licenses/general.edit') }}
{{ trans('admin/licenses/general.clone') }}
@endcan
@can('checkout', $license)
@if (($license->availCount()->count() > 0) && (!$license->isInactive()))
{{ trans('general.checkout') }}
{{ trans('admin/licenses/general.bulk.checkout_all.button') }}
@else
{{ trans('general.checkout') }}
{{ trans('admin/licenses/general.bulk.checkout_all.button') }}
@endif
@endcan
@can('checkin', $license)
@if (($license->seats - $license->availCount()->count()) <= 0 )
{{ trans('admin/licenses/general.bulk.checkin_all.button') }}
@else
{{ trans('admin/licenses/general.bulk.checkin_all.button') }}
@endif
@endcan
@can('delete', $license)
@if ($license->availCount()->count() == $license->seats)
{{ trans('general.delete') }}
@else
{{ trans('general.delete') }}
@endif
@endcan
@can('checkout', \App\Models\License::class)
@include ('modals.confirm-action',
[
'modal_name' => 'checkoutFromAllModal',
'route' => route('licenses.bulkcheckout', $license->id),
'title' => trans('general.modal_confirm_generic'),
'body' => trans_choice('admin/licenses/general.bulk.checkout_all.modal', 2, ['available_seats_count' => $available_seats_count])
])
@endcan
@can('update', \App\Models\License::class)
@include ('modals.upload-file', ['item_type' => 'license', 'item_id' => $license->id])
@endcan
@stop
@section('moar_scripts')
@include ('partials.bootstrap-table')
@stop