diff --git a/css/admin.css b/css/admin.css
index b84105e..03e0366 100644
--- a/css/admin.css
+++ b/css/admin.css
@@ -97,7 +97,10 @@ body.pods-modal-window #pods-meta-documents-joints {
/* Axes thématiques checkbox group headers */
body.post-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label,
-body.post-new-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label {
+body.post-new-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label,
+body.profile-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label,
+body.user-edit-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label,
+body.user-new-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label {
font-size: 0.72rem;
font-weight: 600;
text-transform: uppercase;
@@ -112,11 +115,24 @@ body.post-new-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label {
width: 100%;
}
body.post-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label:first-child,
-body.post-new-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label:first-child {
+body.post-new-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label:first-child,
+body.profile-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label:first-child,
+body.user-edit-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label:first-child,
+body.user-new-php .pods-form-ui-row-name-axes-thematiques li.axes-group-label:first-child {
border-top: none;
margin-top: 0;
}
+/* Sur user-new.php, WP core force `#createuser .form-field input { width: 25em }`.
+ Les cases à cocher / radios des champs Pods (ex. axes) héritent de cette
+ largeur : on la réinitialise. */
+#adduser .form-field input[type="checkbox"],
+#adduser .form-field input[type="radio"],
+#createuser .form-field input[type="checkbox"],
+#createuser .form-field input[type="radio"] {
+ width: auto;
+}
+
/* Remove WP's JS-injected padding-top on the editor wrap (compensation for sticky toolbar) */
body.post-php #wp-content-editor-tools,
body.post-new-php #wp-content-editor-tools {
diff --git a/css/style.css b/css/style.css
index 2ab1be0..8d956ab 100755
--- a/css/style.css
+++ b/css/style.css
@@ -2131,6 +2131,10 @@ footer {
font-size: 1.25rem; }
.article .main-content-text a {
text-decoration: underline; }
+ .article .main-content-text .post-card h2::after {
+ display: none; }
+ .article .main-content-text .post-card a {
+ text-decoration: none; }
.article .main-content-text p {
margin-bottom: 1rem;
line-height: 1.4; }
diff --git a/inc/assets.php b/inc/assets.php
index 7270407..d749f4e 100644
--- a/inc/assets.php
+++ b/inc/assets.php
@@ -274,6 +274,8 @@ function enqueue_admin_js() {
// profile.php / user-edit.php / user-new.php
if ( in_array( $screen->base, [ 'profile', 'user-edit', 'user' ], true ) ) {
$enqueue( 'thalim-admin-profile', 'admin-profile.js', [ 'jquery', 'thalim-admin-base' ] );
+ // Regroupement des axes par période (mêmes données que la page post)
+ wp_localize_script( 'thalim-admin-profile', 'thalimAxesGroups', thalim_get_axes_filter_groups() );
}
// edit-tags.php / term.php
diff --git a/js/admin/admin-base.js b/js/admin/admin-base.js
index ae29fc5..0af504f 100644
--- a/js/admin/admin-base.js
+++ b/js/admin/admin-base.js
@@ -63,7 +63,9 @@
}
function isProfileEditPage() {
- return window.pagenow === 'profile' || window.pagenow === 'user-edit' || window.pagenow === 'user-new';
+ // NB : sur user-new.php, window.pagenow vaut 'user' (et non 'user-new').
+ return window.pagenow === 'profile' || window.pagenow === 'user-edit'
+ || window.pagenow === 'user-new' || window.pagenow === 'user';
}
function getProfileForm() {
@@ -388,6 +390,47 @@
setTimeout(markReady, 2000);
});
+ // Regroupe les cases à cocher du champ « axes thématiques » par période.
+ // Partagé entre la page d'édition de post et la page de profil (les deux
+ // affichent le champ en checkbox). Données via window.thalimAxesGroups
+ // (localisées par inc/assets.php). Idempotent : ne fait rien si déjà groupé.
+ function groupAxesCheckboxes() {
+ if (!window.thalimAxesGroups || !thalimAxesGroups.length) return;
+
+ var row = document.querySelector('.' + CONFIG.rows.axes);
+ if (!row) return;
+
+ var list = row.querySelector('ul');
+ if (!list) return;
+
+ // Already grouped — nothing to do
+ if (list.querySelector('.axes-group-label')) return;
+
+ // Map existing
by checkbox value; preserve "add new" button
+ var liMap = {};
+ var addNewItem = null;
+ list.querySelectorAll('li').forEach(function(li) {
+ if (li.classList.contains('pods-pick-add-new')) { addNewItem = li; return; }
+ var cb = li.querySelector('input[type="checkbox"]');
+ if (cb) liMap[cb.value] = li;
+ });
+
+ // Rebuild list in group order
+ list.innerHTML = '';
+ thalimAxesGroups.forEach(function(group) {
+ var labelLi = document.createElement('li');
+ labelLi.className = 'axes-group-label';
+ labelLi.textContent = group.label;
+ list.appendChild(labelLi);
+ group.terms.forEach(function(term) {
+ var li = liMap[String(term.id)];
+ if (li) list.appendChild(li);
+ });
+ });
+
+ if (addNewItem) list.appendChild(addNewItem);
+ }
+
window.ThalimAdmin = {
CONFIG: CONFIG,
safeRun: safeRun,
@@ -399,6 +442,7 @@
reinitEditor: reinitEditor,
updatePostboxVisibility: updatePostboxVisibility,
initInfoPopovers: initInfoPopovers,
+ groupAxesCheckboxes: groupAxesCheckboxes,
markReady: markReady
};
diff --git a/js/admin/admin-post-edit.js b/js/admin/admin-post-edit.js
index 1135506..18a1862 100644
--- a/js/admin/admin-post-edit.js
+++ b/js/admin/admin-post-edit.js
@@ -94,42 +94,9 @@
TA.ensureVisualMode(enEditorId);
}
- function groupAxesCheckboxes() {
- if (!window.thalimAxesGroups || !thalimAxesGroups.length) return;
-
- var row = document.querySelector('.' + CONFIG.rows.axes);
- if (!row) return;
-
- var list = row.querySelector('ul');
- if (!list) return;
-
- // Already grouped — nothing to do
- if (list.querySelector('.axes-group-label')) return;
-
- // Map existing by checkbox value; preserve "add new" button
- var liMap = {};
- var addNewItem = null;
- list.querySelectorAll('li').forEach(function(li) {
- if (li.classList.contains('pods-pick-add-new')) { addNewItem = li; return; }
- var cb = li.querySelector('input[type="checkbox"]');
- if (cb) liMap[cb.value] = li;
- });
-
- // Rebuild list in group order
- list.innerHTML = '';
- thalimAxesGroups.forEach(function(group) {
- var labelLi = document.createElement('li');
- labelLi.className = 'axes-group-label';
- labelLi.textContent = group.label;
- list.appendChild(labelLi);
- group.terms.forEach(function(term) {
- var li = liMap[String(term.id)];
- if (li) list.appendChild(li);
- });
- });
-
- if (addNewItem) list.appendChild(addNewItem);
- }
+ // Regroupement des axes par période — implémentation partagée dans
+ // admin-base.js (réutilisée par la page de profil).
+ var groupAxesCheckboxes = TA.groupAxesCheckboxes;
var REF_BIB_EDITOR_ID = CONFIG.editors.refBib;
var refBibReinited = false;
diff --git a/js/admin/admin-profile.js b/js/admin/admin-profile.js
index f20e40b..1ed230d 100644
--- a/js/admin/admin-profile.js
+++ b/js/admin/admin-profile.js
@@ -110,9 +110,42 @@
});
}
+ // Regroupe les axes thématiques par période (champ en cases à cocher, comme
+ // la page post — implémentation partagée dans admin-base.js). Les checkboxes
+ // sont rendues par le DFV React de façon asynchrone ; sur user-new.php, la
+ // page est très lourde (beaucoup de champs Pods) et le rendu peut arriver
+ // bien après le chargement. On observe donc le formulaire jusqu'à ce que les
+ // cases apparaissent, plutôt qu'un retry borné qui expirait sur user-new.
+ function groupProfileAxes() {
+ function tryGroup() {
+ var row = document.querySelector('.' + TA.CONFIG.rows.axes);
+ var list = row && row.querySelector('ul');
+ if (!list) return false;
+ if (list.querySelector('.axes-group-label')) return true; // déjà groupé
+ if (!list.querySelector('input[type="checkbox"]')) return false; // pas encore rendu
+ TA.groupAxesCheckboxes();
+ return true;
+ }
+
+ if (tryGroup()) return;
+
+ // On observe la LIGNE du champ (le des cases y est injecté par React)
+ // et on NE se déconnecte PAS au premier succès : sur user-new (item id 0),
+ // le DFV peut re-rendre la liste après coup et écraser le groupement — on
+ // le réapplique alors (tryGroup est idempotent, pas de boucle). Fallback
+ // sur le formulaire si la ligne n'est pas encore là.
+ var row = document.querySelector('.' + TA.CONFIG.rows.axes);
+ var scope = row || TA.getProfileForm() || document.body;
+ var observer = new MutationObserver(function() { tryGroup(); });
+ observer.observe(scope, { childList: true, subtree: true });
+ // Filet de sécurité : cesser d'observer après 30 s.
+ setTimeout(function() { observer.disconnect(); }, 30000);
+ }
+
function initProfileEditors() {
reorderProfileSections();
TA.initInfoPopovers('user');
+ safeRun('groupProfileAxes', groupProfileAxes);
// Hide the "À propos du compte" section heading
document.querySelectorAll('#your-profile h2, #adduser h2, #createuser h2').forEach(function(h2) {
diff --git a/scss/_single.scss b/scss/_single.scss
index 8a5b4f3..28007ba 100644
--- a/scss/_single.scss
+++ b/scss/_single.scss
@@ -276,6 +276,17 @@
text-decoration: underline;
}
+ // Les cards d'annonces liées sont imbriquées dans .main-content-text :
+ // leur titre est un , il ne doit hériter NI de la barre colorée
+ // `h2::after` (couleur de catégorie de l'annonce courante), NI du
+ // soulignement des liens du corps. On neutralise les deux pour les cards.
+ .post-card h2::after {
+ display: none;
+ }
+ .post-card a {
+ text-decoration: none;
+ }
+
p {
margin-bottom: 1rem;
line-height: 1.4;