use default laravel helpers in blade files
This commit is contained in:
parent
3465d69480
commit
82fab7c010
25 changed files with 192 additions and 203 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Http\Middleware\VerifyCsrfToken;
|
||||
use App\Models\User;
|
||||
use Illuminate\Cache\RateLimiting\Limit;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
|
@ -73,7 +74,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||
private function cspReportRoute()
|
||||
{
|
||||
// * CSP REPORT URI, Please add /csp-report to VerifyCsrfToken $except middleware
|
||||
\Illuminate\Support\Facades\Route::post('/csp-report', function () {
|
||||
Route::post('/csp-report', function () {
|
||||
$isCspRequest = request()->header('Content-Type') === 'application/csp-report';
|
||||
if (!$isCspRequest or !request()->json('csp-report') or !is_array(request()->json('csp-report'))) {
|
||||
abort(401);
|
||||
|
|
@ -94,7 +95,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||
$cspReport->implode("\n")
|
||||
));
|
||||
})->middleware('throttle:5,2')
|
||||
->withoutMiddleware(\App\Http\Middleware\VerifyCsrfToken::class)
|
||||
->withoutMiddleware(VerifyCsrfToken::class)
|
||||
->name('cspReportUri');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,65 +3,66 @@
|
|||
@section('description', __('Formulaire d\'authentification au back-office.'))
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8 p-0">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Connexion') }}</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('bo.login') }}">
|
||||
@csrf
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Adresse Email') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email"
|
||||
value="{{ old('email') }}" autocomplete="email" autofocus required>
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Mot de passe') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror"
|
||||
name="password" autocomplete="current-password" required>
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>
|
||||
<label class="form-check-label user-select-none" for="remember">
|
||||
{{ __('Se souvenir de moi') }}
|
||||
</label>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8 p-0">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Connexion') }}</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('bo.login') }}">
|
||||
@csrf
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-4 col-form-label text-md-end" for="email">{{ __('Adresse Email') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control @error('email') is-invalid @enderror" id="email" name="email"
|
||||
type="email" value="{{ old('email') }}" autocomplete="email" autofocus required>
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-8 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<span>{{ __('Connexion') }}</span>
|
||||
<i class="fa-solid fa-arrow-right-from-bracket"></i>
|
||||
</button>
|
||||
@if (Route::has('bo.password.request'))
|
||||
<a class="btn btn-link" href="{{ route('bo.password.request') }}">
|
||||
{{ __('Mot de passe oublié ?') }}
|
||||
</a>
|
||||
@endif
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-4 col-form-label text-md-end" for="password">{{ __('Mot de passe') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control @error('password') is-invalid @enderror" id="password" name="password"
|
||||
type="password" autocomplete="current-password" required>
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" id="remember" name="remember" type="checkbox"
|
||||
{{ old('remember') ? 'checked' : '' }}>
|
||||
<label class="form-check-label user-select-none" for="remember">
|
||||
{{ __('Se souvenir de moi') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-8 offset-md-4">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<span>{{ __('Connexion') }}</span>
|
||||
<i class="fa-solid fa-arrow-right-from-bracket"></i>
|
||||
</button>
|
||||
@if (route()->has('bo.password.request'))
|
||||
<a class="btn btn-link" href="{{ route('bo.password.request') }}">
|
||||
{{ __('Mot de passe oublié ?') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@
|
|||
<input class="d-none form-check-input" id="theme{{ $key }}" name="theme" type="radio"
|
||||
value="{{ $bootstrapTheme->value }}">
|
||||
<label class="dropdown-item w-100 text-decoration-none @if (
|
||||
!is_null(Cache::get('theme'))
|
||||
? $bootstrapTheme->value === intval(Cache::get('theme'))
|
||||
!is_null(cache()->get('theme'))
|
||||
? $bootstrapTheme->value === intval(cache()->get('theme'))
|
||||
: $bootstrapTheme->value === BootstrapThemeEnum::light->value) active @endif p-2"
|
||||
for="theme{{ $key }}" role="button">
|
||||
{{ Str::of($bootstrapTheme->label)->ucFirst() }}
|
||||
{{ str($bootstrapTheme->label)->ucFirst() }}
|
||||
</label>
|
||||
@endforeach
|
||||
</form>
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
<div class="d-flex flex-column align-items-start align-items-lg-end lh-1">
|
||||
<span
|
||||
class="fw-bold">{{ auth('backend')->user()->first_name }} {{ auth('backend')->user()->last_name }}</span>
|
||||
<small class="text-secondary-body">{{ Str::of(auth('backend')->user()->role->label())->ucFirst() }}</small>
|
||||
<small class="text-secondary-body">{{ str(auth('backend')->user()->role->label())->ucFirst() }}</small>
|
||||
</div>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end m-0 text-center" aria-labelledby="navbarDropdown">
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
@auth('backend')
|
||||
<ul class="navbar-nav border-top border-lg-0 mt-lg-0 me-auto mt-2">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if (request()->routeIs('bo.dashboard')) active @endif" data-bs-toggle="tooltip" href="{{ route('bo.dashboard') }}"
|
||||
title="{{ __('Revenir à l\'accueil') }}">
|
||||
<a class="nav-link @if (request()->routeIs('bo.dashboard')) active @endif" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.dashboard') }}" title="{{ __('Revenir à l\'accueil') }}">
|
||||
{{ __('Accueil') }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -10,16 +10,16 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link @if (request()->routeIs('bo.static_pages.*')) active @endif" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.static_pages.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => Str::of(trans_choice('models.classes.static_page', 2))->title()]) }}">
|
||||
{{ Str::of(trans_choice('models.classes.static_page', 2))->title() }}
|
||||
title="{{ __('crud.helpers.list_all', ['model' => str(trans_choice('models.classes.static_page', 2))->title()]) }}">
|
||||
{{ str(trans_choice('models.classes.static_page', 2))->title() }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
@canAny(['isConceptor', 'viewAny'], \App\Models\User::class)
|
||||
<li class="nav-item">
|
||||
<div class="dropdown">
|
||||
<a class="nav-link @if (request()->routeIs('bo.users.*') || request()->routeIs('bo.activity_logs.*')) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
|
||||
aria-expanded="false">
|
||||
<a class="nav-link @if (request()->routeIs('bo.users.*') || request()->routeIs('bo.activity_logs.*')) active @endif dropdown-toggle"
|
||||
data-bs-toggle="dropdown" type="button" aria-expanded="false">
|
||||
{{ __('Avancé') }}
|
||||
</a>
|
||||
<ol class="dropdown-menu">
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
<li>
|
||||
<a class="dropdown-item text-lg-start @if (request()->routeIs('bo.users.*')) active @endif p-2 text-center"
|
||||
data-bs-toggle="tooltip" href="{{ route('bo.users.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => Str::plural(__('models.classes.user'))]) }}">
|
||||
{{ Str::of(__('models.classes.user'))->plural()->ucfirst() }}
|
||||
title="{{ __('crud.helpers.list_all', ['model' => str(__('models.classes.user'))->plural()]) }}">
|
||||
{{ str(__('models.classes.user'))->plural()->ucfirst() }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<a class="dropdown-item text-lg-start @if (request()->routeIs('bo.activity_logs.*')) active @endif p-2 text-center"
|
||||
data-bs-toggle="tooltip" href="{{ route('bo.activity_logs.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => trans_choice('models.classes.activity_log', 2)]) }}">
|
||||
{{ Str::of(trans_choice('models.classes.activity_log', 2))->ucfirst() }}
|
||||
{{ str(trans_choice('models.classes.activity_log', 2))->ucfirst() }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@
|
|||
@can('changeOrder', $model)
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<form class="@if ($loop->first and $models->onFirstPage()) invisible @endif"
|
||||
action="{{ route('bo.' . $routeName . '.change-order', [Str::singular($routeName) => $model, 'direction' => 'up']) }}"
|
||||
method="POST"
|
||||
>
|
||||
action="{{ route('bo.' . $routeName . '.change-order', [str($routeName)->singular() => $model, 'direction' => 'up']) }}"
|
||||
method="POST">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<button class="btn btn-sm btn-outline-secondary @if ($loop->first and $models->onFirstPage()) disabled @endif" data-bs-toggle="tooltip"
|
||||
|
|
@ -13,9 +12,8 @@
|
|||
</button>
|
||||
</form>
|
||||
<form class="@if ($loop->last and $models->currentPage() === $models->lastPage()) invisible @endif"
|
||||
action="{{ route('bo.' . $routeName . '.change-order', [Str::singular($routeName) => $model, 'direction' => 'down']) }}"
|
||||
method="POST"
|
||||
>
|
||||
action="{{ route('bo.' . $routeName . '.change-order', [str($routeName)->singular() => $model, 'direction' => 'down']) }}"
|
||||
method="POST">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<button class="btn btn-sm btn-outline-secondary @if ($loop->last and $models->currentPage() === $models->lastPage()) disabled @endif ms-1" data-bs-toggle="tooltip"
|
||||
|
|
|
|||
|
|
@ -1,16 +1,5 @@
|
|||
{{-- GET ACTUAL PAGINATION --}}
|
||||
@php
|
||||
$pagination = intval(
|
||||
Cache::get(
|
||||
'pagination.' .
|
||||
\Illuminate\Support\Str::slug(
|
||||
request()
|
||||
->route()
|
||||
->getName(),
|
||||
),
|
||||
),
|
||||
);
|
||||
@endphp
|
||||
@php $pagination = intval(cache()->get('pagination.' . str()->slug(request()->route()->getName()))); @endphp
|
||||
@if ($paginator->items())
|
||||
<nav class="pagination-custom d-flex justify-content-between align-items-center">
|
||||
{{-- SELECT ITEMS PER PAGE --}}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
@php
|
||||
$route = request()->route();
|
||||
$routeName = $route->getName();
|
||||
$rst = !is_null(request()->rst) || !Session::has("$routeName.sorted");
|
||||
$rst = !is_null(request()->rst) || !session()->has("$routeName.sorted");
|
||||
$noOrder = !empty($noOrder);
|
||||
$noOrder = $noOrder || (Session::get("$routeName.sort_col") !== 'order' and (Session::has("$routeName.sort_col") or Session::has("$routeName.sort_way")));
|
||||
$noOrder =
|
||||
$noOrder ||
|
||||
(session()->get("$routeName.sort_col") !== 'order' and
|
||||
(session()->has("$routeName.sort_col") or session()->has("$routeName.sort_way")));
|
||||
$noOrder = $noOrder || !empty(request()->search);
|
||||
$ignore = (isset($ignore) and is_array($ignore)) ? $ignore : [];
|
||||
@endphp
|
||||
|
|
@ -38,7 +41,7 @@
|
|||
session("$routeName.sort_way") === 'desc' and session("$routeName.sort_col") === $col)
|
||||
<a class="btn btn-sm btn-outline-secondary text-decoration-none ms-1" data-bs-toggle="tooltip"
|
||||
href="{{ request()->fullUrlWithQuery(array_merge($iArgs, ['sort_way' => 'asc', 'rst' => null])) }}"
|
||||
title="{{ __('crud.other.sort_descending', ['name' => Str::lower($colname)]) }}">
|
||||
title="{{ __('crud.other.sort_descending', ['name' => str($colname)->lower()]) }}">
|
||||
<i class="fas fa-arrow-down 2xs"></i>
|
||||
</a>
|
||||
@endif
|
||||
|
|
@ -48,7 +51,7 @@
|
|||
session("$routeName.sort_way") === 'asc' and session("$routeName.sort_col") === $col)
|
||||
<a class="btn btn-sm btn-outline-secondary text-decoration-none ms-1"
|
||||
href="{{ request()->fullUrlWithQuery(array_merge($iArgs, ['sort_way' => 'desc', 'rst' => null])) }}"data-bs-toggle="tooltip"
|
||||
title="{{ __('crud.other.sort_ascending', ['name' => Str::lower($colname)]) }}">
|
||||
title="{{ __('crud.other.sort_ascending', ['name' => str($colname)->lower()]) }}">
|
||||
<i class="fas fa-arrow-up 2xs"></i>
|
||||
</a>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
<thead>
|
||||
@include('bo.modules.table-col-sorter', [
|
||||
'cols' => [
|
||||
'event' => Str::ucfirst(__('validation.custom.event')),
|
||||
'user' => Str::ucfirst(__('models.classes.user')),
|
||||
'model' => Str::ucfirst(__('validation.custom.model')),
|
||||
'created_at' => Str::ucfirst(__('validation.attributes.created_at')),
|
||||
'event' => str(__('validation.custom.event'))->ucfirst(),
|
||||
'user' => str(__('models.classes.user'))->ucfirst(),
|
||||
'model' => str(__('validation.custom.model'))->ucfirst(),
|
||||
'created_at' => str(__('validation.attributes.created_at'))->ucfirst(),
|
||||
],
|
||||
])
|
||||
</thead>
|
||||
|
|
@ -33,17 +33,19 @@
|
|||
@endif
|
||||
</td>
|
||||
@php
|
||||
$targetModel = $activitylogModel->model_class::where((new $activitylogModel->model_class())->getRouteKeyName(), $activitylogModel->model_id)->first();
|
||||
$targetModel = $activitylogModel->model_class
|
||||
::where((new $activitylogModel->model_class())->getRouteKeyName(), $activitylogModel->model_id)
|
||||
->first();
|
||||
$editRouteName = 'bo.' . optional($targetModel)->getTable() . '.edit';
|
||||
@endphp
|
||||
<td class="bg-{{ $activitylogModel->event->bootstrapClass() }}-subtle text-center align-middle">
|
||||
@if (!empty($targetModel) and Route::has($editRouteName))
|
||||
@if (!empty($targetModel) and route()->has($editRouteName))
|
||||
<a class="btn btn-sm btn-primary text-decoration-none" data-bs-toggle="tooltip"
|
||||
href="{{ route($editRouteName, $activitylogModel->model_id) }}"
|
||||
title="{{ __('crud.helpers.view_model', ['model' => __('models.classes.' . Str::singular($targetModel->getTable()))]) }}">
|
||||
title="{{ __('crud.helpers.view_model', ['model' => __('models.classes.' . str($targetModel->getTable())->singular())]) }}">
|
||||
@endif
|
||||
{{ $activitylogModel->model_class }}
|
||||
@if (!empty($targetModel) and Route::has($editRouteName))
|
||||
@if (!empty($targetModel) and route()->has($editRouteName))
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
|
|
@ -56,7 +58,7 @@
|
|||
@can('isConceptor')
|
||||
<a class="btn btn-sm btn-warning" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.activity_logs.show', ['activity_log' => $activitylogModel]) }}"
|
||||
title="{{ Str::ucfirst(__('crud.actions.view')) }}">
|
||||
title="{{ str(__('crud.actions.view'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
@endcan
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('bo.layout', ['brParam' => $userModel])
|
||||
|
||||
@section('title', Str::ucfirst(trans_choice('models.classes.activity_log', '*')))
|
||||
@section('description', __('Liste de tous les :model', ['model' => trans_choice('models.classes.activity_log', '*')]))
|
||||
@section('title', str(trans_choice('models.classes.activity_log', 2))->ucfirst())
|
||||
@section('description', __('Liste de tous les :model', ['model' => trans_choice('models.classes.activity_log', 2)]))
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@
|
|||
|
||||
@section('title', __('Édition d\'un :model', ['model' => __('models.classes.activity_log')]))
|
||||
@section('description', __('Édition d\'un :model déjà existant', ['model' => __('models.classes.activity_log')]))
|
||||
@section('breadcrumb',
|
||||
request()->route()->getName())
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<div class="d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap pb-3">
|
||||
<div class="d-flex align-items-start flex-row">
|
||||
<a class="btn btn-primary text-decoration-none m-0" data-bs-toggle="tooltip" href="{{ route('bo.activity_logs.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => trans_choice(__('models.classes.activity_log'), '*')]) }}">
|
||||
title="{{ __('crud.helpers.list_all', ['model' => trans_choice(__('models.classes.activity_log'), 2)]) }}">
|
||||
<i class="fa-solid fa-arrow-left"></i>
|
||||
</a>
|
||||
@include('modules.breadcrumbs.breadcrumb-body', ['brParam' => $activitylogModel])
|
||||
|
|
@ -57,13 +56,13 @@
|
|||
@php
|
||||
$editRouteName = 'bo.' . optional($targetModel)->getTable() . '.edit';
|
||||
@endphp
|
||||
@if (isset($targetModel) and Route::has($editRouteName))
|
||||
@if (isset($targetModel) and route()->has($editRouteName))
|
||||
<a class="btn btn-sm btn-primary" data-bs-toggle="tooltip"
|
||||
href="{{ route($editRouteName, $activitylogModel->model_id) }}"
|
||||
title="{{ __('crud.helpers.view_model', ['model' => __('models.classes.' . Str::singular($targetModel->getTable()))]) }}">
|
||||
title="{{ __('crud.helpers.view_model', ['model' => __('models.classes.' . str($targetModel->getTable())->singular())]) }}">
|
||||
@endif
|
||||
{{ $activitylogModel->model_class }}
|
||||
@if (isset($targetModel) and Route::has($editRouteName))
|
||||
@if (isset($targetModel) and route()->has($editRouteName))
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@
|
|||
<div class="row pb-3">
|
||||
<div class="col-12 d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap">
|
||||
<div class="d-flex align-items-start flex-row">
|
||||
<a class="btn btn-primary text-decoration-none m-0" data-bs-toggle="tooltip" href="{{ route('bo.static_pages.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => Str::plural(__('models.classes.static_page'))]) }}">
|
||||
<a class="btn btn-primary text-decoration-none m-0" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.static_pages.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => str(__('models.classes.static_page'))->plural()]) }}">
|
||||
<i class="fa-solid fa-arrow-left"></i>
|
||||
</a>
|
||||
@include('modules.breadcrumbs.breadcrumb-body', ['brParam' => $staticPageModel])
|
||||
|
|
@ -18,7 +19,7 @@
|
|||
<div class="btn-group">
|
||||
<button class="btn btn-primary" id="formSubmitClone" data-bs-toggle="tooltip" type="submit"
|
||||
title="{{ __('crud.helpers.save_model', ['model' => __('models.classes.static_page')]) }}">
|
||||
{{ Str::ucfirst(__('crud.actions.save')) }}
|
||||
{{ str(__('crud.actions.save'))->ucfirst() }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -41,7 +42,7 @@
|
|||
<div class="col text-center">
|
||||
<button class="btn btn-primary" id="formSubmit" data-bs-toggle="tooltip" type="submit"
|
||||
title="{{ __('crud.helpers.save_model', ['model' => __('models.classes.static_page')]) }}">
|
||||
{{ Str::ucfirst(__('crud.actions.save')) }}
|
||||
{{ str(__('crud.actions.save'))->ucfirst() }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{{-- TYPE --}}
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<fieldset class="h-100 border p-3">
|
||||
<legend>{{ Str::ucfirst(__('validation.custom.static_page_type')) }}</legend>
|
||||
<legend>{{ str(__('validation.custom.static_page_type'))->ucfirst() }}</legend>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@include('bo.partials.inputs.tinyint-enum', [
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
{{-- TITLE --}}
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<fieldset class="h-100 border p-3">
|
||||
<legend>{{ Str::ucfirst(__('validation.attributes.title')) }}</legend>
|
||||
<legend>{{ str(__('validation.attributes.title'))->ucfirst() }}</legend>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@include('bo.partials.inputs.varchar', [
|
||||
|
|
@ -47,13 +47,13 @@
|
|||
{{-- SEO_TITLE --}}
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<fieldset class="h-100 border p-3">
|
||||
<legend>{{ Str::ucfirst(__('validation.custom.seo_title')) }}</legend>
|
||||
<legend>{{ str(__('validation.custom.seo_title'))->ucfirst() }}</legend>
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
@include('bo.partials.inputs.varchar', [
|
||||
'id' => 'staticPagesSeoTitle',
|
||||
'label' => __(':field :inter:model', [
|
||||
'field' => Str::ucfirst(__('validation.custom.seo_title')),
|
||||
'field' => str(__('validation.custom.seo_title'))->ucfirst(),
|
||||
'inter' => __('validation.custom.of_the.female'),
|
||||
'model' => trans_choice('models.classes.static_page', 1),
|
||||
]),
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
'max' => 70,
|
||||
])),
|
||||
'placeholder' => __(':field :inter:model', [
|
||||
'field' => Str::ucfirst(__('validation.custom.seo_title')),
|
||||
'field' => str(__('validation.custom.seo_title'))->ucfirst(),
|
||||
'inter' => __('validation.custom.of_the.female'),
|
||||
'model' => trans_choice('models.classes.static_page', 1),
|
||||
]),
|
||||
|
|
@ -86,13 +86,13 @@
|
|||
{{-- SEO_DESCRIPTION --}}
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<fieldset class="h-100 border p-3">
|
||||
<legend>{{ Str::ucfirst(__('validation.custom.seo_description')) }}</legend>
|
||||
<legend>{{ str(__('validation.custom.seo_description'))->ucfirst() }}</legend>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@include('bo.partials.inputs.varchar-multiline', [
|
||||
'id' => 'staticPagesSeoDescription',
|
||||
'label' => __(':field :inter:model', [
|
||||
'field' => Str::ucfirst(__('validation.custom.seo_description')),
|
||||
'field' => str(__('validation.custom.seo_description'))->ucfirst(),
|
||||
'inter' => __('validation.custom.of_the.female'),
|
||||
'model' => trans_choice('models.classes.static_page', 1),
|
||||
]),
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
'max' => 160,
|
||||
])),
|
||||
'placeholder' => __(':field :inter:model', [
|
||||
'field' => Str::ucfirst(__('validation.custom.seo_description')),
|
||||
'field' => str(__('validation.custom.seo_description'))->ucfirst(),
|
||||
'inter' => __('validation.custom.of_the.female'),
|
||||
'model' => trans_choice('models.classes.static_page', 1),
|
||||
]),
|
||||
|
|
@ -124,13 +124,13 @@
|
|||
{{-- CONTENT --}}
|
||||
<div class="col-12 mb-3">
|
||||
<fieldset class="border p-3">
|
||||
<legend>{{ Str::ucfirst(__('validation.attributes.content')) }}</legend>
|
||||
<legend>{{ str(__('validation.attributes.content'))->ucfirst() }}</legend>
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
@include('bo.partials.inputs.text-html', [
|
||||
'id' => 'articleContent',
|
||||
'label' => __(':field :inter:model', [
|
||||
'field' => Str::ucfirst(__('validation.attributes.content')),
|
||||
'field' => str(__('validation.attributes.content'))->ucfirst(),
|
||||
'inter' => __('validation.custom.of_the.female'),
|
||||
'model' => trans_choice('models.classes.static_page', 1),
|
||||
]),
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
<thead>
|
||||
@include('bo.modules.table-col-sorter', [
|
||||
'cols' => [
|
||||
'type' => Str::ucfirst(__('validation.custom.static_page_type')),
|
||||
'title' => Str::ucfirst(__('validation.attributes.title')),
|
||||
'updated_at' => Str::ucfirst(__('validation.attributes.updated_at')),
|
||||
'type' => str(__('validation.custom.static_page_type'))->ucfirst(),
|
||||
'title' => str(__('validation.attributes.title'))->ucfirst(),
|
||||
'updated_at' => str(__('validation.attributes.updated_at'))->ucfirst(),
|
||||
],
|
||||
])
|
||||
</thead>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
@can('update', $staticPageModel)
|
||||
<a class="btn btn-sm btn-primary" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.static_pages.edit', ['static_page' => $staticPageModel]) }}"
|
||||
title="{{ Str::ucfirst(__('crud.actions.update')) }}">
|
||||
title="{{ str(__('crud.actions.update'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-pencil"></i>
|
||||
</a>
|
||||
@endcan
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@extends('bo.layout')
|
||||
|
||||
@section('title', Str::ucfirst(trans_choice('models.classes.static_page', 2)))
|
||||
@section('title', str(trans_choice('models.classes.static_page', 2))->ucfirst())
|
||||
@section('description', __('Liste de toutes les :model', ['model' => trans_choice('models.classes.static_page', 2)]))
|
||||
|
||||
@section('content')
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
@section('title', __('Création d\'un :model', ['model' => __('models.classes.user')]))
|
||||
@section('description', __('Création d\'un tout nouveau :model', ['model' => __('models.classes.user')]))
|
||||
@section('breadcrumb',
|
||||
request()->route()->getName())
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<div class="d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap pb-3">
|
||||
|
|
@ -17,7 +16,7 @@
|
|||
<div class="mb-md-0 mb-2">
|
||||
<button class="btn btn-primary" id="formSubmitClone" data-bs-toggle="tooltip" type="submit"
|
||||
title="{{ __('crud.helpers.save_model', ['model' => __('models.classes.user')]) }}">
|
||||
{{ Str::ucfirst(__('crud.actions.save')) }}
|
||||
{{ str(__('crud.actions.save'))->ucfirst() }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -29,7 +28,7 @@
|
|||
<div class="col text-center">
|
||||
<button class="btn btn-primary" id="formSubmit" data-bs-toggle="tooltip" type="submit"
|
||||
title="{{ __('crud.helpers.save_model', ['model' => __('models.classes.user')]) }}">
|
||||
{{ Str::ucfirst(__('crud.actions.save')) }}
|
||||
{{ str(__('crud.actions.save'))->ucfirst() }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<div class="d-flex align-items-start flex-row">
|
||||
<a class="btn btn-primary text-decoration-none m-0" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.users.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => Str::plural(__('models.classes.user'))]) }}">
|
||||
title="{{ __('crud.helpers.list_all', ['model' => str(__('models.classes.user'))->plural()]) }}">
|
||||
<i class="fa-solid fa-arrow-left"></i>
|
||||
</a>
|
||||
@include('modules.breadcrumbs.breadcrumb-body', ['brParam' => $userModel])
|
||||
|
|
@ -28,13 +28,13 @@
|
|||
@can('duplicate', $userModel)
|
||||
<a class="btn btn-secondary" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.users.duplicate', ['user' => $userModel]) }}"
|
||||
title="{{ Str::ucfirst(__('crud.actions.duplicate')) }}">
|
||||
title="{{ str(__('crud.actions.duplicate'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-copy"></i>
|
||||
</a>
|
||||
@endcan
|
||||
<button class="btn btn-primary" id="formSubmitClone" data-bs-toggle="tooltip" type="submit"
|
||||
title="{{ __('crud.helpers.save_model', ['model' => __('models.classes.user')]) }}">
|
||||
{{ Str::ucfirst(__('crud.actions.save')) }}
|
||||
{{ str(__('crud.actions.save'))->ucfirst() }}
|
||||
</button>
|
||||
@can('delete', $userModel)
|
||||
@csrf
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
<div class="col text-center">
|
||||
<button class="btn btn-primary" id="formSubmit" data-bs-toggle="tooltip" type="submit"
|
||||
title="{{ __('crud.helpers.save_model', ['model' => __('models.classes.user')]) }}">
|
||||
{{ Str::ucfirst(__('crud.actions.save')) }}
|
||||
{{ str(__('crud.actions.save'))->ucfirst() }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
<thead>
|
||||
@include('bo.modules.table-col-sorter', [
|
||||
'cols' => [
|
||||
'role' => Str::ucfirst(__('validation.attributes.role')),
|
||||
'first_name' => Str::ucfirst(__('validation.attributes.first_name')),
|
||||
'last_name' => Str::ucfirst(__('validation.attributes.last_name')),
|
||||
'email' => Str::ucfirst(__('validation.attributes.email')),
|
||||
'published' => Str::ucfirst(__('validation.custom.activated')),
|
||||
'updated_at' => Str::ucfirst(__('validation.attributes.updated_at')),
|
||||
'role' => str(__('validation.attributes.role'))->ucfirst(),
|
||||
'first_name' => str(__('validation.attributes.first_name'))->ucfirst(),
|
||||
'last_name' => str(__('validation.attributes.last_name'))->ucfirst(),
|
||||
'email' => str(__('validation.attributes.email'))->ucfirst(),
|
||||
'published' => str(__('validation.custom.activated'))->ucfirst(),
|
||||
'updated_at' => str(__('validation.attributes.updated_at'))->ucfirst(),
|
||||
],
|
||||
])
|
||||
</thead>
|
||||
|
|
@ -40,14 +40,14 @@
|
|||
@can('duplicate', $userModel)
|
||||
<a class="btn btn-sm btn-secondary" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.users.duplicate', ['user' => $userModel]) }}"
|
||||
title="{{ Str::ucfirst(__('crud.actions.duplicate')) }}">
|
||||
title="{{ str(__('crud.actions.duplicate'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-copy"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('update', $userModel)
|
||||
<a class="btn btn-sm btn-primary" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.users.edit', ['user' => $userModel]) }}"
|
||||
title="{{ Str::ucfirst(__('crud.actions.update')) }}">
|
||||
title="{{ str(__('crud.actions.update'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-pencil"></i>
|
||||
</a>
|
||||
@endcan
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
@csrf
|
||||
@method('DELETE')
|
||||
<button class="btn btn-sm btn-danger" data-bs-toggle="tooltip" type="submit"
|
||||
title="{{ Str::ucfirst(__('crud.actions.delete')) }}">
|
||||
title="{{ str(__('crud.actions.delete'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
@endcan
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('bo.layout')
|
||||
|
||||
@section('title', Str::ucfirst(__('models.classes.user')))
|
||||
@section('description', __('Liste de tous les :model', ['model' => Str::plural(__('models.classes.user'))]))
|
||||
@section('title', str(__('models.classes.user'))->ucfirst())
|
||||
@section('description', __('Liste de tous les :model', ['model' => str(__('models.classes.user'))->plural()]))
|
||||
|
||||
@section('content')
|
||||
<div class="d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap">
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@
|
|||
<input id="{{ $id }}"
|
||||
name="{{ $name }}"
|
||||
type="number"
|
||||
value="{{ Str::replace(',', '.', strval(old($name, $value ?? $model->{$name} ?? 0))) }}"
|
||||
value="{{ str()->replace(',', '.', strval(old($name, $value ?? $model->{$name} ?? 0))) }}"
|
||||
@class([
|
||||
'form-control',
|
||||
'is-invalid' => $errors->has($name)
|
||||
])
|
||||
aria-describedby="{{ $id }}Help"
|
||||
@if(!empty($step))
|
||||
step="{{ Str::replace(',', '.', strval($step)) }}"
|
||||
step="{{ str()->replace(',', '.', strval($step)) }}"
|
||||
@else step="1"
|
||||
@endif
|
||||
@if(!empty($max))
|
||||
|
|
|
|||
|
|
@ -1,47 +1,43 @@
|
|||
@if (!request()->routeIs('login'))
|
||||
@if ($message = Session::get('success', Session::get('bo.success')))
|
||||
<div class="alert alert-success alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
@if ($message = session()->get('success', session()->get('bo.success')))
|
||||
<div class="alert alert-success alert-dismissible fade show m-0 my-4 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button class="btn-close" data-bs-dismiss="alert" type="button" aria-label="{{ __('Fermer') }}"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('error', Session::get('bo.error')))
|
||||
<div class="alert alert-danger alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
@if ($message = session()->get('error', session()->get('bo.error')))
|
||||
<div class="alert alert-danger alert-dismissible fade show m-0 my-4 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-xmark"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button class="btn-close" data-bs-dismiss="alert" type="button" aria-label="{{ __('Fermer') }}"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('warning', Session::get('bo.warning')))
|
||||
<div class="alert alert-warning alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
@if ($message = session()->get('warning', session()->get('bo.warning')))
|
||||
<div class="alert alert-warning alert-dismissible fade show m-0 my-4 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-exclamation"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button class="btn-close" data-bs-dismiss="alert" type="button" aria-label="{{ __('Fermer') }}"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('status', Session::get('bo.status')))
|
||||
<div class="alert alert-info alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
@if ($message = session()->get('status', session()->get('bo.status')))
|
||||
<div class="alert alert-info alert-dismissible fade show m-0 my-4 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-info"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button class="btn-close" data-bs-dismiss="alert" type="button" aria-label="{{ __('Fermer') }}"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('info', Session::get('bo.info')))
|
||||
<div class="alert alert-info alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
@if ($message = session()->get('info', session()->get('bo.info')))
|
||||
<div class="alert alert-info alert-dismissible fade show m-0 my-4 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-info"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
<button class="btn-close" data-bs-dismiss="alert" type="button" aria-label="{{ __('Fermer') }}"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<p class="fw-bold m-0"><i class="fa-solid fa-circle-exclamation"></i> {{ __('Liste des erreurs :') }}</p>
|
||||
<p class="fw-bold m-0"><i class="fa-solid fa-circle-exclamation"></i> {{ __('Liste des erreurs :') }}
|
||||
</p>
|
||||
@if ($errors->any())
|
||||
<ul class="list-unstyled m-0">
|
||||
@foreach ($errors->all() as $error)
|
||||
|
|
|
|||
|
|
@ -7,17 +7,17 @@
|
|||
$input = json_decode(json_encode($input), true);
|
||||
@endphp
|
||||
@switch(intval($input['inputType']))
|
||||
@case(intval(App\Enums\InputType::video->value))
|
||||
@case(intval(App\Enums\InputType::videoVimeo->value))
|
||||
@case(intval(\App\Enums\InputType::video->value))
|
||||
@case(intval(\App\Enums\InputType::videoVimeo->value))
|
||||
|
||||
@case(intval(App\Enums\InputType::videoYoutube->value))
|
||||
@case(intval(\App\Enums\InputType::videoYoutube->value))
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<fieldset class="h-100 border p-3">
|
||||
<legend>{{ $input['label'] }} *</legend>
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
@include('bo.partials.inputs.varchar', [
|
||||
'id' => Str::slug($input['label']),
|
||||
'id' => str($input['label'])->slug(),
|
||||
'label' => $input['label'],
|
||||
'hasWordCounter' => true,
|
||||
'name' => 'data[' . $k . '][value]',
|
||||
|
|
@ -25,9 +25,9 @@
|
|||
'required' => isset($input['required']) ? !empty($input['required']) : true,
|
||||
'model' => $model ?? null,
|
||||
'helper' => match (intval($input['inputType'])) {
|
||||
intval(App\Enums\InputType::videoYoutube->value) => __('video id eg: keZURbOo4-M'),
|
||||
intval(App\Enums\InputType::videoVimeo->value) => __('video id eg: 74918975'),
|
||||
intval(App\Enums\InputType::video->value) => __('video id eg: keZURbOo4-M or 74918975'),
|
||||
intval(\App\Enums\InputType::videoYoutube->value) => __('video id eg: keZURbOo4-M'),
|
||||
intval(\App\Enums\InputType::videoVimeo->value) => __('video id eg: 74918975'),
|
||||
intval(\App\Enums\InputType::video->value) => __('video id eg: keZURbOo4-M or 74918975'),
|
||||
},
|
||||
])
|
||||
@include('modules.input-error', [
|
||||
|
|
@ -39,15 +39,15 @@
|
|||
</div>
|
||||
@break
|
||||
|
||||
@case(intval(App\Enums\InputType::url->value))
|
||||
@case(intval(App\Enums\InputType::string->value))
|
||||
@case(intval(\App\Enums\InputType::url->value))
|
||||
@case(intval(\App\Enums\InputType::string->value))
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<fieldset class="h-100 border p-3">
|
||||
<legend>{{ $input['label'] }} *</legend>
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
@include('bo.partials.inputs.varchar', [
|
||||
'id' => Str::slug($input['label']),
|
||||
'id' => str($input['label'])->slug(),
|
||||
'label' => $input['label'],
|
||||
'hasWordCounter' => true,
|
||||
'name' => 'data[' . $k . '][value]',
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
</div>
|
||||
@break
|
||||
|
||||
@case(intval(App\Enums\InputType::number->value))
|
||||
@case(intval(\App\Enums\InputType::number->value))
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<fieldset class="mb-3 border p-3">
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
<input class="form-control" id="number{{ $k }}" name="data[{{ $k }}][value]" type="number"
|
||||
value="{{ old("data.{$k}.value") ?? ($input['value'] ?? '') }}" aria-describedby="NumberHelp{{ $k }}"
|
||||
step="0.01" placeholder="{{ $input['label'] }}" @if (!isset($input['required']) or $input['required']) required @endif>
|
||||
@include('back::modules.input-error', [
|
||||
@include('modules.input-error', [
|
||||
'inputName' => "data.{$k}.value",
|
||||
'helperId' => "NumberHelp{$k}",
|
||||
'helper' => $input['helper'] ?? '',
|
||||
|
|
@ -102,14 +102,14 @@
|
|||
</div>
|
||||
@break
|
||||
|
||||
@case(intval(App\Enums\InputType::text->value))
|
||||
@case(intval(\App\Enums\InputType::text->value))
|
||||
<div class="col-12 mb-3">
|
||||
<fieldset class="border p-3">
|
||||
<legend>{{ $input['label'] }} *</legend>
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
@include('bo.partials.inputs.text-html', [
|
||||
'id' => Str::slug($input['label']),
|
||||
'id' => str($input['label'])->slug(),
|
||||
'name' => "data[{$k}][value]",
|
||||
'value' => old("data.{$k}.value", $model->data[$k]['value'] ?? null),
|
||||
'model' => $model ?? null,
|
||||
|
|
@ -130,22 +130,22 @@
|
|||
</div>
|
||||
@break
|
||||
|
||||
@case(intval(App\Enums\InputType::boolean->value))
|
||||
@case(intval(\App\Enums\InputType::boolean->value))
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<fieldset class="border p-3">
|
||||
<legend>{{ $input['label'] }} *</legend>
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
<label class="col-form-label"
|
||||
for="{{ Str::slug($input['label']) }}"><b>{{ __('crud.minicrud.visibility_label') }}</b></label>
|
||||
for="{{ str($input['label'])->slug() }}"><b>{{ __('crud.minicrud.visibility_label') }}</b></label>
|
||||
<div class="form-check form-switch ms-2">
|
||||
<input class="form-check-input ml-2" id="{{ Str::slug($input['label']) }}" name="data[{{ $k }}][value]"
|
||||
type="checkbox" value="1" aria-describedby="{{ Str::slug($input['label']) }}Help"
|
||||
@if (old("data.{$k}.value", old('_token') ? false : $model->data[$k]['value'] ?? (null ?? false))) checked @endif>
|
||||
<input class="form-check-input ml-2" id="{{ str($input['label'])->slug() }}"
|
||||
name="data[{{ $k }}][value]" type="checkbox" value="1"
|
||||
aria-describedby="{{ str($input['label'])->slug() }}Help" @if (old("data.{$k}.value", old('_token') ? false : $model->data[$k]['value'] ?? (null ?? false))) checked @endif>
|
||||
</div>
|
||||
@include('modules.input-error', [
|
||||
'inputName' => "data.{$k}.value",
|
||||
'helperId' => Str::slug($input['label']) . 'Help',
|
||||
'helperId' => str($input['label'])->slug() . 'Help',
|
||||
'helper' => __('crud.minicrud.visibility_helper'),
|
||||
])
|
||||
</div>
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
</div>
|
||||
@break
|
||||
|
||||
@case(intval(App\Enums\InputType::image->value))
|
||||
@case(intval(\App\Enums\InputType::image->value))
|
||||
<div class="col-12 mb-3">
|
||||
<fieldset class="h-100 border p-3">
|
||||
<legend>{{ $input['label'] }} *</legend>
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
{{-- PICTURE_ALT --}}
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
@include('bo.partials.inputs.varchar', [
|
||||
'id' => Str::slug($input['label']) . '-alt',
|
||||
'id' => str($input['label'])->slug() . '-alt',
|
||||
'label' => __('crud.minicrud.picture_alt_label'),
|
||||
'hasWordCounter' => true,
|
||||
'name' => 'data[' . $k . '][alt]',
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
{{-- PICTURE_TITLE --}}
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
@include('bo.partials.inputs.varchar', [
|
||||
'id' => Str::slug($input['label']) . '-title',
|
||||
'id' => str($input['label'])->slug() . '-title',
|
||||
'label' => __('crud.minicrud.picture_title_label'),
|
||||
'hasWordCounter' => true,
|
||||
'name' => 'data[' . $k . '][title]',
|
||||
|
|
@ -206,7 +206,7 @@
|
|||
{{-- PICTURE --}}
|
||||
<div class="col-12 mb-3">
|
||||
@include('bo.partials.inputs.varchar-picture', [
|
||||
'id' => Str::slug($input['label']),
|
||||
'id' => str($input['label'])->slug(),
|
||||
'name' => "data[{$k}][value]",
|
||||
'width' => $input['dimensions']['width'],
|
||||
'height' => $input['dimensions']['height'],
|
||||
|
|
@ -228,7 +228,7 @@
|
|||
</div>
|
||||
@break
|
||||
|
||||
@case(App\Enums\InputType::email->value)
|
||||
@case(\App\Enums\InputType::email->value)
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<fieldset class="mb-3 border p-3">
|
||||
|
|
@ -261,17 +261,17 @@
|
|||
</div>
|
||||
@break
|
||||
|
||||
@case(intval(App\Enums\InputType::imageArray->value))
|
||||
@case(intval(App\Enums\InputType::labelArray->value))
|
||||
@case(intval(\App\Enums\InputType::imageArray->value))
|
||||
@case(intval(\App\Enums\InputType::labelArray->value))
|
||||
|
||||
@case(intval(App\Enums\InputType::selectEnum->value))
|
||||
@case(intval(\App\Enums\InputType::selectEnum->value))
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<fieldset class="h-100 border p-3">
|
||||
<legend>{{ $input['label'] }} *</legend>
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
@include('bo.partials.inputs.tinyint-enum', [
|
||||
'id' => Str::slug($input['label']),
|
||||
'id' => str($input['label'])->slug(),
|
||||
'label' => __('crud.minicrud.associated_enum', ['enum' => $input['label']]),
|
||||
'name' => "data[{$k}][value]",
|
||||
'model' => $model ?? null,
|
||||
|
|
|
|||
4
resources/views/vendor/errors/403.blade.php
vendored
4
resources/views/vendor/errors/403.blade.php
vendored
|
|
@ -8,6 +8,6 @@
|
|||
@section('button', true)
|
||||
|
||||
@section('image')
|
||||
{{-- FIXME: Personaliser ca --}}
|
||||
<img src="{{ Vite::asset('resources/assets/images/logo.png') }}" class="logo img-fluid" alt="{{ config('app.name') }}">
|
||||
{{-- FIXME: Personaliser ca --}}
|
||||
<img class="logo img-fluid" src="{{ Vite::asset('resources/assets/images/logo.png') }}" alt="{{ config('app.name') }}">
|
||||
@endsection
|
||||
|
|
|
|||
4
resources/views/vendor/errors/404.blade.php
vendored
4
resources/views/vendor/errors/404.blade.php
vendored
|
|
@ -8,6 +8,6 @@
|
|||
@section('button', true)
|
||||
|
||||
@section('image')
|
||||
{{-- FIXME: Personaliser ca --}}
|
||||
<img src="{{ Vite::asset('resources/assets/images/logo.png') }}" class="logo img-fluid" alt="{{ config('app.name') }}">
|
||||
{{-- FIXME: Personaliser ca --}}
|
||||
<img class="logo img-fluid" src="{{ Vite::asset('resources/assets/images/logo.png') }}" alt="{{ config('app.name') }}">
|
||||
@endsection
|
||||
|
|
|
|||
4
resources/views/vendor/errors/503.blade.php
vendored
4
resources/views/vendor/errors/503.blade.php
vendored
|
|
@ -6,6 +6,6 @@
|
|||
@section('submessage', __('Le site est en maintenance, nous reviendrons...'))
|
||||
|
||||
@section('image')
|
||||
{{-- FIXME: Personaliser ca --}}
|
||||
<img src="{{ Vite::asset('resources/assets/images/logo.png') }}" class="logo img-fluid" alt="{{ config('app.name') }}">
|
||||
{{-- FIXME: Personaliser ca --}}
|
||||
<img class="logo img-fluid" src="{{ Vite::asset('resources/assets/images/logo.png') }}" alt="{{ config('app.name') }}">
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
<td class="header">
|
||||
<a href="{{ $url }}" style="display: inline-block;">
|
||||
@if (trim($slot) === 'Laravel')
|
||||
<img src="https://laravel.com/img/notification-logo.png" class="logo" alt="Laravel Logo">
|
||||
<img class="logo" src="https://laravel.com/img/notification-logo.png" alt="Laravel Logo">
|
||||
@else
|
||||
{{-- FIXME: Personaliser ca --}}
|
||||
<img src="{{ Vite::asset('resources/assets/images/logo.png') }}" class="logo img-fluid" alt="{{ config('app.name') }}">
|
||||
{{ $slot }}
|
||||
{{-- FIXME: Personaliser ca --}}
|
||||
<img class="logo img-fluid" src="{{ Vite::asset('resources/assets/images/logo.png') }}" alt="{{ config('app.name') }}">
|
||||
{{ $slot }}
|
||||
@endif
|
||||
</a>
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue