@extends('layouts.publicador.default') @section('modal') @endsection @section('content')

{{ $title }}

{{-- @can($permissionexcluir) @endcan --}}
@if (session('status-success')) @endif @if (session('status-error')) @endif
{{ html()->form('GET', route($route . '.index'))->class(['form'])->novalidate()->open() }}
@foreach ($lista2search as $row)
@foreach ($row as $column) @if ($column) @php $floating = isset($column['label']) && $column['type'] !== 'daterange'; $inlinelabel = !$floating && $column['type'] === 'daterange'; $inlinelabel_left = false; @endphp
@if ($inlinelabel_left) {{ $column['label'] }} @endif
@if ($floating)
@endif @switch($column['type']) @case('text') {{ html()->text($column['name'], request($column['name']))->class('form-control')->placeholder($column['placeholder'])->autocomplete(false) }} @break @case('email') {{ html()->email($column['name'], request($column['name']))->class('form-control')->placeholder($column['placeholder'])->autocomplete(false) }} @break @case('select') {{ html()->select($column['name'], $column['options'], request($column['name']))->class('form-select')->placeholder($column['placeholder']) }} @break @case('date') {{ html()->date($column['name'], request($column['name']))->class('form-control') }} @break @case('daterange')
{{ html()->date($column['name'], request($column['name']))->class('form-control') }} {{ html()->label('Data inicial (' . $column['label'] . ')', $column['name'])->class([]) }}
@lang('labels.ate')
{{ html()->date($column['name_ate'], request($column['name_ate']))->class('form-control') }} {{ html()->label('Data final (' . $column['label'] . ')', $column['name'])->class([]) }}
@break @endswitch @if (!$inlinelabel && isset($column['label'])) {{ html()->label($column['label'], $column['name'])->class(['form-label' => $floating]) }} @endif @if ($floating)
@endif
@else
@endif
@endforeach
@endforeach @if (auth()->user()->hasRole('admin') && request()->has('apenas_excluidos')) @endif
{{ html()->submit('Pesquisar')->class(['btn btn-color3 px-4 mx-2 mb-2 mb-sm-0']) }} Limpar
{{ html()->form()->close() }}
{{ __('labels.total') }}: {{ $lista->total() }} @choice($nomeitem, $lista->total())
@if ($lista->total() > 0)
{!! __('Mostrando de') . ' ' . $lista->firstItem() . ' ' . __('até') . ' ' . $lista->lastItem() !!}
@else
{{ __('Nenhum resultado encontrado') }}
@endif
@if (Route::has($route . '.adicionar')) @can($permissionadicionar) @endcan @endif @if (Route::has($route . '.export')) @endif @unless ($lista->isEmpty())
@foreach ($lista2table as $column) @endforeach @if (auth()->user()->hasRole('admin')) @endif @foreach ($lista as $item) @foreach ($lista2table as $column) @php $column['type'] = $column['type'] ?? 'string'; @endphp @endforeach @if (auth()->user()->hasRole('admin')) @endif @endforeach
{{ $column['header'] }}Status Excluído porAções
@if (isset($column['href'])) @elseif ($loop->first) @can($permissioneditar) @endcan @endif @switch($column['type']) @case('email') @php $text = explode('@', $column['content']($item)); $pre = $text[0]; $post = $text[1]; @endphp  {{ $pre }}{{ '@' }}{{ $post }} @break @case('checkbox') @php $field = $column['field']; @endphp @can($permissioneditar)
{{ html()->checkbox($field, $item->$field == 1, $item->id)->id($field . '_' . $item->id)->class(['form-check-input', 'checkbox_ajax', 'checked-tr-' . $column['tr_danger'] => $column['tr_danger']])->disabled($column['disabled'])->data('id', $item->id) }} {{ html()->label('', $field . '_' . $item->id)->class('form-check-label') }}
@else {{ $item->$field ? 'Sim' : 'Não' }} @endcan @break @case('badge') @break @case('boldsubtitle')
@if ($column['size'])
{{ Str::limit($column['content']($item), $column['size']) }}
@else {{ $column['content']($item) }} @endif {{ $column['subcontent']($item) }}
@break @case('bold')
{{ $column['content']($item) }}
@break @case('truncated')
{{ Str::limit($column['content']($item), $column['size']) }}
@break @case('text') {{ $column['content']($item) ?? '-' }} @if ($loop->first) @can($permissioneditar) @endcan @endif @endswitch @if (isset($column['href'])) @elseif ($loop->first) @can($permissioneditar) @endcan @endif
@if ($item->deleted_at) Excluído {{ $item->deleted_at->format('d/m/Y H:i') }} @else Ativo @endif @if ($item->deleted_at && isset($item->deletedByUser))
{{ $item->deletedByUser->name ?? '-' }}
@else - @endif
@if (!$item->deleted_at) @can($permissioneditar) @if (Route::has($route . '.editar_tamanhos')) @endif @php $actions = isset($actions) ? $actions : []; @endphp @foreach ($actions as $action) @endforeach @endcan @can($permissionexcluir) {{ html()->form('DELETE')->route($route . '.excluir', [$item->id])->class(['form-delete', 'd-inline'])->open() }} {{ html()->form()->close() }} @endcan @else @if (auth()->user()->hasRole('admin') && Route::has($route . '.restore', $item->id)) {{ html()->form('PATCH', route($route . '.restore', $item->id))->class(['d-inline'])->id('restore-form-' . $item->id)->open() }} {{ html()->closeForm() }} @else Deletado @endif @endif
{{ $lista->appends(request()->query())->onEachSide(1)->links('pagination::bootstrap-4') }}
@if ($lista->total() > 0) {!! 'Mostrando de ' . $lista->firstItem() . ' até ' . $lista->lastItem() !!} @else {{ 'Nenhum resultado encontrado' }} @endif
@else
Não há @choice($nomeitem, 2) a exibir.
@endunless
@if ($script->hasActualContent()) {{ $script }} @endif @endsection