{!! Former::open(Utils::pluralizeEntityType($entityType) . '/bulk')->addClass('listForm') !!}
{!! Former::text('action') !!} {!! Former::text('public_id') !!} {!! Former::text('datatable')->value('true') !!}
@can('create', 'invoice') @if ($entityType == ENTITY_TASK) {!! Button::primary(trans('texts.invoice'))->withAttributes(['class'=>'invoice', 'onclick' =>'submitForm("invoice")'])->appendIcon(Icon::create('check')) !!} @endif @if ($entityType == ENTITY_EXPENSE) {!! Button::primary(trans('texts.invoice'))->withAttributes(['class'=>'invoice', 'onclick' =>'submitForm("invoice")'])->appendIcon(Icon::create('check')) !!} @endif @endcan @if (in_array($entityType, [ENTITY_EXPENSE_CATEGORY, ENTITY_PRODUCT])) {!! Button::normal(trans('texts.archive'))->asLinkTo('javascript:submitForm("archive")')->appendIcon(Icon::create('trash')) !!} @else {!! DropdownButton::normal(trans('texts.archive'))->withContents([ ['label' => trans('texts.archive_'.$entityType), 'url' => 'javascript:submitForm("archive")'], ['label' => trans('texts.delete_'.$entityType), 'url' => 'javascript:submitForm("delete")'], ])->withAttributes(['class'=>'archive'])->split() !!} @endif  
@if (empty($clientId)) @if ($entityType == ENTITY_EXPENSE) {!! Button::normal(trans('texts.categories'))->asLinkTo(URL::to('/expense_categories'))->appendIcon(Icon::create('list')) !!} @endif @if (Auth::user()->can('create', $entityType)) {!! Button::primary(trans("texts.new_{$entityType}"))->asLinkTo(url(Utils::pluralizeEntityType($entityType) . '/create'))->appendIcon(Icon::create('plus-sign')) !!} @endif @endif
{!! Datatable::table() ->addColumn(Utils::trans($datatable->columnFields())) ->setUrl(url('api/' . Utils::pluralizeEntityType($entityType) . '/' . (isset($clientId) ? $clientId : ''))) ->setCustomValues('rightAlign', isset($rightAlign) ? $rightAlign : []) ->setCustomValues('entityType', Utils::pluralizeEntityType($entityType)) ->setCustomValues('clientId', isset($clientId) && $clientId) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('aaSorting', [[isset($sortCol) ? $sortCol : '1', 'desc']]) ->render('datatable') !!} @if ($entityType == ENTITY_PAYMENT) @endif {!! Former::close() !!}