Backend- support for adding descriptions to pages, posts, photos

This commit is contained in:
Alex 2026-06-08 14:56:15 -07:00
parent 4564aa9534
commit d09f49ed24
7 changed files with 36 additions and 0 deletions

View file

@ -39,6 +39,14 @@ const editorInit = () => {
"width": 800, "width": 800,
"height": 500 "height": 500
}); });
const descEditor = Jodit.make('#post_description', {
"enter": "P",
"theme": 'dark',
"disablePlugins": "ai-assistant,about",
"width": 800,
"height": 200
});
} }
if (document.querySelector('#page_text')) { if (document.querySelector('#page_text')) {
@ -49,6 +57,14 @@ const editorInit = () => {
"width": 800, "width": 800,
"height": 500 "height": 500
}); });
const descEditoreditor = Jodit.make('#page_description', {
"enter": "P",
"theme": 'dark',
"disablePlugins": "ai-assistant,about",
"width": 800,
"height": 200
});
} }
if (document.querySelector('#photos_text')) { if (document.querySelector('#photos_text')) {
@ -59,6 +75,14 @@ const editorInit = () => {
"width": 800, "width": 800,
"height": 500 "height": 500
}); });
const descEditoreditor = Jodit.make('#photos_description', {
"enter": "P",
"theme": 'dark',
"disablePlugins": "ai-assistant,about",
"width": 800,
"height": 200
});
} }
} }

View file

@ -15,6 +15,7 @@ class PageType extends AbstractType
{ {
$builder $builder
->add('title') ->add('title')
->add('description')
->add('text') ->add('text')
->add('url') ->add('url')
->add('published') ->add('published')

View file

@ -27,6 +27,7 @@ class PhotosType extends AbstractType
->add('date', DateType::class) ->add('date', DateType::class)
->add('category', CategoryAutocompleteField::class) ->add('category', CategoryAutocompleteField::class)
->add('tags', TagAutocompleteField::class, ['required' => false]) ->add('tags', TagAutocompleteField::class, ['required' => false])
->add('description')
->add('text') ->add('text')
->add('thumbnail', FileType::class, [ ->add('thumbnail', FileType::class, [
'label' => 'Thumbnail', 'label' => 'Thumbnail',

View file

@ -22,6 +22,7 @@ class PostType extends AbstractType
$builder $builder
->add('title', TextType::class) ->add('title', TextType::class)
->add('date', DateType::class) ->add('date', DateType::class)
->add('description')
->add('text', TextareaType::class) ->add('text', TextareaType::class)
->add('category', CategoryAutocompleteField::class) ->add('category', CategoryAutocompleteField::class)
->add('tags', TagAutocompleteField::class, ['required' => false]) ->add('tags', TagAutocompleteField::class, ['required' => false])

View file

@ -15,6 +15,9 @@
<div class="row"> <div class="row">
{{ form_row(form.title) }} {{ form_row(form.title) }}
</div> </div>
<div class="row">
{{ form_row(form.description) }}
</div>
<div class="row"> <div class="row">
{{ form_row(form.text) }} {{ form_row(form.text) }}
</div> </div>

View file

@ -26,6 +26,9 @@
<div class="row"> <div class="row">
{{ form_row(form.thumbnail) }} {{ form_row(form.thumbnail) }}
</div> </div>
<div class="row">
{{ form_row(form.description)}}
</div>
<div class="row"> <div class="row">
{{ form_row(form.text)}} {{ form_row(form.text)}}
</div> </div>

View file

@ -19,6 +19,9 @@
<div class="row"> <div class="row">
{{ form_row(form.date) }} {{ form_row(form.date) }}
</div> </div>
<div class="row">
{{ form_row(form.description) }}
</div>
<div class="row"> <div class="row">
{{ form_row(form.text) }} {{ form_row(form.text) }}
</div> </div>