diff --git a/app_new/core/routes/admin.py b/app_new/core/routes/admin.py index 5ddc6c1..66fdeda 100644 --- a/app_new/core/routes/admin.py +++ b/app_new/core/routes/admin.py @@ -328,6 +328,21 @@ def _template_inventory(): app_root = Path(current_app.root_path).resolve() domain_aliases = {'admin': 'core', 'auth': 'core', 'dashboard': 'core', 'setup_wizard': 'core'} + page_urls = { + 'chatbot/index.html': '/chatbot/', + 'companies/index.html': '/companies/', 'companies/detail.html': '/companies/2', + 'ent/index.html': '/ent/', 'ent/messages.html': '/ent/messages', 'ent/staff.html': '/ent/staff', + 'equipments/index.html': '/equipments/', 'equipments/detail.html': '/equipments/42', + 'equipments/categories.html': '/equipments/categories', 'equipments/buildings.html': '/equipments/buildings/', + 'equipments/rooms.html': '/equipments/rooms/', 'equipments/room_detail.html': '/equipments/rooms/12', + 'interventions/index.html': '/interventions/', 'interventions/detail.html': '/interventions/39', + 'lots/index.html': '/lots/', 'lots/detail.html': '/lots/3', + 'parts/index.html': '/parts/', 'parts/detail.html': '/parts/4', + 'planning/index.html': '/planning/', 'pronote/index.html': '/pronote/', + 'room_types/index.html': '/room-types/', 'training/index.html': '/training/', + 'training/detail.html': '/training/6', 'yeastar/index.html': '/yeastar/', + 'gmao_config/index.html': '/gmao-config/', 'admin/index.html': '/admin/', + } files = [] for path in sorted(app_root.rglob('*.html')): relative = path.relative_to(app_root).as_posix() @@ -351,6 +366,7 @@ def _template_inventory(): 'logical_key': logical_key, 'source': source, 'hash': digest, + 'page_url': page_urls.get(logical_key), 'target_path': ( f"app_new/{parts[0]}/templates/{logical_key}" if template_index > 0 diff --git a/app_new/templates/admin/template_debug.html b/app_new/templates/admin/template_debug.html index f50521f..1d7e67a 100644 --- a/app_new/templates/admin/template_debug.html +++ b/app_new/templates/admin/template_debug.html @@ -68,12 +68,13 @@
| Fichier | Architecture cible | Source | État estimé | Empreinte | Actions | Décision | |
|---|---|---|---|---|---|---|---|
| Fichier | Architecture cible | Page réelle | Source | État estimé | Empreinte | Actions | Décision |
{{ template.path }} |
{{ template.target_path }} |
+ {% if template.page_url %} Ouvrir{{ template.page_url }}{% else %}Pas de page directe{% endif %} |
{{ template.source }} | {% if template.mark and template.mark.status == 'obsolete' %}Obsolète diff --git a/tests/integration/test_intervention_location_and_template_audit.py b/tests/integration/test_intervention_location_and_template_audit.py index ac85bb4..6b2db56 100644 --- a/tests/integration/test_intervention_location_and_template_audit.py +++ b/tests/integration/test_intervention_location_and_template_audit.py @@ -7,6 +7,7 @@ def test_template_audit_can_mark_and_restore_without_deleting(authenticated_clie assert 'Audit des templates' in response.get_data(as_text=True) assert 'Architecture cible des templates' in response.get_data(as_text=True) assert 'app_new/chatbot/templates/chatbot/index.html' in response.get_data(as_text=True) + assert '/chatbot/' in response.get_data(as_text=True) assert 'Identiques' in response.get_data(as_text=True) assert 'Divergents' in response.get_data(as_text=True) |