403 lines
20 KiB
PHP
403 lines
20 KiB
PHP
<div class="row">
|
|
{{-- SEO_TITLE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.seo_title'))->ucfirst() }}</legend>
|
|
<div class="row">
|
|
<div class="col-12 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'newsSeoTitle',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.seo_title'))->ucfirst(),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans('models.classes.news'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'seo_title',
|
|
'required' => true,
|
|
'model' => $newsModel ?? null,
|
|
'helper' => sprintf(
|
|
'%s %s',
|
|
__('crud.helpers.seo_title'),
|
|
__('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.seo_title'),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans('models.classes.news'),
|
|
]),
|
|
'min' => 45,
|
|
'max' => 70,
|
|
])),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.seo_title'))->ucfirst(),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans('models.classes.news'),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- SEO_DESCRIPTION --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.seo_description'))->ucfirst() }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar-multiline', [
|
|
'id' => 'newsSeoDescription',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.seo_description'))->ucfirst(),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans('models.classes.news'),
|
|
]),
|
|
'name' => 'seo_description',
|
|
'model' => $newsModel ?? null,
|
|
'required' => true,
|
|
'helper' => sprintf(
|
|
'%s %s',
|
|
__('crud.helpers.seo_description'),
|
|
__('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.seo_description'),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans('models.classes.news'),
|
|
]),
|
|
'min' => 50,
|
|
'max' => 160,
|
|
])),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.seo_description'))->ucfirst(),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans('models.classes.news'),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- TITLE --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.attributes.title'))->ucFirst() }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'newsTitle',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.attributes.title'))->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'title',
|
|
'required' => true,
|
|
'model' => $newsModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.attributes.title'),
|
|
'inter' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => str(__('validation.attributes.title'))->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- SUBTITLE --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.subtitle'))->ucFirst() }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'newsSubtitle',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.subtitle'))->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'subtitle',
|
|
'required' => false,
|
|
'model' => $newsModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.subtitle'),
|
|
'inter' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.subtitle'))->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- PICTURE --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.attributes.image'))->ucFirst() }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- PICTURE_ALT --}}
|
|
<div class="col-12 col-lg-6 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'newsPictureAlt',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_alt',
|
|
'required' => true,
|
|
'model' => $newsModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_alt_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE_TITLE --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'newsPictureTitle',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_title'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_title',
|
|
'required' => true,
|
|
'model' => $newsModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_title_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_title'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE --}}
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar-picture', [
|
|
'id' => 'newsPicture',
|
|
'name' => 'picture',
|
|
'width' => 700,
|
|
'height' => 400,
|
|
'model' => $newsModel ?? null,
|
|
'required' => true,
|
|
'preview' => true,
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- THUMBNAIL --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.thumbnail'))->ucFirst() }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- THUMBNAIL_ALT --}}
|
|
<div class="col-12 col-lg-6 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'newsThumbnailAlt',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.female'),
|
|
'field2' => __('validation.custom.thumbnail'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'thumbnail_alt',
|
|
'required' => true,
|
|
'model' => $newsModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_alt_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.female'),
|
|
'field2' => __('validation.custom.thumbnail'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- THUMBNAIL_TITLE --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'newsThumbnailTitle',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_title'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.female'),
|
|
'field2' => __('validation.custom.thumbnail'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'thumbnail_title',
|
|
'required' => true,
|
|
'model' => $newsModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_title_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_title'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.female'),
|
|
'field2' => __('validation.custom.thumbnail'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.news'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- THUMBNAIL --}}
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar-picture', [
|
|
'id' => 'newsThumbnail',
|
|
'name' => 'thumbnail',
|
|
'width' => 360,
|
|
'height' => 250,
|
|
'model' => $newsModel ?? null,
|
|
'required' => true,
|
|
'preview' => true,
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- CONTENT --}}
|
|
<div class="col-12 mb-3">
|
|
<fieldset class="border p-3">
|
|
<legend>{{ str(__('validation.attributes.content'))->ucfirst() }}</legend>
|
|
<div class="row mb-3">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.text-html', [
|
|
'id' => 'newsContent',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.attributes.content'))->ucfirst(),
|
|
'inter' => __('validation.custom.of_the.vowel'),
|
|
'model' => trans('models.classes.news'),
|
|
]),
|
|
'name' => 'content',
|
|
'model' => $newsModel ?? null,
|
|
'required' => true,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- HIGHLIGHT --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.highlight'))->ucFirst() }}</legend>
|
|
<div class="row">
|
|
<div class="col-12 col-md-6 mb-3">
|
|
@include('bo.partials.inputs.tinyint-boolean', [
|
|
'id' => 'newsHighlight ',
|
|
'name' => 'highlight',
|
|
'model' => $newsModel ?? null,
|
|
'label' => __('crud.minicrud.highlight_label'),
|
|
'helper' => __('crud.minicrud.highlight_helper'),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- CATEGORY --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.category'))->ucFirst() }}</legend>
|
|
<div class="row">
|
|
<div class="col-12 col-md-6 mb-3">
|
|
@include('bo.partials.inputs.bigint-foreign-id', [
|
|
'id' => 'newsCategoryId',
|
|
'name' => 'news_category_id',
|
|
'model' => $newsModel ?? null,
|
|
'associatedModels' => $newsCategoryModels,
|
|
'foreignLabel' => 'title',
|
|
'label' => __('crud.minicrud.category_label'),
|
|
'helper' => __('crud.minicrud.category_helper'),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- PUBLICATION --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('crud.minicrud.visibility_label'))->ucFirst() }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- PUBLISHED --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
@include('bo.partials.inputs.tinyint-boolean', [
|
|
'id' => 'newsPublished',
|
|
'name' => 'published',
|
|
'model' => $newsModel ?? null,
|
|
'label' => __('crud.minicrud.visibility_label'),
|
|
'helper' => sprintf('%s %s', __('crud.minicrud.visibility_helper'), __('crud.helpers.visibility_with_dates')),
|
|
])
|
|
</div>
|
|
{{-- PUBLICATION DATES --}}
|
|
<div class="col-12 mb-3">
|
|
<div class="row mb-3">
|
|
{{-- PUBLISH_AT --}}
|
|
<div class="col">
|
|
<div class="form-group">
|
|
@include('bo.partials.inputs.timestamp-datetime', [
|
|
'label' => str(__('validation.custom.publish_at'))->ucFirst() . __(' (Europe/Paris)'),
|
|
'id' => 'newsPublishedAt',
|
|
'name' => 'publish_at',
|
|
'model' => $newsModel ?? null,
|
|
'helper' => __('crud.helpers.publish_at', [
|
|
'model' => str(__('models.classes.news'))->ucFirst(),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
{{-- UNPUBLISH_AT --}}
|
|
<div class="col">
|
|
<div class="form-group">
|
|
@include('bo.partials.inputs.timestamp-datetime', [
|
|
'label' => str(__('validation.custom.unpublish_at'))->ucfirst() . __(' (Europe/Paris)'),
|
|
'id' => 'newsUnPublishedAt',
|
|
'name' => 'unpublish_at',
|
|
'model' => $newsModel ?? null,
|
|
'helper' => __('crud.helpers.unpublish_at', [
|
|
'model' => str(__('models.classes.news'))->ucFirst(),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 text-center">
|
|
<p><b>{{ __('* Champs obligatoires') }}</b></p>
|
|
</div>
|
|
</div>
|