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 */
$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",
'post' => $post,
]);

View File

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

View File

@@ -1,12 +1,20 @@
{% extends "layout.twig" %}
{% 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 %}
{% block content %}
<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>
<form method="post" action="{{ action }}">