fixed edit/create messages

This commit is contained in:
julien
2026-02-22 20:46:23 +01:00
parent 4c24a4d083
commit 5e1947e6d3
6 changed files with 64 additions and 6 deletions

View File

51
public/js/tinymce.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -46,7 +46,7 @@ return function (App $app) {
/** @var Twig $view */ /** @var Twig $view */
$view = $request->getAttribute('view'); $view = $request->getAttribute('view');
return $view->render($response, 'macros/post_form.twig', [ return $view->render($response, 'pages/post_form.twig', [
'action' => $id ? "/admin/edit/{$id}" : "/admin/create", 'action' => $id ? "/admin/edit/{$id}" : "/admin/create",
'post' => $post, 'post' => $post,
]); ]);

View File

@@ -16,7 +16,6 @@
{# Header commun #} {# Header commun #}
{% include 'partials/_header.twig' %} {% include 'partials/_header.twig' %}
{# Zone principale chaque page injecte son contenu #} {# Zone principale chaque page injecte son contenu #}
<main> <main>
{% block content %}{% endblock %} {% block content %}{% endblock %}
@@ -25,8 +24,8 @@
{# Footer commun #} {# Footer commun #}
{% include 'partials/_footer.twig' %} {% include 'partials/_footer.twig' %}
{# Scripts globaux #} {# Scripts globaux #}
<script src="/js/app.js"></script> {# <script src="/js/app.js"></script> #}
{% block scripts %}{% endblock %}</body> {% block scripts %}{% endblock %}</body>
</html> </html>

View File

@@ -1,12 +1,20 @@
{% extends "layout.twig" %} {% extends "layout.twig" %}
{% block title %} {% block title %}
{% if post is defined %}Éditer larticle{% else %}Créer un article{% endif %} {% if post is defined and post.id is defined %}
Éditer larticle
{% else %}
Créer un article
{% endif %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2> <h2>
{% if post is defined %}Éditer{% else %}Créer{% endif %} un article {% if post is defined and post.id is defined %}
Éditer larticle
{% else %}
Créer un article
{% endif %}
</h2> </h2>
<form method="post" action="{{ action }}"> <form method="post" action="{{ action }}">