@extends('layouts.admin.theme') @section('title', env('APP_NAME') . ' :: ' . __('Gerenciador de Temas')) @section('content')
@php $headLine = " " . __('Gerenciador de Temas'); @endphp @include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => __($headLine), 'routeBack' => 'admin.dashboard', 'routeBackParams' => [], 'nameBack' => __('Voltar'), 'routeAdd' => 'admin.temas.create', 'routeAddParams' => [], 'nameAdd' => __('Novo tema'), 'permission' => 'GERENCIADOR_DE_TEMAS', ])
@include('errors.messageFlash')
{{ __('Como usar:') }} {{ __('Crie temas personalizados para campanhas especiais ou ajuste as cores do portal. O tema ativo será aplicado automaticamente ao portal público e/ou ao painel administrativo.') }}
@forelse ($temas as $index => $tema) {{ $index + 1 }}
{{ $tema->name }} @if ($tema->is_default) {{ __('Padrão') }} @endif @if ($tema->isDarkModeTheme()) {{ __('Noturno') }} @endif
@if ($tema->is_active_public) {{ __('Portal Público') }} @endif @if ($tema->is_active_admin) {{ __('Painel Admin') }} @endif @if (!$tema->is_active_public && !$tema->is_active_admin) {{ __('Inativo') }} @endif
@include('components.buttons._editButton', [ 'route' => 'admin.temas.edit', 'id' => [$tema->id], 'fontawesome' => '', 'title' => __('Editar'), 'permission' => 'GERENCIADOR_DE_TEMAS', ]) @if (!$tema->is_default)
@csrf
is_active_public || $tema->is_active_admin) ? 'checked' : '' }} onchange=" var isChecked = this.checked; document.getElementById('apply_public_{{ $tema->id }}').value = isChecked ? '1' : '0'; document.getElementById('apply_admin_{{ $tema->id }}').value = isChecked ? '1' : '0'; document.getElementById('activate-form-{{ $tema->id }}').submit(); " style="width: 3rem; height: 1.5rem; cursor: pointer;">
@endif @if (!$tema->is_default && !$tema->is_active_public && !$tema->is_active_admin) @include('components.buttons._deleteButton', [ 'message' => __('* Este tema será excluído e esta ação não poderá ser desfeita, deseja continuar?'), 'route' => 'admin.temas.destroy', 'id' => [$tema->id], 'fontawesome' => '', 'title' => __('Excluir'), 'permission' => 'GERENCIADOR_DE_TEMAS', ]) @endif
@empty {{ __('Nenhum tema cadastrado até o momento.') }} @endforelse
@endsection