File: //var/www/ivs.kaunokolegija.lt/laravel/storage/framework/views/e7967abcdc364b05f75d6d9f3f419473.php
<?php $__env->startSection('content'); ?>
<?php if (isset($component)) { $__componentOriginal863456d2b7044be7ea705fd9162e9dfc = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal863456d2b7044be7ea705fd9162e9dfc = $attributes; } ?>
<?php $component = App\View\Components\Modal\CreateNameModal::resolve(['compName' => 'CoopAgreementState','title' => ''.e(trans('global.add')).'','name' => 'name','label' => ''.e(trans('cruds.coopAgreementState.fields.name')).'','route' => ''.e(route('admin.coop-agreement-states.store')).''] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('modal.create-name-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Modal\CreateNameModal::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal863456d2b7044be7ea705fd9162e9dfc)): ?>
<?php $attributes = $__attributesOriginal863456d2b7044be7ea705fd9162e9dfc; ?>
<?php unset($__attributesOriginal863456d2b7044be7ea705fd9162e9dfc); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal863456d2b7044be7ea705fd9162e9dfc)): ?>
<?php $component = $__componentOriginal863456d2b7044be7ea705fd9162e9dfc; ?>
<?php unset($__componentOriginal863456d2b7044be7ea705fd9162e9dfc); ?>
<?php endif; ?>
<?php if (isset($component)) { $__componentOriginalb6f604583085d89333e9288c2d60979f = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalb6f604583085d89333e9288c2d60979f = $attributes; } ?>
<?php $component = App\View\Components\Modal\EditNameModal::resolve(['modalId' => 'updateCoopAgreementStateModal','title' => ''.e(trans('global.edit')).'','fieldName' => 'name','route' => ''.e(route('admin.coop-agreement-states.update', '')).'','label' => ''.e(trans('cruds.coopAgreementState.fields.name')).''] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('modal.edit-name-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Modal\EditNameModal::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalb6f604583085d89333e9288c2d60979f)): ?>
<?php $attributes = $__attributesOriginalb6f604583085d89333e9288c2d60979f; ?>
<?php unset($__attributesOriginalb6f604583085d89333e9288c2d60979f); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalb6f604583085d89333e9288c2d60979f)): ?>
<?php $component = $__componentOriginalb6f604583085d89333e9288c2d60979f; ?>
<?php unset($__componentOriginalb6f604583085d89333e9288c2d60979f); ?>
<?php endif; ?>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('coop_agreement_state_create')): ?>
<div style="margin-bottom: 10px;" class="row">
<div class="col-lg-12">
<button type="button" class="btn btn-success" id="openCoopAgreementStateModal">
<?php echo e(trans('global.add')); ?>
</button>
</div>
</div>
<?php endif; ?>
<div class="card">
<div class="card-header">
<?php echo e(trans('global.list')); ?>
</div>
<div class="card-body">
<table class=" table table-bordered table-striped table-hover ajaxTable datatable datatable-CoopAgreementState">
<thead>
<tr>
<th width="10">
</th>
<th>
<?php echo e(trans('cruds.coopAgreementState.fields.id')); ?>
</th>
<th>
<?php echo e(trans('cruds.coopAgreementState.fields.name')); ?>
</th>
<th>
</th>
</tr>
<tr>
<td>
</td>
<td>
<input class="search" type="text" placeholder="<?php echo e(trans('global.search')); ?>">
</td>
<td>
<input class="search" type="text" placeholder="<?php echo e(trans('global.search')); ?>">
</td>
<td>
</td>
</tr>
</thead>
</table>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<?php echo \Illuminate\View\Factory::parentPlaceholder('scripts'); ?>
<script>
$(function () {
let dtButtons = $.extend(true, [], $.fn.dataTable.defaults.buttons)
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('coop_agreement_state_delete')): ?>
let deleteButtonTrans = '<?php echo e(trans('global.datatables.delete')); ?>';
let deleteButton = {
text: deleteButtonTrans,
url: "<?php echo e(route('admin.coop-agreement-states.massDestroy')); ?>",
className: 'btn-danger',
action: function (e, dt, node, config) {
var ids = $.map(dt.rows({ selected: true }).data(), function (entry) {
return entry.id
});
if (ids.length === 0) {
alert('<?php echo e(trans('global.datatables.zero_selected')); ?>')
return
}
if (confirm('<?php echo e(trans('global.areYouSure')); ?>')) {
$.ajax({
headers: {'x-csrf-token': _token},
method: 'POST',
url: config.url,
data: { ids: ids, _method: 'DELETE' }})
.done(function () { location.reload() })
}
}
}
dtButtons.push(deleteButton)
<?php endif; ?>
let dtOverrideGlobals = {
buttons: dtButtons,
processing: true,
serverSide: true,
retrieve: true,
aaSorting: [],
ajax: "<?php echo e(route('admin.coop-agreement-states.index')); ?>",
columns: [
{ data: 'placeholder', name: 'placeholder' },
{ data: 'id', name: 'id' },
{ data: 'name', name: 'name' },
{ data: 'actions', name: '<?php echo e(trans('global.actions')); ?>' }
],
orderCellsTop: true,
order: [[ 1, 'desc' ]],
pageLength: 10,
};
let table = $('.datatable-CoopAgreementState').DataTable(dtOverrideGlobals);
$('a[data-toggle="tab"]').on('shown.bs.tab click', function(e){
$($.fn.dataTable.tables(true)).DataTable()
.columns.adjust();
});
let visibleColumnsIndexes = null;
$('.datatable thead').on('input', '.search', function () {
let strict = $(this).attr('strict') || false
let value = strict && this.value ? "^" + this.value + "$" : this.value
let index = $(this).parent().index()
if (visibleColumnsIndexes !== null) {
index = visibleColumnsIndexes[index]
}
table
.column(index)
.search(value, strict)
.draw()
});
table.on('column-visibility.dt', function(e, settings, column, state) {
visibleColumnsIndexes = []
table.columns(":visible").every(function(colIdx) {
visibleColumnsIndexes.push(colIdx);
});
})
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/ivs.kaunokolegija.lt/laravel/resources/views/admin/coopAgreementStates/index.blade.php ENDPATH**/ ?>