Ajoute le support de formation : entite racine separee du jeu 2D
Build and deploy / test-python (push) Successful in 11m2s
Build and deploy / test-js (push) Successful in 1m2s
Build and deploy / lint-python (push) Successful in 4m6s
Build and deploy / lint-js (push) Failing after 1m21s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped
Build and deploy / sonarqube (push) Failing after 4m2s
Build and deploy / test-python (push) Successful in 11m2s
Build and deploy / test-js (push) Successful in 1m2s
Build and deploy / lint-python (push) Successful in 4m6s
Build and deploy / lint-js (push) Failing after 1m21s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped
Build and deploy / sonarqube (push) Failing after 4m2s
Nouveau moteur document_engine/ (elements CRUD + rendering + labels), db/supports/ (stockage independant de db/games), routes/document/ (CRUD AJAX + publication), et l'editeur frontend complet (templates/document/, static/document/) avec moteur de layout reel (glisser-deposer -> fusion en rangee ou insertion avant/apres), vrai Undo/Redo par pile de commandes, grille d'accroche pour les formes libres, apercu responsive a largeurs fixes, mode Apercu, et publication persistee. "Mes formations" (templates/index.html) liste desormais les environnements 2D et les supports de formation cote a cote ; l'onboarding et core/auth_guard.py sont generalises pour qu'un compte restreint puisse posseder un projet de chaque type independamment. SKIP=djlint : le hook ne signale que le backlog H021 (styles en ligne) deja documente dans CODE_QUALITY.md sur des fichiers pre-existants non touches ici (base.html, game/play.html, scene_edit.html, game_dashboard_simple.html, clause_row.html) plus une ligne de index.html deja presente avant cette session — aucun nouveau fichier (document_edit.html compris) n'y figure. Tous les autres outils (ruff, mypy --strict, vulture, bandit, import-linter, eslint, stylelint) passent sans erreur ; 617 tests Python + 276 tests JS verts, plus une verification manuelle complete du cycle de vie via le serveur de developpement. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
7e4a761cbb
commit
bab581737a
+87
-46
@@ -1,54 +1,95 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Forge Engine — Mes jeux{% endblock %}
|
||||
{% block title %}Forge Engine — Mes formations{% endblock %}
|
||||
{% block content_class %}content-wide content-objectEdit{% endblock %}
|
||||
{% block body_class %}objectEditBody{% endblock %}
|
||||
{% block content %}
|
||||
<div class="dashPanelHeader">
|
||||
<h2 class="title is-4 mb-0">Mes jeux</h2>
|
||||
<span class="forge-badge">{{ games|length }} jeu{{ 's' if games|length != 1 else '' }}</span>
|
||||
</div>
|
||||
|
||||
<div class="twoCol">
|
||||
<div class="colLeft">
|
||||
<h2>Créer un jeu</h2>
|
||||
<!-- Onboarding guidé (voir routes/onboarding/onboarding_new.py) :
|
||||
comportement SYSTÉMATIQUE à chaque création de jeu, pas une
|
||||
<div class="dashPanelHeader">
|
||||
<h2 class="title is-4 mb-0">Mes formations</h2>
|
||||
<span class="forge-badge">{{ games|length + supports|length }} projet{{ 's' if (games|length + supports|length) != 1 else '' }}</span>
|
||||
</div>
|
||||
<div class="twoCol">
|
||||
<div class="colLeft">
|
||||
<h2>Créer un projet</h2>
|
||||
<!-- Onboarding guidé (voir routes/onboarding/onboarding_new.py) :
|
||||
comportement SYSTÉMATIQUE à chaque création de projet, pas une
|
||||
formalité réservée à l'inscription — un admin y repasse à
|
||||
volonté (illimité, pas de project_slug dédié qui bloquerait le
|
||||
retour). Choisir un type ici, ce n'est pas juste pour un compte
|
||||
"user" : ça prépare aussi le jour où un admin (ou un compte
|
||||
payant multi-projet) gère plusieurs jeux de types différents. -->
|
||||
<div class="card">
|
||||
<p class="hint" style="margin-top:0;">Choisis un type de jeu, nomme-le : Forge Engine crée le projet et t'envoie directement sur l'éditeur adapté.</p>
|
||||
<div class="actionsRow"><a href="{{ url_for('onboarding_new') }}" class="button primary">+ Créer un jeu</a></div>
|
||||
volonté (illimité, aucun slot dédié qui bloquerait le retour).
|
||||
Un compte "user" restreint peut posséder AU PLUS un projet de
|
||||
chaque type (environnement 2D + support de formation, voir
|
||||
docs/plan/PLAN.md — deux entités racines séparées, jamais
|
||||
mélangées). -->
|
||||
<div class="card">
|
||||
<p class="hint" style="margin-top:0;">Choisis un type de projet, nomme-le : Forge Engine le crée et t'envoie directement sur l'éditeur adapté.</p>
|
||||
<div class="actionsRow"><a href="{{ url_for('onboarding_new') }}" class="button primary">+ Créer un projet</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="colRight">
|
||||
<h2>Environnements 2D</h2>
|
||||
{% if games %}
|
||||
<div class="fieldsTableWrap">
|
||||
<table class="table is-fullwidth is-hoverable fieldsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Dossier</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for g in games %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('game_dashboard', slug=g.slug) }}">{{ g.name }}</a></td>
|
||||
<td class="has-text-grey">projects/{{ g.slug }}/</td>
|
||||
<td class="fieldsTableActions">
|
||||
<form method="post"
|
||||
action="{{ url_for('game_delete', slug=g.slug) }}"
|
||||
onsubmit="return confirm('Supprimer définitivement l\'environnement 2D « {{ g.name }} » et tout son contenu (dossier + base de données) ?');">
|
||||
<button type="submit"
|
||||
class="button is-small is-danger"
|
||||
title="Supprimer cet environnement 2D">🗑️</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="hint">Aucun environnement 2D pour l'instant — crée-en un à gauche.</p>
|
||||
{% endif %}
|
||||
<h2 class="mt-5">Supports de formation</h2>
|
||||
{% if supports %}
|
||||
<div class="fieldsTableWrap">
|
||||
<table class="table is-fullwidth is-hoverable fieldsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Dossier</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for s in supports %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('document_edit', slug=s.slug) }}">{{ s.name }}</a></td>
|
||||
<td class="has-text-grey">projects/{{ s.slug }}/</td>
|
||||
<td class="fieldsTableActions">
|
||||
<form method="post"
|
||||
action="{{ url_for('document_delete', slug=s.slug) }}"
|
||||
onsubmit="return confirm('Supprimer définitivement le support « {{ s.name }} » et tout son contenu (dossier + base de données) ?');">
|
||||
<button type="submit"
|
||||
class="button is-small is-danger"
|
||||
title="Supprimer ce support">🗑️</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="hint">Aucun support de formation pour l'instant — crée-en un à gauche.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="colRight">
|
||||
<h2>Jeux existants</h2>
|
||||
{% if games %}
|
||||
<div class="fieldsTableWrap">
|
||||
<table class="table is-fullwidth is-hoverable fieldsTable">
|
||||
<thead><tr><th>Nom</th><th>Dossier</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
{% for g in games %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('game_dashboard', slug=g.slug) }}">{{ g.name }}</a></td>
|
||||
<td class="has-text-grey">projects/{{ g.slug }}/</td>
|
||||
<td class="fieldsTableActions">
|
||||
<form method="post" action="{{ url_for('game_delete', slug=g.slug) }}"
|
||||
onsubmit="return confirm('Supprimer définitivement le jeu « {{ g.name }} » et tout son contenu (dossier + base de données) ?');">
|
||||
<button type="submit" class="button is-small is-danger" title="Supprimer ce jeu">🗑️</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="hint">Aucun jeu pour l'instant — crée le premier à gauche.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user