Merge branch 'develop' into trunk

This commit is contained in:
K Muller 2026-07-03 10:25:37 +02:00
commit c3d434dc1b
3 changed files with 48 additions and 73 deletions

View file

@ -32,13 +32,6 @@ enum BlockTypeEnum: int
self::redirection => [
'type' => self::redirection,
'data' => [
'title' => [
'label' => 'Titre',
'inputType' => InputType::string->value,
'value' => 'Redirections actualités',
'validate' => 'nullable|string|between:3,255',
'required' => false,
],
'position' => [
'label' => 'Position',
'inputType' => InputType::selectEnum->value,

View file

@ -1,31 +1,10 @@
@php
use \App\Enums\Block\BlockPositionEnum;
use \App\Enums\Block\BlockContentTypeEnum;
use App\Enums\Block\BlockPositionEnum;
use App\Enums\Block\BlockContentTypeEnum;
@endphp
{{-- Titre --}}
<div class="row">
<div class="minicrud-input col-12 col-md-6 mb-3">
<fieldset class="border p-3">
<legend>{{ __('Titre') }}</legend>
@include('bo.partials.inputs.varchar', [
'id' => $idPrefix . '-title',
'label' => __('Titre'),
'hasWordCounter' => true,
'name' => 'data[title][value]',
'value' => old('data.title.value', $data['title']['value'] ?? null),
'required' => false,
'model' => $model ?? null,
'helper' => __('validation.between.string', [
'attribute' => __('Titre'),
'min' => 3,
'max' => 150,
]),
])
@include('modules.input-error', ['inputName' => 'data.title.value'])
</fieldset>
</div>
<div class="minicrud-input col-12 col-md-6">
{{-- Visibility --}}
<div class="mb-3">
<fieldset class="border p-3">
<legend>{{ __('Afficher bloc') }} *</legend>
<div class="row mb-3">
@ -47,7 +26,6 @@
</div>
</div>
</fieldset>
</div>
</div>
{{-- Position --}}
<div class="mb-3">
@ -144,7 +122,7 @@
'relation' => null,
'model' => $model ?? null,
'targetClass' => '\App\Models\News',
'modelListPaginate' => \App\Models\News::where('published',1)->paginate(10),
'modelListPaginate' => \App\Models\News::where('published', 1)->paginate(10),
'routeName' => 'bo.news.json-paginate',
'fieldName' => 'title',
'multiple' => false,

View file

@ -8,34 +8,38 @@
<div class="row justify-content-{{ $pos }}">
@if ($hasActu && $news)
<div class="col-12 {{ $hasCta ? 'col-md-4' : 'col-md-6' }} order-1">
<a href="{{ route('fo.news.show', $news->slug) }}" class="text-decoration-none text-dark">
<div class="card bg-white shadow-lg border-0">
<div class="row g-0">
<div class="news-small-card bottom-left-shadow border-0 bg-transparent">
<a class="text-decoration-none" href="{{ route('fo.news.show', $news->slug) }}"
title="{{ __('Accéder à l\'article : :name', ['name' => $news->title]) }}">
<div class="line-border-small bg-white p-3">
<div class="row align-items-center">
<div class="col-4">
<img src="{{ asset($news->picture) }}" class="img-fluid rounded-start h-100 object-fit-cover"
alt="{{ $news->picture_alt }}" title="{{ $news->picture_title }}">
<div class="ratio ratio-1x1">
<img class="object-fit-cover"
src="{{ asset($news->picture) }}"
title="{{ $news->picture_title }}"
alt="{{ $news->picture_alt }}">
</div>
</div>
<div class="col-8">
<div class="card-body py-2">
<div class="d-flex flex-column flex-md-row align-items-md-center gap-1 gap-md-2 mb-1">
<span class="badge text-uppercase align-self-start"
style="background-color: {{ $news->newsCategory->color }}">
<div class="d-flex align-items-center mb-2">
<div class="news-tag text-uppercase f-bourton-base fs-5 me-3 px-2 py-1"
style="background-color: {{ $news->newsCategory->color }}; color: #fff">
{!! clean($news->newsCategory->title) !!}
</span>
<small class="text-muted ps-md-1"
style="padding-left: 5px;">{{ \Carbon\Carbon::parse($news->updated_at)->format('d/m/Y') }}</small>
</div>
<p class="card-text fw-bold text-uppercase mb-0" style="font-size: 0.85rem;">
<p class="f-bakerie-rough mb-0">
{{ \Carbon\Carbon::parse($news->updated_at)->format('d/m/Y') }}
</p>
</div>
<p class="text-uppercase f-bourton-base m-0">
{{ $news->title }}
</p>
</div>
</div>
</div>
</div>
</a>
</div>
</div>
@endif
@if ($hasCta && $ctaUrl && $ctaLabel)