Merge branch 'develop' into trunk
This commit is contained in:
commit
c3d434dc1b
3 changed files with 48 additions and 73 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -1,53 +1,31 @@
|
|||
@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">
|
||||
<fieldset class="border p-3">
|
||||
<legend>{{ __('Afficher bloc') }} *</legend>
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
<label class="col-form-label" for="visibility">
|
||||
<b>{{ __('crud.minicrud.visibility_label') }}</b>
|
||||
</label>
|
||||
{{-- Visibility --}}
|
||||
<div class="mb-3">
|
||||
<fieldset class="border p-3">
|
||||
<legend>{{ __('Afficher bloc') }} *</legend>
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
<label class="col-form-label" for="visibility">
|
||||
<b>{{ __('crud.minicrud.visibility_label') }}</b>
|
||||
</label>
|
||||
|
||||
<div class="form-check form-switch ms-2">
|
||||
<input class="form-check-input" id="visibility" name="data[visibility][value]" type="checkbox"
|
||||
value="1" aria-describedby="visibilityHelp" @checked(old('data.visibility.value', $data['visibility']['value'] ?? false))>
|
||||
</div>
|
||||
|
||||
@include('modules.input-error', [
|
||||
'inputName' => 'data.visibility.value',
|
||||
'helperId' => 'visibilityHelp',
|
||||
'helper' => __('crud.minicrud.visibility_helper'),
|
||||
])
|
||||
<div class="form-check form-switch ms-2">
|
||||
<input class="form-check-input" id="visibility" name="data[visibility][value]" type="checkbox"
|
||||
value="1" aria-describedby="visibilityHelp" @checked(old('data.visibility.value', $data['visibility']['value'] ?? false))>
|
||||
</div>
|
||||
|
||||
@include('modules.input-error', [
|
||||
'inputName' => 'data.visibility.value',
|
||||
'helperId' => 'visibilityHelp',
|
||||
'helper' => __('crud.minicrud.visibility_helper'),
|
||||
])
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</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,
|
||||
|
|
|
|||
|
|
@ -8,33 +8,37 @@
|
|||
<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="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>
|
||||
<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 }}">
|
||||
{!! 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 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">
|
||||
<div class="ratio ratio-1x1">
|
||||
<img class="object-fit-cover"
|
||||
src="{{ asset($news->picture) }}"
|
||||
title="{{ $news->picture_title }}"
|
||||
alt="{{ $news->picture_alt }}">
|
||||
</div>
|
||||
|
||||
<p class="card-text fw-bold text-uppercase mb-0" style="font-size: 0.85rem;">
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<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) !!}
|
||||
</div>
|
||||
<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>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue