@extends('header') @section('content') {!! Former::open($entityType . 's/bulk')->addClass('listForm') !!}
{!! Former::text('action') !!} {!! Former::text('public_id') !!}
@if (\App\Models\Invoice::canCreate()) @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 @endif {!! 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() !!}  
@if (Auth::user()->isPro() && $entityType == ENTITY_INVOICE) {!! Button::normal(trans('texts.quotes'))->asLinkTo(URL::to('/quotes'))->appendIcon(Icon::create('list')) !!} {!! Button::normal(trans('texts.recurring'))->asLinkTo(URL::to('/recurring_invoices'))->appendIcon(Icon::create('list')) !!} @elseif ($entityType == ENTITY_EXPENSE) {!! Button::normal(trans('texts.vendors'))->asLinkTo(URL::to('/vendors'))->appendIcon(Icon::create('list')) !!} @elseif ($entityType == ENTITY_CLIENT) {!! Button::normal(trans('texts.credits'))->asLinkTo(URL::to('/credits'))->appendIcon(Icon::create('list')) !!} @endif @if (Auth::user()->hasPermission('create_all')) {!! Button::primary(trans("texts.new_$entityType"))->asLinkTo(URL::to("/{$entityType}s/create"))->appendIcon(Icon::create('plus-sign')) !!} @endif
{!! Datatable::table() ->addColumn($columns) ->setUrl(route('api.' . $entityType . 's')) ->setCustomValues('rightAlign', isset($rightAlign) ? $rightAlign : []) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('aaSorting', [[isset($sortCol) ? $sortCol : '1', 'desc']]) ->render('datatable') !!} {!! Former::close() !!} @stop