@extends('layouts.admin.theme') @section("title", env("APP_NAME") . " :: Lista de Notícias") @section('content')
@php $headLine = " Lista de Notícias"; @endphp @include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => __($headLine), 'routeAdd' => 'admin.noticias.create', 'routeAddParams' => [], 'nameAdd' => __('Nova notícia'), "permission" => "GERENCIADOR_DE_NOTICIAS", ])
{{ __('Total de notícias publicadas') }}: {{ number_format($totalNoticiasPublicadas, 0, ',', '.') }}
@include("errors.messageFlash") @php $noticiasListQueryParams = ['page' => request()->input('page', 1)]; foreach (['q', 'dta', 'secretaria_id', 'ano', 'categoria'] as $noticiasListKey) { if (request()->filled($noticiasListKey)) { $noticiasListQueryParams[$noticiasListKey] = request($noticiasListKey); } } @endphp
{{ __('Limpar') }}
@php $pathSystem = $_SERVER['DOCUMENT_ROOT'] . "/"; $angraDefault = asset("/pmar/assets/img/angra-default.png"); @endphp @php $index = 0; @endphp @foreach($noticias as $noticia) @include('components.tables._openPhoto', [ 'asset' => file_exists( $pathSystem . $noticia->featuredPhoto ) ? $noticia->featuredPhoto : $angraDefault, 'alt' => $noticia->title, 'title' => $noticia->title, 'text' => 'Visualizar foto', ]) {{ date("d/m/Y H:m:s", strtotime($noticia->created_at)) }} {{ $noticia->title }} {!! Str::limit($noticia->summary, 50) !!} @include('components.buttons._status', [ "index" => $index, "route" => "admin.noticias.fix", "id" => $noticia->id, "status" => $noticia->fix, "permission" => "GERENCIADOR_DE_NOTICIAS", "queryParams" => $noticiasListQueryParams, ]) @include('components.buttons._status', [ "index" => $index, "route" => "admin.noticias.status", "id" => $noticia->id, "status" => $noticia->status, "permission" => "GERENCIADOR_DE_NOTICIAS", "queryParams" => $noticiasListQueryParams, ])
@include('components.buttons._editButton', [ "route" => "admin.noticias.edit", "id" => $noticia->id, "title" => "Editar", "fontawesome" => null, "permission" => "GERENCIADOR_DE_NOTICIAS", ]) @include('components.buttons._deleteButton', [ "message" => __("* Esta notícia será excluída e esta ação não poderá ser desfeita, deseja continuar??"), "route" => "admin.noticias.destroy", "id" => $noticia->id, "title" => "Excluir", "fontawesome" => null, "permission" => "GERENCIADOR_DE_NOTICIAS", "queryParams" => $noticiasListQueryParams, ])
@php $index++; @endphp @endforeach
@endsection