{!! Former::open(Utils::pluralizeEntityType($entityType) . '/bulk') ->addClass('listForm_' . $entityType) !!}
{!! Former::text('action')->id('action_' . $entityType) !!} {!! Former::text('public_id')->id('public_id_' . $entityType) !!} {!! Former::text('datatable')->value('true') !!}
@can('create', 'invoice') @if ($entityType == ENTITY_TASK) {!! Button::primary(trans('texts.invoice'))->withAttributes(['class'=>'invoice', 'onclick' =>'submitForm_'.$entityType.'("invoice")'])->appendIcon(Icon::create('check')) !!} @endif @if ($entityType == ENTITY_EXPENSE) {!! Button::primary(trans('texts.invoice'))->withAttributes(['class'=>'invoice', 'onclick' =>'submitForm_'.$entityType.'("invoice")'])->appendIcon(Icon::create('check')) !!} @endif @endcan {!! DropdownButton::normal(trans('texts.archive'))->withContents([ ['label' => trans('texts.archive_'.$entityType), 'url' => 'javascript:submitForm_'.$entityType.'("archive")'], ['label' => trans('texts.delete_'.$entityType), 'url' => 'javascript:submitForm_'.$entityType.'("delete")'], ])->withAttributes(['class'=>'archive'])->split() !!}  
@if ($entityType == ENTITY_EXPENSE) {!! Button::normal(trans('texts.categories'))->asLinkTo(URL::to('/expense_categories'))->appendIcon(Icon::create('list')) !!} @elseif ($entityType == ENTITY_TASK) {!! Button::normal(trans('texts.projects'))->asLinkTo(URL::to('/projects'))->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
{!! Datatable::table() ->addColumn(Utils::trans($datatable->columnFields())) ->setUrl(url('api/' . Utils::pluralizeEntityType($entityType) . '/' . (isset($clientId) ? $clientId : (isset($vendorId) ? $vendorId : '')))) ->setCustomValues('rightAlign', isset($rightAlign) ? $rightAlign : []) ->setCustomValues('entityType', Utils::pluralizeEntityType($entityType)) ->setCustomValues('clientId', isset($clientId) && $clientId) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('aaSorting', [[isset($clientId) ? ($datatable->sortCol-1) : $datatable->sortCol, 'desc']]) ->render('datatable') !!} @if ($entityType == ENTITY_PAYMENT) @endif {!! Former::close() !!}