@extends('header') @section('content') {!! Former::open(Utils::pluralizeEntityType($entityType) . '/bulk')->addClass('listForm') !!}
@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 ($entityType == ENTITY_EXPENSE_CATEGORY) {!! 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 {!! Datatable::table() ->addColumn($columns) ->setUrl(route('api.' . Utils::pluralizeEntityType($entityType))) ->setCustomValues('rightAlign', isset($rightAlign) ? $rightAlign : []) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('aaSorting', [[isset($sortCol) ? $sortCol : '1', 'desc']]) ->render('datatable') !!} @if ($entityType == ENTITY_PAYMENT) @endif {!! Former::close() !!} @stop