update with base project
This commit is contained in:
parent
8a098a39ed
commit
69a4927371
41 changed files with 320 additions and 286 deletions
|
|
@ -5,7 +5,6 @@ namespace App\Models;
|
|||
use App\Enums\ActivityLogs\ActivityLogsEventEnum;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
|
|
@ -20,7 +19,6 @@ use Illuminate\Support\Str;
|
|||
class ActivityLog extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
* Indicates if the model should be timestamped.
|
||||
|
|
|
|||
|
|
@ -112,16 +112,4 @@ class User extends Authenticatable
|
|||
$model->password = Hash::make($model->password);
|
||||
}
|
||||
}
|
||||
|
||||
// * RELATIONS
|
||||
|
||||
/**
|
||||
* Activities logs One-to-many relationship.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function activityLogs(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(ActivityLog::class);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,8 +122,9 @@ class UserPolicy
|
|||
*/
|
||||
public function changePublished(User $authUser, User $user): bool
|
||||
{
|
||||
return $authUser->getRouteKey() !== $user->getRouteKey() and
|
||||
return ($user->getRouteKey()) ? $authUser->getRouteKey() !== $user->getRouteKey() and
|
||||
UserStaticRules::atLeastRole($authUser, RoleEnum::admin) and
|
||||
UserStaticRules::atLeastRole($authUser, $user->role);
|
||||
UserStaticRules::atLeastRole($authUser, $user->role) :
|
||||
UserStaticRules::atLeastRole($authUser, RoleEnum::admin);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,4 +20,16 @@ trait ActivityLog
|
|||
{
|
||||
static::observe(ModelObserver::class);
|
||||
}
|
||||
|
||||
// * RELATIONS
|
||||
|
||||
/**
|
||||
* Activities logs One-to-many relationship.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function activityLogs(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(ActivityLog::class);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<div :class="`list-item-component list-item-${inputName}`">
|
||||
<div
|
||||
:class="`list-item-component list-item-${inputName}`"
|
||||
ref="listItem"
|
||||
>
|
||||
<table
|
||||
v-if="itemList.length > 0"
|
||||
class="table text-center table-sm table-hover table-bordered m-0"
|
||||
|
|
@ -57,7 +60,7 @@
|
|||
@click.prevent="removeLine(itemIndex)"
|
||||
class="btn btn-sm btn-danger"
|
||||
:title="__('Supprimer la ligne')"
|
||||
data-bs-tooltip="tooltip"
|
||||
data-bs-toggle="tooltip"
|
||||
>
|
||||
<i class="fa-solid fa-trash" />
|
||||
</button>
|
||||
|
|
@ -77,7 +80,7 @@
|
|||
class="btn btn-sm btn-primary"
|
||||
type="button"
|
||||
:title="__('Ajouter une ligne')"
|
||||
data-bs-tooltip="tooltip"
|
||||
data-bs-toggle="tooltip"
|
||||
>
|
||||
<i class="fa-solid fa-plus" />
|
||||
</button>
|
||||
|
|
@ -86,10 +89,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Tooltip } from "bootstrap";
|
||||
import { defineComponent } from "vue";
|
||||
import parseLaravelErrorMessages from "../../modules/parseLaravelErrorMessages";
|
||||
import trans from "../../modules/trans";
|
||||
import { Tooltips } from "./../../modules/bsTooltips";
|
||||
|
||||
export default defineComponent({
|
||||
mixins: [trans, parseLaravelErrorMessages],
|
||||
data(): {
|
||||
|
|
@ -102,7 +106,7 @@ export default defineComponent({
|
|||
allErrors: Record<string, Array<string>>;
|
||||
displayBtnAdd: boolean;
|
||||
displayBtnRemove: boolean;
|
||||
tooltipList: HTMLButtonElement[];
|
||||
tooltips: Tooltips|null;
|
||||
} {
|
||||
return {
|
||||
itemList: [{}],
|
||||
|
|
@ -114,7 +118,7 @@ export default defineComponent({
|
|||
allErrors: {},
|
||||
displayBtnAdd: true,
|
||||
displayBtnRemove: true,
|
||||
tooltipList: [],
|
||||
tooltips: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -130,7 +134,10 @@ export default defineComponent({
|
|||
this.setDefaultLines();
|
||||
this.checkLengthList();
|
||||
this.$nextTick(() => {
|
||||
this.updateBootstrapTooltip();
|
||||
this.tooltips = Tooltips.make({
|
||||
type: "dom",
|
||||
elements: (this.$refs.listItem as HTMLDivElement).querySelectorAll("[data-bs-toggle=\"tooltip\"]")
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -156,9 +163,14 @@ export default defineComponent({
|
|||
this.displayBtnRemove = true;
|
||||
}
|
||||
this.checkLengthList();
|
||||
this.$nextTick(() => {
|
||||
this.updateBootstrapTooltip();
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.tooltips?.closeBootstrapTooltip();
|
||||
this.tooltips = Tooltips.make({
|
||||
type: "dom",
|
||||
elements: (this.$refs.listItem as HTMLDivElement)
|
||||
.querySelectorAll("[data-bs-toggle=\"tooltip\"]")
|
||||
});
|
||||
}, 500);
|
||||
},
|
||||
/**
|
||||
* Remove a specific line from the <table>,
|
||||
|
|
@ -171,9 +183,14 @@ export default defineComponent({
|
|||
this.displayBtnAdd = true;
|
||||
}
|
||||
this.checkLengthList();
|
||||
this.$nextTick(() => {
|
||||
this.updateBootstrapTooltip();
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.tooltips?.closeBootstrapTooltip();
|
||||
this.tooltips = Tooltips.make({
|
||||
type: "dom",
|
||||
elements: (this.$refs.listItem as HTMLDivElement)
|
||||
.querySelectorAll("[data-bs-toggle=\"tooltip\"]")
|
||||
});
|
||||
}, 500);
|
||||
},
|
||||
/**
|
||||
* Check the length of the list,
|
||||
|
|
@ -189,31 +206,6 @@ export default defineComponent({
|
|||
this.displayBtnAdd = false;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Update Bootstrap tooltips.
|
||||
*/
|
||||
updateBootstrapTooltip() {
|
||||
let newTooltipList = [].slice.call(
|
||||
document.querySelectorAll(
|
||||
".list-item-" + this.inputName + " [data-bs-tooltip=\"tooltip\"]"
|
||||
)
|
||||
) as HTMLButtonElement[];
|
||||
let tmp = newTooltipList.filter((x) => !this.tooltipList.includes(x));
|
||||
tmp.map((tooltip) => {
|
||||
return new Tooltip(tooltip);
|
||||
});
|
||||
this.closeBootstrapTooltip();
|
||||
this.tooltipList = newTooltipList;
|
||||
},
|
||||
/**
|
||||
* Close all Bootstrap tooltips.
|
||||
*/
|
||||
closeBootstrapTooltip() {
|
||||
this.tooltipList.forEach((tooltip) => {
|
||||
tooltip.blur();
|
||||
Tooltip.getInstance(tooltip)?.hide();
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@
|
|||
@include('bo.layouts.head')
|
||||
</head>
|
||||
|
||||
<body
|
||||
data-bs-theme="{{ (\App\Enums\Theme\BootstrapThemeEnum::make(intval(Cache::get('theme'))) ?? \App\Enums\Theme\BootstrapThemeEnum::light)->name() }}">
|
||||
@use('\App\Enums\Theme\BootstrapThemeEnum', 'BootstrapThemeEnum')
|
||||
|
||||
<body data-bs-theme="{{ (BootstrapThemeEnum::make(intval(cache()->get('theme'))) ?? BootstrapThemeEnum::light)->name() }}">
|
||||
<!-- Navigation -->
|
||||
@include('bo.layouts.header')
|
||||
<main
|
||||
|
|
|
|||
|
|
@ -32,19 +32,25 @@
|
|||
<ul class="navbar-nav me-auto">
|
||||
@can('viewAny', \App\Models\User::class)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center h-100 @if (request()->routeIs('bo.users.*')) active @endif"
|
||||
<a @class([
|
||||
'nav-link d-flex align-items-center h-100',
|
||||
'active' => request()->routeIs('bo.users.*'),
|
||||
])
|
||||
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
|
||||
@can('isConceptor')
|
||||
<li class="nav-item">
|
||||
<a class="nav-link d-flex align-items-center h-100 @if (request()->routeIs('bo.activity_logs.*')) active @endif"
|
||||
<a @class([
|
||||
'nav-link d-flex align-items-center h-100',
|
||||
'active' => request()->routeIs('bo.activity_logs.*'),
|
||||
])
|
||||
data-bs-toggle="tooltip" href="{{ route('bo.activity_logs.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => trans_choice('models.classes.activity_log', '*')]) }}">
|
||||
{{ Str::of(trans_choice('models.classes.activity_log', '*'))->ucfirst() }}
|
||||
title="{{ __('crud.helpers.list_all', ['model' => trans_choice('models.classes.activity_log', 2)]) }}">
|
||||
{{ str(trans_choice('models.classes.activity_log', 2))->ucfirst() }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
|
@ -73,14 +79,17 @@
|
|||
</script>
|
||||
@endpush
|
||||
@csrf
|
||||
@php $theme = intval(Cache::get('theme')); @endphp
|
||||
@foreach (\App\Enums\Theme\BootstrapThemeEnum::toArray() as $key => $bootstrapTheme)
|
||||
<input class="d-none form-check-input" id="theme{{ $key }}" name="theme" type="radio"
|
||||
@use('\App\Enums\Theme\BootstrapThemeEnum', 'BootstrapThemeEnum')
|
||||
@foreach (BootstrapThemeEnum::toArray() as $key => $bootstrapTheme)
|
||||
<input class="btn-check" id="theme{{ $key }}" name="theme" type="radio"
|
||||
value="{{ $bootstrapTheme->value }}">
|
||||
<label class="dropdown-item w-100 text-decoration-none @if ($bootstrapTheme->value === intval(Cache::get('theme'))) active @endif p-2"
|
||||
for="theme{{ $key }}" role="button">
|
||||
{{ Str::of($bootstrapTheme->label)->ucFirst() }}
|
||||
</label>
|
||||
<label for="theme{{ $key }}"
|
||||
@class([
|
||||
'dropdown-item btn btn-secondary py-2',
|
||||
'active' => !is_null(Cache::get('theme'))
|
||||
? $bootstrapTheme->value === intval(Cache::get('theme'))
|
||||
: $bootstrapTheme->value === BootstrapThemeEnum::light->value,
|
||||
])>{{ str($bootstrapTheme->label)->ucFirst() }}</label>
|
||||
@endforeach
|
||||
</form>
|
||||
</li>
|
||||
|
|
@ -92,12 +101,12 @@
|
|||
<div class="d-flex flex-column align-items-start align-items-md-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">
|
||||
<a class="dropdown-item w-100 text-decoration-none p-2" data-bs-toggle="tooltip" data-bs-placement="left"
|
||||
href="{{ route('bo.users.edit',auth('backend')->user()->getKey()) }}" title="{{ __('Accéder à son profile') }}">
|
||||
href="{{ route('bo.users.edit', auth('backend')->user()->getKey()) }}" title="{{ __('Accéder à son profile') }}">
|
||||
{{ __('Profile') }}
|
||||
</a>
|
||||
<hr class="dropdown-divider m-0">
|
||||
|
|
|
|||
|
|
@ -2,15 +2,21 @@
|
|||
<nav class="col-md-4 col-lg-3 col-xxl-2 d-md-block bg-body-tertiary sidebar collapse" id="menuNavigation">
|
||||
<div class="sidemenu py-2">
|
||||
{{-- HOME --}}
|
||||
<a class="btn btn-primary w-100 @if (request()->routeIs('bo.dashboard')) fw-bold active @endif" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.dashboard') }}" title="{{ __('Accéder à la page d\'accueil du back-office') }}" role="button">
|
||||
<a data-bs-toggle="tooltip" href="{{ route('bo.dashboard') }}" title="{{ __('Accéder à la page d\'accueil du back-office') }}"
|
||||
role="button" @class([
|
||||
'btn btn-primary w-100',
|
||||
'fw-bold active' => request()->routeIs('bo.dashboard'),
|
||||
])>
|
||||
<i class="fa-solid fa-house"></i> {{ __('Accueil') }}
|
||||
</a>
|
||||
{{-- STATIC PAGES --}}
|
||||
<a class="btn btn-primary w-100 @if (request()->routeIs('bo.static_pages.*')) fw-bold active @endif mt-1" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.static_pages.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => trans_choice('models.classes.static_page', '*')]) }}" role="button">
|
||||
<i class="fa-solid fa-file"></i> {{ Str::of(trans_choice('models.classes.static_page', '*'))->title() }}
|
||||
<a data-bs-toggle="tooltip" href="{{ route('bo.static_pages.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => trans_choice('models.classes.static_page', 2)]) }}" role="button"
|
||||
@class([
|
||||
'btn btn-primary w-100 mt-1',
|
||||
'fw-bold active' => request()->routeIs('bo.static_pages.*'),
|
||||
])>
|
||||
<i class="fa-solid fa-file"></i> {{ str(trans_choice('models.classes.static_page', 2))->title() }}
|
||||
</a>
|
||||
{{-- PROFESSIONS --}}
|
||||
<a data-bs-toggle="tooltip" href="{{ route('bo.professions.index') }}"
|
||||
|
|
@ -19,7 +25,7 @@
|
|||
'btn btn-primary w-100 mt-1',
|
||||
'fw-bold active' => request()->routeIs('bo.professions.*'),
|
||||
])>
|
||||
<i class="fa-solid fa-user-tie"></i> {{ Str::of(__('models.classes.profession'))->title() }}
|
||||
<i class="fa-solid fa-user-tie"></i> {{ str(__('models.classes.profession'))->title() }}
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -1,25 +1,31 @@
|
|||
<td class="text-center align-middle">
|
||||
@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"
|
||||
>
|
||||
<form @class(['invisible' => $loop->first and $models->onFirstPage()])
|
||||
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"
|
||||
type="submit" title="{{ __('crud.other.up') }}">
|
||||
<button data-bs-toggle="tooltip" type="submit" title="{{ __('crud.other.up') }}" @class([
|
||||
'btn btn-sm btn-outline-secondary',
|
||||
'disabled' => $loop->first and $models->onFirstPage(),
|
||||
])>
|
||||
<i class="fas fa-arrow-up"></i>
|
||||
</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"
|
||||
>
|
||||
<form @class([
|
||||
'invisible' =>
|
||||
$loop->last and $models->currentPage() === $models->lastPage(),
|
||||
])
|
||||
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"
|
||||
type="submit" title="{{ __('crud.other.down') }}">
|
||||
<button data-bs-toggle="tooltip" type="submit" title="{{ __('crud.other.down') }}" @class([
|
||||
'btn btn-sm btn-outline-secondary ms-1',
|
||||
'disabled' =>
|
||||
$loop->last and $models->currentPage() === $models->lastPage(),
|
||||
])>
|
||||
<i class="fas fa-arrow-down"></i>
|
||||
</button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -3,13 +3,17 @@
|
|||
<form action="{{ route('bo.' . $routeName . '.change-published', $model->getRouteKey()) }}" method="POST">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<button class="btn btn-sm @if ($model->published) btn-primary @else btn-danger @endif" data-bs-toggle="tooltip"
|
||||
type="submit" title="{{ __($model->published ? __('crud.other.unpublish') : __('crud.other.publish')) }}">
|
||||
@if ($model->published)
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
@else
|
||||
<i class="fa-solid fa-circle-xmark"></i>
|
||||
@endif
|
||||
<button data-bs-toggle="tooltip" type="submit"
|
||||
title="{{ __($model->published ? __('crud.other.unpublish') : __('crud.other.publish')) }}" @class([
|
||||
'btn btn-sm',
|
||||
'btn-primary' => $model->published,
|
||||
'btn-danger' => !$model->published,
|
||||
])>
|
||||
<i class="fa-solid fa-circle-check" @class([
|
||||
'fa-solid',
|
||||
'fa-circle-check' => $model->published,
|
||||
'fa-circle-xmark' => !$model->published,
|
||||
])></i>
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
|
|
|
|||
|
|
@ -1,15 +1,6 @@
|
|||
{{-- GET ACTUAL PAGINATION --}}
|
||||
@php
|
||||
$pagination = intval(
|
||||
Cache::get(
|
||||
'pagination.' .
|
||||
\Illuminate\Support\Str::slug(
|
||||
request()
|
||||
->route()
|
||||
->getName(),
|
||||
),
|
||||
),
|
||||
);
|
||||
$pagination = intval(cache()->get('pagination.' . str(request()->route()->getName())->slug()));
|
||||
@endphp
|
||||
@if ($paginator->items())
|
||||
<nav class="pagination-custom d-flex justify-content-between align-items-center">
|
||||
|
|
@ -24,9 +15,11 @@
|
|||
<ul class="dropdown-menu">
|
||||
@foreach (\App\Enums\Pagination\ItemsPerPaginationEnum::toArray() as $itemsPerPaginationEnum)
|
||||
<li>
|
||||
<a class="dropdown-item user-select-none @if ($pagination === $itemsPerPaginationEnum->value) active @endif text-center"
|
||||
href="{{ request()->fullUrlWithQuery(['page' => 1, 'pagination' => $itemsPerPaginationEnum->value]) }}"
|
||||
role="button">
|
||||
<a href="{{ request()->fullUrlWithQuery(['page' => 1, 'pagination' => $itemsPerPaginationEnum->value]) }}"
|
||||
role="button" @class([
|
||||
'dropdown-item user-select-none text-center',
|
||||
'active' => $pagination === $itemsPerPaginationEnum->value,
|
||||
])>
|
||||
{{ $itemsPerPaginationEnum->value }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -38,7 +31,7 @@
|
|||
<div class="d-flex justify-content-end align-items-center">
|
||||
<ul class="pagination m-0">
|
||||
{{-- PREVIOUS PAGE --}}
|
||||
<li class="page-item @if ($paginator->onFirstPage()) disabled @endif">
|
||||
<li @class(['page-item', 'disabled' => $paginator->onFirstPage()])>
|
||||
<a class="page-link d-flex align-items-center h-100" data-bs-toggle="tooltip"
|
||||
title="{{ __('pagination.previous_page') }}" aria-label="{{ __('pagination.previous_page') }}"
|
||||
@if (!$paginator->onFirstPage()) href="{{ request()->fullUrlWithQuery(['page' => $paginator->currentPage() - 1]) }}" @endif
|
||||
|
|
@ -70,8 +63,11 @@
|
|||
<ul class="dropdown-menu">
|
||||
@for ($i = 1; $i <= $paginator->lastPage(); $i++)
|
||||
<li>
|
||||
<a class="dropdown-item user-select-none @if ($paginator->currentPage() === $i) active @endif text-center"
|
||||
href="{{ request()->fullUrlWithQuery(['page' => $i]) }}" role="button">
|
||||
<a href="{{ request()->fullUrlWithQuery(['page' => $i]) }}" role="button"
|
||||
@class([
|
||||
'dropdown-item user-select-none text-center',
|
||||
'active' => $paginator->currentPage() === $i,
|
||||
])>
|
||||
{{ $i }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -100,7 +96,7 @@
|
|||
</li>
|
||||
@endif
|
||||
{{-- NEXT PAGE --}}
|
||||
<li class="page-item @if (!$paginator->hasMorePages()) disabled @endif">
|
||||
<li @class(['page-item', 'disabled' => !$paginator->hasMorePages()])>
|
||||
<a class="page-link d-flex align-items-center h-100" data-bs-toggle="tooltip"
|
||||
title="{{ __('pagination.next_page') }}" aria-label="{{ __('pagination.next_page') }}"
|
||||
@if ($paginator->hasMorePages()) href="{{ request()->fullUrlWithQuery(['page' => $paginator->currentPage() + 1]) }}" @endif
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -20,14 +23,26 @@
|
|||
@if ($noOrder and !in_array($col, $ignore))
|
||||
@continue
|
||||
@endif
|
||||
<th class="h-100 @if (isset($mobileHide) and is_array($mobileHide) and in_array($col, $mobileHide)) d-none d-md-table-cell @endif text-center" scope="col">
|
||||
<th @class([
|
||||
'h-100 text-center',
|
||||
'd-none d-md-table-cell' =>
|
||||
isset($mobileHide) and
|
||||
is_array($mobileHide) and
|
||||
in_array($col, $mobileHide),
|
||||
]) scope="col">
|
||||
<div class="d-flex justify-content-center align-items-center h-100">
|
||||
<span class="text-nowrap">{{ $colname }}</span>
|
||||
</div>
|
||||
</th>
|
||||
@continue
|
||||
@endif
|
||||
<th class="h-100 @if (isset($mobileHide) and is_array($mobileHide) and in_array($col, $mobileHide)) d-none d-md-table-cell @endif text-center" scope="col">
|
||||
<th @class([
|
||||
'h-100 text-center',
|
||||
'd-none d-md-table-cell' =>
|
||||
isset($mobileHide) and
|
||||
is_array($mobileHide) and
|
||||
in_array($col, $mobileHide),
|
||||
]) scope="col">
|
||||
<div class="d-flex justify-content-center align-items-center h-100">
|
||||
<span class="text-nowrap">
|
||||
{{ $colname }}
|
||||
|
|
@ -38,7 +53,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 +63,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>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
@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))
|
||||
|
|
@ -58,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')
|
||||
|
||||
@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('content')
|
||||
<div class="d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap">
|
||||
|
|
|
|||
|
|
@ -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])
|
||||
|
|
@ -60,7 +59,7 @@
|
|||
@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))
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('bo.layout', ['brParam' => $professionModel])
|
||||
|
||||
@section('title', __('Création d\'un :model', ['model' => __('models.classes.profession')]))
|
||||
@section('description', __('Création d\'un tout nouveau :model', ['model' => __('models.classes.profession')]))
|
||||
@section('title', __('Création d\'une :model', ['model' => __('models.classes.profession')]))
|
||||
@section('description', __('Création d\'une tout nouveau :model', ['model' => __('models.classes.profession')]))
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
|
|
@ -16,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.profession')]) }}">
|
||||
{{ Str::ucfirst(__('crud.actions.save')) }}
|
||||
{{ str(__('crud.actions.save'))->ucfirst() }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -28,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.profession')]) }}">
|
||||
{{ Str::ucfirst(__('crud.actions.save')) }}
|
||||
{{ str(__('crud.actions.save'))->ucfirst() }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
@extends('bo.layout', ['brParam' => $professionModel])
|
||||
|
||||
@section('title', __('Édition d\'un :model', ['model' => __('models.classes.profession')]))
|
||||
@section('description', __('Édition d\'un :model déjà existant', ['model' => __('models.classes.profession')]))
|
||||
@section('title', __('Édition d\'une :model', ['model' => __('models.classes.profession')]))
|
||||
@section('description', __('Édition d\'une :model déjà existant', ['model' => __('models.classes.profession')]))
|
||||
@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.professions.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => Str::plural(__('models.classes.profession'))]) }}">
|
||||
title="{{ __('crud.helpers.list_all', ['model' => str(__('models.classes.profession'))->plural()]) }}">
|
||||
<i class="fa-solid fa-arrow-left"></i>
|
||||
</a>
|
||||
@include('modules.breadcrumbs.breadcrumb-body', ['brParam' => $professionModel])
|
||||
|
|
@ -18,25 +18,25 @@
|
|||
@can('view', $professionModel)
|
||||
<a class="btn btn-warning" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.professions.show', ['profession' => $professionModel]) }}"
|
||||
title="{{ Str::ucfirst(__('crud.actions.show')) }}">
|
||||
title="{{ str(__('crud.actions.show'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('duplicate', $professionModel)
|
||||
<a class="btn btn-secondary" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.professions.duplicate', ['profession' => $professionModel]) }}"
|
||||
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.profession')]) }}">
|
||||
{{ Str::ucfirst(__('crud.actions.save')) }}
|
||||
{{ str(__('crud.actions.save'))->ucfirst() }}
|
||||
</button>
|
||||
@can('delete', $professionModel)
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button class="btn btn-danger" data-bs-toggle="tooltip" type="submit" title="{{ Str::ucfirst(__('crud.actions.delete')) }}">
|
||||
<button class="btn btn-danger" data-bs-toggle="tooltip" type="submit" title="{{ str(__('crud.actions.delete'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
@endcan
|
||||
|
|
@ -52,7 +52,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.profession')]) }}">
|
||||
{{ Str::ucfirst(__('crud.actions.save')) }}
|
||||
{{ str(__('crud.actions.save'))->ucfirst() }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
<thead>
|
||||
@include('bo.modules.table-col-sorter', [
|
||||
'cols' => [
|
||||
'title' => Str::ucfirst(__('validation.attributes.title')),
|
||||
'picture' => Str::ucfirst(__('validation.attributes.image')),
|
||||
'published' => Str::ucfirst(__('validation.custom.published')),
|
||||
'updated_at' => Str::ucfirst(__('validation.attributes.updated_at')),
|
||||
'title' => str(__('validation.attributes.title'))->ucfirst(),
|
||||
'picture' => str(__('validation.attributes.image'))->ucfirst(),
|
||||
'published' => str(__('validation.custom.published'))->ucfirst(),
|
||||
'updated_at' => str(__('validation.attributes.updated_at'))->ucfirst(),
|
||||
],
|
||||
])
|
||||
</thead>
|
||||
|
|
@ -32,21 +32,21 @@
|
|||
@can('view', $professionModel)
|
||||
<a class="btn btn-sm btn-warning" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.professions.show', ['profession' => $professionModel]) }}"
|
||||
title="{{ Str::ucfirst(__('crud.actions.show')) }}">
|
||||
title="{{ str(__('crud.actions.show'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('duplicate', $professionModel)
|
||||
<a class="btn btn-sm btn-secondary" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.professions.duplicate', ['profession' => $professionModel]) }}"
|
||||
title="{{ Str::ucfirst(__('crud.actions.duplicate')) }}">
|
||||
title="{{ str(__('crud.actions.duplicate'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-copy"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('update', $professionModel)
|
||||
<a class="btn btn-sm btn-primary" data-bs-toggle="tooltip"
|
||||
href="{{ route('bo.professions.edit', ['profession' => $professionModel]) }}"
|
||||
title="{{ Str::ucfirst(__('crud.actions.update')) }}">
|
||||
title="{{ str(__('crud.actions.update'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-pencil"></i>
|
||||
</a>
|
||||
@endcan
|
||||
|
|
@ -54,7 +54,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.profession')))
|
||||
@section('description', __('Liste de tous les :model', ['model' => Str::plural(__('models.classes.profession'))]))
|
||||
@section('title', str(__('models.classes.profession'))->ucfirst()->plural())
|
||||
@section('description', __('Liste de tous les :model', ['model' => str(__('models.classes.profession'))->plural()]))
|
||||
|
||||
@section('content')
|
||||
<div class="d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('bo.layout', ['brParam' => $professionModel])
|
||||
|
||||
@section('title', __('Édition d\'un :model', ['model' => __('models.classes.profession')]))
|
||||
@section('description', __('Édition d\'un :model déjà existant', ['model' => __('models.classes.profession')]))
|
||||
@section('title', __('Aperçu d\'une :model', ['model' => __('models.classes.profession')]))
|
||||
@section('description', __('Aperçu d\'une :model déjà existante', ['model' => __('models.classes.profession')]))
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr class="border-bottom">
|
||||
<td class="w-50 fw-bold text-center align-middle">{{ str(__('validation.attributes.jobs_list'))->ucFirst() }}</td>
|
||||
<td class="w-50 fw-bold text-center align-middle">{{ str(__('validation.custom.jobs_list'))->ucFirst() }}</td>
|
||||
<td class="w-50 text-center align-middle">
|
||||
<ul class="list-group list-group-flush">
|
||||
@foreach ($professionModel->jobs_list as $key => $job)
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr class="border-bottom">
|
||||
<td class="w-50 fw-bold text-center align-middle">{{ str(__('validation.attributes.link'))->ucFirst() }}</td>
|
||||
<td class="w-50 fw-bold text-center align-middle">{{ str(__('validation.custom.url'))->ucFirst() }}</td>
|
||||
<td class="w-50 text-center align-middle">
|
||||
<a class="link-primary" href="{{ $professionModel->job_url }}" target="_blank">
|
||||
{{ $professionModel->job_url }}
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@
|
|||
|
||||
@section('title', __('Édition d\'un :model', ['model' => __('models.classes.static_page')]))
|
||||
@section('description', __('Édition d\'un :model déjà existant', ['model' => __('models.classes.static_page')]))
|
||||
@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.static_pages.index') }}"
|
||||
title="{{ __('crud.helpers.list_all', ['model' => Str::plural(__('models.classes.static_page'))]) }}">
|
||||
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 +17,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>
|
||||
|
|
@ -32,7 +31,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>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@
|
|||
|
||||
@section('title', __('Édition d\'un :model', ['model' => __('models.classes.user')]))
|
||||
@section('description', __('Édition d\'un :model déjà existant', ['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">
|
||||
<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])
|
||||
|
|
@ -18,18 +17,18 @@
|
|||
<form class="btn-group confirmDeleteTS" action="{{ route('bo.users.destroy', $userModel) }}" method="POST" novalidate>
|
||||
@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
|
||||
@method('DELETE')
|
||||
<button class="btn btn-danger" data-bs-toggle="tooltip" type="submit" title="{{ Str::ucfirst(__('crud.actions.delete')) }}">
|
||||
<button class="btn btn-danger" data-bs-toggle="tooltip" type="submit" title="{{ str(__('crud.actions.delete'))->ucfirst() }}">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
@endcan
|
||||
|
|
@ -45,7 +44,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>
|
||||
|
|
|
|||
|
|
@ -82,8 +82,7 @@
|
|||
'required' => true,
|
||||
'associatedModels' => Arr::where(
|
||||
\App\Enums\Users\RoleEnum::toArray(),
|
||||
fn(object $role) => $role->value >=
|
||||
auth('backend')->user()->role->value()),
|
||||
fn(object $role) => $role->value >= auth('backend')->user()->role->value()),
|
||||
'helper' => __('Sélectionnez un rôle dans la liste déroulante.'),
|
||||
])
|
||||
</div>
|
||||
|
|
@ -124,22 +123,24 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
{{-- STATUS --}}
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<fieldset class="h-100 border p-3">
|
||||
<legend>{{ __('Visibilité') }}</legend>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@include('bo.partials.inputs.tinyint-boolean', [
|
||||
'id' => 'userPublished',
|
||||
'name' => 'published',
|
||||
'label' => __('État de publication de l\':model', ['model' => __('models.classes.user')]),
|
||||
'helper' => __('Deux réponses possibles : oui ou non.'),
|
||||
'model' => $userModel ?? null,
|
||||
])
|
||||
@can('changePublished', $userModel)
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<fieldset class="h-100 border p-3">
|
||||
<legend>{{ __('Visibilité') }}</legend>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@include('bo.partials.inputs.tinyint-boolean', [
|
||||
'id' => 'userPublished',
|
||||
'name' => 'published',
|
||||
'label' => __('État de publication de l\':model', ['model' => __('models.classes.user')]),
|
||||
'helper' => __('Deux réponses possibles : oui ou non.'),
|
||||
'model' => $userModel ?? null,
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
@endcan
|
||||
<div class="col-12 text-center">
|
||||
<p><b>{{ __('* Champs obligatoires') }}</b></p>
|
||||
</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>
|
||||
|
|
@ -33,14 +33,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
|
||||
|
|
@ -48,7 +48,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">
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
--}}
|
||||
|
||||
@if(!empty($label))
|
||||
<label for="{{ $id }}" class="col-form-label"><b>{{ $label }} *</b></label>
|
||||
<label for="{{ $id }}" class="col-form-label"><b>{{ $label }} *</b></label>
|
||||
@endif
|
||||
<select
|
||||
id="{{ $id }}"
|
||||
|
|
@ -33,9 +33,7 @@
|
|||
@foreach ($associatedModels as $associatedModel)
|
||||
<option
|
||||
value="{{ $associatedModel->id }}"
|
||||
@if (old($name, $model->{$name} ?? $associatedModels[0]->id) == $associatedModel->id)
|
||||
selected
|
||||
@endif>
|
||||
@selected(old($name, $model->{$name} ?? $associatedModels[0]->id) == $associatedModel->id)>
|
||||
{{ $associatedModel->{$foreignLabel} }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{{-- blade-formatter-disable --}}
|
||||
@if(!empty($label))
|
||||
<label for="{{ $id }}" class="col-form-label">
|
||||
<b>{{ $label }} {{ $required ? '*' : '' }}</b>
|
||||
</label>
|
||||
<label for="{{ $id }}" class="col-form-label">
|
||||
<b>{{ $label }} {{ $required ? '*' : '' }}</b>
|
||||
</label>
|
||||
@endif
|
||||
@if(isset($appendText))
|
||||
<div class="input-group">
|
||||
|
|
@ -15,9 +15,9 @@
|
|||
class="form-control"
|
||||
aria-describedby="{{ $id }}Help"
|
||||
value="{{ old($name, $model->{$name} ?? $value ?? '') }}"
|
||||
@if(!empty($disabled))disabled @endif
|
||||
@if(!empty($readonly))readonly @endif
|
||||
@if(!empty($required))required @endif>
|
||||
@disabled(!empty($disabled))
|
||||
@readonly(!empty($readonly))
|
||||
@required(!empty($required))>
|
||||
@if(isset($appendText))
|
||||
<label class="input-group-text">{{ $appendText }}</label>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,15 +28,16 @@
|
|||
<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)) }}"
|
||||
@else step="1"
|
||||
step="{{ str()->replace(',', '.', strval($step)) }}"
|
||||
@else
|
||||
step="1"
|
||||
@endif
|
||||
@if(!empty($max))
|
||||
max="{{ $max }}"
|
||||
|
|
|
|||
|
|
@ -10,23 +10,27 @@
|
|||
$model || The model we're creating/editing || Model class || OPTIONNAL || null
|
||||
--}}
|
||||
|
||||
@if(!empty($label))
|
||||
<label for="{{ $id }}" class="col-form-label">
|
||||
<b>{{ $label }} {{ $required ?? false ? '*' : '' }}</b>
|
||||
</label>
|
||||
@if (!empty($label))
|
||||
<label class="col-form-label" for="{{ $id }}">
|
||||
<b>{{ $label }} {{ $required ?? false ? '*' : '' }}</b>
|
||||
</label>
|
||||
@endif
|
||||
@php
|
||||
$data = [
|
||||
'name' => $name,
|
||||
'text' => old($name, $model->{$name} ?? $value ?? '')
|
||||
];
|
||||
$data = [
|
||||
'name' => $name,
|
||||
'text' => old($name, $model->{$name} ?? ($value ?? '')),
|
||||
];
|
||||
@endphp
|
||||
<div class="ck-editor" data-json='@json($data)'></div>
|
||||
@include('modules.input-error', [
|
||||
'inputName' => $name,
|
||||
'helperId' => "{$id}Help",
|
||||
'helper' => $helper ?? __('crud.minicrud.text_warning') . '. ' . __('validation.min.string', [
|
||||
'attribute' => $input['label'],
|
||||
'min' => 15
|
||||
]),
|
||||
'helper' =>
|
||||
$helper ??
|
||||
__('crud.minicrud.text_warning') .
|
||||
'. ' .
|
||||
__('validation.min.string', [
|
||||
'attribute' => $input['label'],
|
||||
'min' => 15,
|
||||
]),
|
||||
])
|
||||
|
|
|
|||
|
|
@ -19,7 +19,10 @@
|
|||
@endif
|
||||
<input id="{{ $id }}"
|
||||
name="{{ $name }}"
|
||||
class="form-control @if ($errors->has($name)) is-invalid @endif"
|
||||
@class([
|
||||
'form-control',
|
||||
'is-invalid' => $errors->has($name)
|
||||
])
|
||||
type="{{ $type ?? 'datetime-local' }}"
|
||||
data-form-type="date"
|
||||
value="{{ old($name, (isset($model) and $model->{$name}) ? $model->{$name}->format($format ?? 'Y-m-d\TH:i') ?? '' : '') }}"
|
||||
|
|
|
|||
|
|
@ -24,19 +24,13 @@
|
|||
])
|
||||
name="{{ $name }}"
|
||||
aria-describedby="{{ $id }}Help"
|
||||
@if(!empty($disabled))
|
||||
disabled
|
||||
@endif
|
||||
@if(!empty($required))
|
||||
required
|
||||
@endif
|
||||
@disabled(!empty($disabled))
|
||||
@required(!empty($required))
|
||||
role="button">
|
||||
@foreach ($associatedModels as $associatedModel)
|
||||
<option
|
||||
value="{{ $associatedModel->value}}"
|
||||
@if (old($name, $model->{$name}->value ?? $value ?? 1) == $associatedModel->value)
|
||||
selected
|
||||
@endif>
|
||||
@selected(old($name, $model->{$name}->value ?? $value ?? 1) == $associatedModel->value)>
|
||||
{{ $associatedModel->label }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -12,15 +12,18 @@
|
|||
--}}
|
||||
|
||||
@if (!empty($label))
|
||||
<label class="col-form-label" for="{{ $id }}">
|
||||
<b>{{ $label }} {{ $required ?? false ? '*' : '' }}</b>
|
||||
</label>
|
||||
<label class="col-form-label" for="{{ $id }}">
|
||||
<b>{{ $label }} {{ $required ?? false ? '*' : '' }}</b>
|
||||
</label>
|
||||
@endif
|
||||
<input
|
||||
name="{{ $name }}"
|
||||
type="email"
|
||||
value="{{ old($name, $model->{$name} ?? '') }}"
|
||||
class="form-control @if ($errors->has($name)) is-invalid @endif"
|
||||
@class([
|
||||
'form-control',
|
||||
'is-invalid' => $errors->has($name)
|
||||
])
|
||||
id="{{ $id }}"
|
||||
aria-describedby="{{ $id }}Help"
|
||||
placeholder="{{ $placeholder ?? __('aaa.bbb@example.com') }}"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,10 @@
|
|||
<input name="{{ $name }}"
|
||||
type="file"
|
||||
value="{{ old($name, $model->{$name} ?? $value ?? '') }}"
|
||||
class="form-control @if($errors->has($name)) is-invalid @endif"
|
||||
@class([
|
||||
'form-control',
|
||||
'is-invalid' => $errors->has($name)
|
||||
])
|
||||
id="{{ $id }}"
|
||||
aria-describedby="{{ $id }}Help"
|
||||
accept="{{ $file ?? '.pdf' }}"
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@
|
|||
--}}
|
||||
|
||||
@if(!empty($label))
|
||||
<label for="{{ $id }}" class="col-form-label">
|
||||
<b>{{ $label }} {{ $required ?? false ? '*' : '' }}</b>
|
||||
</label>
|
||||
@endif
|
||||
<label for="{{ $id }}" class="col-form-label">
|
||||
<b>{{ $label }} {{ $required ?? false ? '*' : '' }}</b>
|
||||
</label>
|
||||
@endif
|
||||
@if(!empty($hasWordCounter ?? false))
|
||||
<div class="word-counter" data-json='@json(['id'=> "$id"])'></div>
|
||||
<div class="word-counter" data-json='@json(['id'=> "$id"])'></div>
|
||||
@endif
|
||||
<div class="col-12 input-group d-flex w-100 justify-content-center">
|
||||
<input id="{{ $id }}"
|
||||
|
|
@ -38,7 +38,10 @@
|
|||
@readonly(!empty($readonly))
|
||||
@required(!empty($required))>
|
||||
@php $dataPassword = ['inputId' => $id]; @endphp
|
||||
<span class="btn btn-primary password-visibility w-fit d-flex justify-content-center align-items-center p-0 @if(!empty($hasWordCounter ?? false)) need-word-counter-password-btn @endif"
|
||||
<span @class([
|
||||
'btn btn-primary password-visibility w-fit d-flex justify-content-center align-items-center p-0',
|
||||
'need-word-counter-password-btn' => !empty($hasWordCounter ?? false)
|
||||
])
|
||||
data-json='@json($dataPassword)'>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@if (!request()->routeIs('login'))
|
||||
@if ($message = Session::get('success', Session::get('bo.success')))
|
||||
@if ($message = session()->get('success', session()->get('bo.success')))
|
||||
<div class="alert alert-success alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('error', Session::get('bo.error')))
|
||||
@if ($message = session()->get('error', session()->get('bo.error')))
|
||||
<div class="alert alert-danger alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-xmark"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('warning', Session::get('bo.warning')))
|
||||
@if ($message = session()->get('warning', session()->get('bo.warning')))
|
||||
<div class="alert alert-warning alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-exclamation"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('status', Session::get('bo.status')))
|
||||
@if ($message = session()->get('status', session()->get('bo.status')))
|
||||
<div class="alert alert-info alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-info"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
@if ($message = Session::get('info', Session::get('bo.info')))
|
||||
@if ($message = session()->get('info', session()->get('bo.info')))
|
||||
<div class="alert alert-info alert-dismissible fade show m-0 mb-3" role="alert">
|
||||
<i class="fa-solid fa-circle-info"></i>
|
||||
<strong>{!! nl2br(e($message)) !!}</strong>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<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]',
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
<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]',
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
<div class="form-group">
|
||||
<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>
|
||||
step="0.01" placeholder="{{ $input['label'] }}" @required(!isset($input['required']) or $input['required'])>
|
||||
@include('back::modules.input-error', [
|
||||
'inputName' => "data.{$k}.value",
|
||||
'helperId' => "NumberHelp{$k}",
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
<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,
|
||||
|
|
@ -137,15 +137,15 @@
|
|||
<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" @checked(old("data.{$k}.value", old('_token') ? false : $model->data[$k]['value'] ?? (null ?? false)))>
|
||||
</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>
|
||||
|
|
@ -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'],
|
||||
|
|
@ -248,7 +248,7 @@
|
|||
<div class="form-group">
|
||||
<input class="form-control" id="title{{ $k }}" name="data[{{ $k }}][value]" type="email"
|
||||
value="{{ old("data.{$k}.value") ?? ($input['value'] ?? '') }}" placeholder="{{ $input['label'] }}"
|
||||
@if (!isset($input['required']) or $input['required']) required @endif>
|
||||
@required(!isset($input['required']) or $input['required'])>
|
||||
@include('modules.input-error', [
|
||||
'inputName' => "data.{$k}.value",
|
||||
'helperId' => "{$k}StringHelp",
|
||||
|
|
@ -271,7 +271,7 @@
|
|||
<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,
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ Breadcrumbs::for('bo.users.edit', function (Generator $trail, User $user) {
|
|||
$trail->parent('bo.users.index');
|
||||
$trail->push(Str::ucfirst(trans('crud.actions.edit')), route('bo.users.edit', $user));
|
||||
});
|
||||
Breadcrumbs::for('bo.users.duplicate', function (Generator $trail, User $user) {
|
||||
Breadcrumbs::for('bo.users.duplicate', function (Generator $trail) {
|
||||
$trail->parent('bo.users.index');
|
||||
$trail->push(Str::ucfirst(trans('crud.actions.duplicate')), route('bo.users.duplicate', $user));
|
||||
$trail->push(Str::ucfirst(trans('crud.actions.duplicate')));
|
||||
});
|
||||
|
||||
// * PROFESSIONS
|
||||
|
|
@ -63,7 +63,7 @@ Breadcrumbs::for('bo.professions.duplicate', function (Generator $trail) {
|
|||
// * ACTIVITY_LOGS
|
||||
Breadcrumbs::for('bo.activity_logs.index', function (Generator $trail) {
|
||||
$trail->push(
|
||||
Str::ucfirst(trans_choice('models.classes.activity_log', '*')),
|
||||
Str::ucfirst(trans_choice('models.classes.activity_log', 2)),
|
||||
route('bo.activity_logs.index', ['sort_col' => 'created_at', 'sort_way' => 'desc'])
|
||||
);
|
||||
});
|
||||
|
|
@ -75,7 +75,7 @@ Breadcrumbs::for('bo.activity_logs.show', function (Generator $trail, ActivityLo
|
|||
// * STATIC PAGES
|
||||
Breadcrumbs::for('bo.static_pages.index', function (Generator $trail) {
|
||||
$trail->push(
|
||||
Str::of(trans_choice('models.classes.static_page', '*'))->ucfirst(),
|
||||
Str::of(trans_choice('models.classes.static_page', 2))->ucfirst(),
|
||||
route('bo.static_pages.index', ['sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue