From e26fdb13f1297abef71bb88a99215edc772514e7 Mon Sep 17 00:00:00 2001 From: afornerot Date: Sat, 16 Nov 2024 09:32:15 +0100 Subject: [PATCH] svg --- src/Form/IllustrationType.php | 12 +++++++++++- templates/Home/home.html.twig | 4 ++-- templates/Home/user.html.twig | 4 ++++ templates/Illustration/edit.html.twig | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/Form/IllustrationType.php b/src/Form/IllustrationType.php index 66f4507..336678c 100644 --- a/src/Form/IllustrationType.php +++ b/src/Form/IllustrationType.php @@ -7,6 +7,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\HiddenType; +use Symfony\Component\Form\Extension\Core\Type\DateTimeType; use FOS\CKEditorBundle\Form\Type\CKEditorType; use Symfony\Bridge\Doctrine\Form\Type\EntityType; @@ -41,7 +42,16 @@ class IllustrationType extends AbstractType ], ] ); - + + $builder->add('submittime', + DateTimeType::class, [ + "label" =>"Date de Publication", + "date_widget" => "single_text", + "time_widget" => "single_text", + ] + ); + + if($options["by"]=="admin") { $builder->add('category', EntityType::class, [ diff --git a/templates/Home/home.html.twig b/templates/Home/home.html.twig index b2d7d25..3ed8643 100644 --- a/templates/Home/home.html.twig +++ b/templates/Home/home.html.twig @@ -194,7 +194,7 @@ {% if not items is empty %} -
+
{% for item in items %} {% if item.title|lower != "ninefolio" %} @@ -273,7 +273,7 @@

Membres

{% for user in users %} -
+ diff --git a/templates/Illustration/edit.html.twig b/templates/Illustration/edit.html.twig index c599a0a..c1570d9 100755 --- a/templates/Illustration/edit.html.twig +++ b/templates/Illustration/edit.html.twig @@ -62,6 +62,7 @@
{{ form_row(form.name) }} {{ form_row(form.category) }} + {{ form_row(form.submittime) }} {{ form_row(form.description) }}