Rename author_email→contact_interne, author_show_contact→contact_public across view/controllers/templates

- v_theses_full: author_email→contact_interne, author_show_contact→contact_public
- Updated schema.sql and live DB view
- Renamed all PHP variables: currentAuthorEmail→contactInterne, currentAuthorShowContact→contactPublic
- Restored contact_interne backoffice field with proper wiring (takes precedence over mail field)
- Updated admin/add.php, admin/edit.php, partage/index.php, public/tfe.php templates
This commit is contained in:
Pontoporeia
2026-05-10 03:02:53 +02:00
parent 8a4b2541fb
commit fa30aab368
10 changed files with 55 additions and 21 deletions

View File

@@ -45,8 +45,8 @@
* array $currentFiles — existing thesis files for edit mode
* ?string $currentContextNote — existing context note for edit mode
* array $currentRaw — raw thesis row for edit mode
* ?string $currentAuthorShowContact — author show_contact flag for edit mode
* ?string $currentAuthorEmail — author email for edit mode
* ?string $contactPublic — contact visibility flag for edit mode
* ?string $contactInterne — contact email for edit mode
*
* Website:
* string $existingWebsiteUrl
@@ -159,7 +159,7 @@ $checkedFormatsForSiteWeb = $checkedFormatsForSiteWeb ?? [];
<label class="admin-checkbox-label">
<input type="checkbox" name="contact_public" value="1"
<?= !empty($formData["contact_public"]) ||
($currentAuthorShowContact ?? false)
($contactPublic ?? false)
? "checked"
: "" ?>>
Rendre le contact visible publiquement sur la fiche du TFE
@@ -511,7 +511,16 @@ $checkedFormatsForSiteWeb = $checkedFormatsForSiteWeb ?? [];
<small>Case logistique : cocher si un exemplaire physique est disponible à l'ERG.</small>
</div>
<!-- 7. Publication -->
<!-- 7. Contact interne -->
<div class="admin-form-group">
<label for="contact_interne">Contact interne :</label>
<input type="email" id="contact_interne" name="contact_interne"
value="<?= htmlspecialchars($contactInterne ?? $formData['contact_interne'] ?? '') ?>"
placeholder="ton.email@exemple.be">
<small>Adresse de contact interne (non visible publiquement). Peut être laissé vide.</small>
</div>
<!-- 8. Publication -->
<div class="admin-form-group">
<label class="admin-checkbox-label">
<input type="checkbox" name="is_published" value="1"