File manager - Edit - /var/www/html/portal/resources/views/admin/observatorio/indicadores/index.blade.php
Back
@extends('layouts.admin.theme') @section('title', env('APP_NAME') . ' :: ' . __('Observatório - Indicadores')) @section('content') @include('admin.observatorio.partials._assets') @include('errors.messageFlash') <div class="card shadow-sm"> @php $headLine = "<i class='fa-solid fa-chart-line'></i> " . __('Observatório - Indicadores'); @endphp @include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => __($headLine), 'routeBack' => 'admin.dashboard', 'routeBackParams' => [], 'nameBack' => __('Voltar'), 'routeAdd' => 'admin.observatorio.indicadores.create', 'routeAddParams' => request()->only(['q', 'tema_id', 'observatorio', 'page']), 'nameAdd' => __('Novo indicador'), 'permission' => 'GERENCIADOR_DO_OBSERVATORIO', 'tabs' => [ ['route' => 'admin.observatorio.temas.index', 'class' => 'fa-tags', 'label' => __('Temas'), 'permission' => 'GERENCIADOR_DO_OBSERVATORIO'], ['route' => 'admin.observatorio.mapaTemas.index', 'class' => 'fa-layer-group', 'label' => __('Temas de Mapas'), 'permission' => 'GERENCIADOR_DO_OBSERVATORIO'], ['route' => 'admin.observatorio.mapas.index', 'class' => 'fa-map', 'label' => __('Mapas'), 'permission' => 'GERENCIADOR_DO_OBSERVATORIO'], ], ]) <div class="card-body"> <form method="get" class="row g-2 mb-3"> <div class="col-md-6"> <label class="form-label">{{ __('Buscar') }}</label> <input type="text" class="form-control" name="q" value="{{ request('q') }}" placeholder="{{ __('Nome do indicador') }}"> </div> <div class="col-md-3"> <label class="form-label">{{ __('Tema') }}</label> <select class="form-select" name="tema_id"> <option value="">{{ __('Todos') }}</option> @foreach($temas as $tema) <option value="{{ $tema->id }}" @selected((string) request('tema_id') === (string) $tema->id)>{{ $tema->nome }}</option> @endforeach </select> </div> <div class="col-md-2"> <label class="form-label">{{ __('Observatório') }}</label> <select class="form-select" name="observatorio"> <option value="">{{ __('Todos') }}</option> <option value="1" @selected(request('observatorio') === '1')>{{ __('Sim') }}</option> <option value="0" @selected(request('observatorio') === '0')>{{ __('Não') }}</option> </select> </div> <div class="col-md-1 d-flex align-items-end"> <button class="btn btn-success w-100" type="submit">{{ __('Filtrar') }}</button> </div> </form> <x-tables._table :thead="[__('Nome'), __('Tema'), __('Fonte'), __('Observatório'), __('Destaque'), __('Status'), __('Ações')]" :pagination="$registros->links()"> <x-slot name="body"> @forelse($registros as $registro) <tr> <td class="text-start">{{ $registro->nome }}</td> <td>{{ $registro->tema->nome ?? '-' }}</td> <td>{{ $registro->fonte->descricao ?? '-' }}</td> <td> @if($registro->observatorio) <span class="badge bg-success">{{ __('Sim') }}</span> @else <span class="badge bg-secondary">{{ __('Não') }}</span> @endif </td> <td> @if($registro->destaque) <i class="fa-solid fa-star text-warning"></i> @else <i class="fa-regular fa-star text-muted"></i> @endif </td> <td> <span class="badge {{ $registro->status === 'ATIVADO' ? 'bg-primary' : 'bg-secondary' }}">{{ __($registro->status) }}</span> </td> <td> <div class="d-flex justify-content-center gap-2"> @if(auth()->user()->getPermissaoDetalhes('GERENCIADOR_DO_OBSERVATORIO')['editar']) <a class="btn btn-sm btn-warning" href="{{ route('admin.observatorio.indicadores.edit', [$registro->id] + request()->only(['q', 'tema_id', 'observatorio', 'page'])) }}"> <i class="fa-solid fa-pen-to-square"></i> </a> @endif @if(auth()->user()->getPermissaoDetalhes('GERENCIADOR_DO_OBSERVATORIO')['excluir']) <form class="d-inline" action="{{ route('admin.observatorio.indicadores.destroy', $registro->id) }}" method="post" data-confirm-delete> @csrf @method('delete') @foreach(request()->only(['q', 'tema_id', 'observatorio', 'page']) as $key => $value) <input type="hidden" name="{{ $key }}" value="{{ $value }}"> @endforeach <input type="hidden" name="confirm" value="{{ __('* Este registro será excluído e esta ação não poderá ser desfeita, deseja continuar?') }}"> <button type="submit" class="btn btn-sm btn-danger"> <i class="fa-solid fa-trash"></i> </button> </form> @endif </div> </td> </tr> @empty <tr> <td colspan="7" class="text-center">{{ __('Nenhum registro encontrado.') }}</td> </tr> @endforelse </x-slot> </x-tables._table> </div> </div> @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings