@@ -44,6 +47,7 @@
{{ account_buttons }}
+ {{ submenu_content }}
diff --git a/templates/site/_members_menu.html.twig b/templates/site/_members_menu.html.twig
deleted file mode 100644
index 13987074b..000000000
--- a/templates/site/_members_menu.html.twig
+++ /dev/null
@@ -1,9 +0,0 @@
-{% include 'site/secondary_menu.html.twig' with {
- menu: [
- {
- "nom" : "Entreprises",
- "lien": path('company_public_profile_list'),
- 'is_active': current == "compagnies",
- },
- ]
-} only %}
diff --git a/templates/site/company_public_profile.html.twig b/templates/site/company_public_profile.html.twig
index 2b5c9d569..feb3d1668 100644
--- a/templates/site/company_public_profile.html.twig
+++ b/templates/site/company_public_profile.html.twig
@@ -1,17 +1,15 @@
-{% extends 'admin/association/membership/_base.html.twig' %}
+{% extends 'layouts/site.html.twig' %}
{% block submenu %}
- {% include 'site/_members_menu.html.twig' with {
- current: "compagnies"
- } only %}
+ {# `matches` : la fiche d'une entreprise garde cet onglet actif. #}
+ {% include 'site/partials/_submenu.html.twig' with { items: [
+ { label: 'Entreprises', route: 'company_public_profile_list',
+ matches: ['company_public_profile_list', 'company_public_profile'] },
+ ] } only %}
{% endblock %}
-{% block page_title %}{{ company_member.companyName }}{% endblock %}
-
{% block title %}{{ company_member.companyName }} est adhérente à l'AFUP{% endblock %}
-{% block body_css %}migrated-page{% endblock %}
-
{% set logo_url = path('company_public_profile_logo', {id : company_member.id, slug: company_member.slug }) %}
{% block metas %}
@@ -23,87 +21,87 @@
{% endblock %}
-{% block page_content %}
+{% block content %}
-
L'entreprise
-
-
-

-
-
- {{ company_member.description|nl2br }}
-
-
+ {# Reprend la hiérarchie du legacy : la page de recrutement prime, puis le contact, puis le site. #}
+ {% set cta = company_member.careersPageUrl ? 'careers' : (company_member.contactPageUrl ? 'contact' : 'website') %}
-
-
-
- {% if company_member.websiteUrl %}
-
Site web
- {% endif %}
-
- {% if company_member.careersPageUrl %}
-
Page de recrutement
- {% endif %}
-
- {% if company_member.contactPageUrl %}
-
Page de contact
- {% endif %}
-
+
-
Présente dans les antennes
-
- {% for antenne in antennes %}
-
-

- {{ antenne.label }}
-
- {% else %}
-
- {{ company_member.companyName }} n'a pas renseigné d'antenne à proximité.
-
- {% endfor %}
+
+
+
+
{{ company_member.companyName }}
+
-
- {% if badges|length > 0 %}
-
Badges
-
-
- {% for badge in badges %}
-
-

+
+ L'entreprise
+ {{ company_member.description|nl2br }}
+
+ {% if company_member.websiteUrl or company_member.careersPageUrl or company_member.contactPageUrl or company_member.cleanedTwitterHandle %}
+
+ {% if company_member.websiteUrl %}
+ Site web
+ {% endif %}
+
+ {% if company_member.careersPageUrl %}
+ Page de recrutement
+ {% endif %}
+
+ {% if company_member.contactPageUrl %}
+ Page de contact
+ {% endif %}
+
+ {% if company_member.cleanedTwitterHandle %}
+
+
+ @{{ company_member.cleanedTwitterHandle }}
+
+ {% endif %}
- {% endfor %}
-
{% endif %}
-
-
- {% if company_member.cleanedTwitterHandle %}
-
-
-
-
+
+
+
+ Présente dans les antennes
+ {% if antennes is not empty %}
+
+ {% for antenne in antennes %}
+
+
+

+
+ {# min-w-0 : sans lui un nom long refuse de se compresser et déborde de la carte. #}
+ {{ antenne.label }}
+
+ {% endfor %}
+
+ {% else %}
+ {{ company_member.companyName }} n'a pas renseigné d'antenne à proximité.
+ {% endif %}
+
+
+ {% if badges|length > 0 %}
+
+ Badges
+
+ {% for badge in badges %}
+

+ {% endfor %}
+
+
{% endif %}
+
{% endblock %}
diff --git a/templates/site/company_public_profile_list.html.twig b/templates/site/company_public_profile_list.html.twig
index a61220d79..bf56324ea 100644
--- a/templates/site/company_public_profile_list.html.twig
+++ b/templates/site/company_public_profile_list.html.twig
@@ -1,54 +1,40 @@
-{% extends 'admin/association/membership/_base.html.twig' %}
+{% extends 'layouts/site.html.twig' %}
{% block submenu %}
- {% include 'site/_members_menu.html.twig' with {
- current: "compagnies"
- } only %}
+ {# `matches` : la fiche d'une entreprise garde cet onglet actif. #}
+ {% include 'site/partials/_submenu.html.twig' with { items: [
+ { label: 'Entreprises', route: 'company_public_profile_list',
+ matches: ['company_public_profile_list', 'company_public_profile'] },
+ ] } only %}
{% endblock %}
{% block title %}Les entreprises adhérentes à l'AFUP{% endblock %}
-{% block page_title %}Entreprises adhérentes{% endblock %}
-
-{% block page_content %}
-
-
- Ces entreprises soutiennent l'association et la communauté PHP française en étant adhérentes à l'AFUP.
-
-
-
+
{% endblock %}
diff --git a/templates/site/partials/_submenu.html.twig b/templates/site/partials/_submenu.html.twig
new file mode 100644
index 000000000..33a852221
--- /dev/null
+++ b/templates/site/partials/_submenu.html.twig
@@ -0,0 +1,15 @@
+{#
+ Rendu générique d'un sous-menu de la barre secondaire, à placer dans le bloc `submenu`.
+ Remplace `site/secondary_menu.html.twig` pour les pages passées à la nouvelle charte.
+
+ items : liste de { label, route, params (optionnel), matches (optionnel) }
+ `matches` liste les routes qui allument l'onglet ; par défaut, sa propre route.
+ À renseigner quand plusieurs pages partagent le même onglet (une liste et sa fiche).
+#}
+{% set current_route = app.request.attributes.get('_route') %}
+
+{% for item in items %}
+
{{ item.label }}
+{% endfor %}