mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
feat: refactor licence fragment — Libre→CC2r+licence, Interne→opt-in want_license, Interdit→none, add details/summary to license UI
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* HTMX fragment (admin): renders the licence section with conditional required states.
|
||||
* HTMX fragment (admin): renders the licence section with conditional options.
|
||||
*
|
||||
* POST: access_type_id, license_id, license_custom, cc2r, admin_mode
|
||||
* POST: access_type_id, license_id, license_custom, cc2r, want_license
|
||||
*
|
||||
* Admin mode: never required.
|
||||
* Libre (1): CC2r checkbox + licence select/custom (at least one required)
|
||||
* Interne (2): opt-in "Je souhaite appliquer une licence" → CC2r + licence select/custom
|
||||
* Interdit (3): no licence options
|
||||
*/
|
||||
require_once __DIR__ . '/../../bootstrap.php';
|
||||
require_once __DIR__ . '/../../src/AdminAuth.php';
|
||||
AdminAuth::requireLogin();
|
||||
|
||||
$accessTypeId = $_POST['access_type_id'] ?? '2';
|
||||
$licenseId = $_POST['license_id'] ?? '';
|
||||
$accessTypeId = $_POST['access_type_id'] ?? '';
|
||||
$licenseId = $_POST['license_id'] ?? '';
|
||||
$licenseCustom = $_POST['license_custom'] ?? '';
|
||||
$cc2r = !empty($_POST['cc2r']);
|
||||
$adminMode = true;
|
||||
$cc2r = !empty($_POST['cc2r']);
|
||||
$wantLicense = !empty($_POST['want_license']);
|
||||
|
||||
require_once APP_ROOT . '/src/Database.php';
|
||||
$db = Database::getInstance();
|
||||
@@ -22,6 +24,22 @@ $licenseTypes = $db->getAllLicenseTypes();
|
||||
?>
|
||||
|
||||
<div class="licence-license-choice">
|
||||
<?php if ($accessTypeId === '1'): ?>
|
||||
<fieldset class="licence-options-fieldset">
|
||||
<legend>Options de licence</legend>
|
||||
<p class="licence-note">J'autorise que mon TFE soit disponible en libre accès. Je suis conscient·e des responsabilités légales.</p>
|
||||
|
||||
<div class="admin-form-group">
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="cc2r" value="1"
|
||||
<?= $cc2r ? 'checked' : '' ?>>
|
||||
J'accepte les conditions collectives de réutilisation (CC2r)
|
||||
</label>
|
||||
<small><a href="https://cc2r.net/" target="_blank" rel="noopener">En savoir plus sur la CC2r ↗</a></small>
|
||||
</div>
|
||||
|
||||
<div class="licence-or-separator"><span>et / ou</span></div>
|
||||
|
||||
<?php
|
||||
$name = 'license_id'; $label = 'Licence :'; $options = $licenseTypes;
|
||||
$selected = $licenseId; $placeholder = '— Sélectionner —'; $required = false;
|
||||
@@ -31,16 +49,61 @@ $licenseTypes = $db->getAllLicenseTypes();
|
||||
<?php
|
||||
$name = 'license_custom'; $label = 'Ou précisez une autre licence :';
|
||||
$value = htmlspecialchars($licenseCustom);
|
||||
$hint = 'Ex: CC BY-NC 4.0, Tous droits réservés...';
|
||||
$hint = 'Ex: CC BY-NC 4.0, Tous droits réservés…';
|
||||
include APP_ROOT . '/templates/partials/form/text-field.php';
|
||||
?>
|
||||
</fieldset>
|
||||
|
||||
<?php elseif ($accessTypeId === '2'): ?>
|
||||
<fieldset class="licence-options-fieldset">
|
||||
<legend>Options de licence</legend>
|
||||
<p class="licence-note">Mon TFE est accessible sur place et sur la plateforme xamxam par la communauté erg. J'autorise une (ré-)utilisation dans un contexte académique au sein de l'erg.</p>
|
||||
|
||||
<div class="admin-form-group">
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="want_license" value="1"
|
||||
hx-post="/admin/licence-fragment.php"
|
||||
hx-target=".licence-license-choice"
|
||||
hx-swap="outerHTML"
|
||||
hx-include="closest fieldset"
|
||||
<?= $wantLicense ? 'checked' : '' ?>>
|
||||
<strong>Je souhaite appliquer une licence sur mon TFE</strong>
|
||||
</label>
|
||||
<small>Par défaut, aucune licence spécifique n'est appliquée. Cochez pour en choisir une.</small>
|
||||
</div>
|
||||
|
||||
<?php if ($wantLicense): ?>
|
||||
<div class="admin-form-group">
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="cc2r" value="1"
|
||||
<?= $cc2r ? 'checked' : '' ?>>
|
||||
J'accepte les Conditions Collectives de Réutilisation (CC2r)
|
||||
J'accepte les conditions collectives de réutilisation (CC2r)
|
||||
</label>
|
||||
<small><a href="https://cc2r.net/" target="_blank" rel="noopener">En savoir plus sur la CC2r ↗</a></small>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$name = 'license_id'; $label = 'Licence :'; $options = $licenseTypes;
|
||||
$selected = $licenseId; $placeholder = '— Sélectionner —'; $required = false;
|
||||
include APP_ROOT . '/templates/partials/form/select-field.php';
|
||||
?>
|
||||
|
||||
<?php
|
||||
$name = 'license_custom'; $label = 'Ou précisez une autre licence :';
|
||||
$value = htmlspecialchars($licenseCustom);
|
||||
$hint = 'Ex: CC BY-NC 4.0, Tous droits réservés…';
|
||||
include APP_ROOT . '/templates/partials/form/text-field.php';
|
||||
?>
|
||||
|
||||
<p class="licence-note"><em>Je suis conscient·e des obligations légales venant avec la licence choisie et acquiesce avoir lu la documentation prévue à cet effet par l'erg, ainsi qu'avoir discuté des enjeux des licences avec l'équipe pédagogique.</em></p>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
|
||||
<?php elseif ($accessTypeId === '3'): ?>
|
||||
<fieldset class="licence-options-fieldset">
|
||||
<legend>Options de licence</legend>
|
||||
<p class="licence-note">Mon TFE n'est pas disponible en physique ni sur le site. Une note descriptive est visible publiquement.</p>
|
||||
<p class="licence-note"><em>Aucune licence n'est applicable.</em></p>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -743,3 +743,18 @@ details > summary::-webkit-details-marker {
|
||||
audio::-webkit-media-controls-enclosure {
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
details {
|
||||
padding: var(--space-s);
|
||||
}
|
||||
summary {
|
||||
font-family: var(--font-display);
|
||||
font-weight: 600;
|
||||
text-decoration: 1px wavy;
|
||||
color: var(--accent-secondary);
|
||||
svg {
|
||||
fill: var(--accent-secondary);
|
||||
vertical-align: text-bottom;
|
||||
height: 1.4em;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1362,3 +1362,135 @@ legend {
|
||||
#format-fichiers-block {
|
||||
container-type: inline-size;
|
||||
}
|
||||
|
||||
/* ── Licence choice or-separator ─────────────────────────── */
|
||||
|
||||
.licence-or-separator {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-xs);
|
||||
margin: var(--space-xs) 0;
|
||||
color: var(--text-tertiary);
|
||||
font-size: var(--step--1);
|
||||
}
|
||||
|
||||
.licence-or-separator::before,
|
||||
.licence-or-separator::after {
|
||||
content: '';
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background: var(--accent-muted);
|
||||
}
|
||||
|
||||
/* ── Nested licence fieldset ─────────────────────────────── */
|
||||
|
||||
.licence-options-fieldset {
|
||||
border: 1px solid var(--accent-muted);
|
||||
border-radius: var(--radius);
|
||||
padding: var(--space-s);
|
||||
margin-top: var(--space-xs);
|
||||
}
|
||||
|
||||
.licence-options-fieldset legend {
|
||||
font-weight: 600;
|
||||
font-size: var(--step--1);
|
||||
color: var(--text-secondary);
|
||||
padding: 0 var(--space-2xs);
|
||||
}
|
||||
|
||||
/* ── File figures (recap + edit existing files) ──────────── */
|
||||
|
||||
.admin-file-list,
|
||||
.recap-files-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-s);
|
||||
}
|
||||
|
||||
.admin-file-list-item,
|
||||
.recap-files-list-item {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.admin-file-figure,
|
||||
.recap-file-figure {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-s);
|
||||
background: var(--bg-secondary, rgba(149, 87, 181, 0.05));
|
||||
border-radius: var(--radius);
|
||||
padding: var(--space-s);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.admin-file-icon,
|
||||
.recap-file-icon {
|
||||
font-size: 1.5rem;
|
||||
flex-shrink: 0;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--accent-muted);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.admin-file-thumb,
|
||||
.recap-file-thumb {
|
||||
max-width: 160px;
|
||||
max-height: 120px;
|
||||
object-fit: cover;
|
||||
border-radius: var(--radius);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.admin-file-caption,
|
||||
.recap-file-caption {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3xs);
|
||||
}
|
||||
|
||||
.admin-file-name,
|
||||
.recap-file-name {
|
||||
font-weight: 600;
|
||||
font-size: var(--step--1);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.admin-file-peertube-id,
|
||||
.recap-file-peertube-id {
|
||||
font-size: var(--step--2);
|
||||
color: var(--text-tertiary);
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.admin-file-meta-row,
|
||||
.recap-file-meta-row {
|
||||
display: flex;
|
||||
gap: var(--space-xs);
|
||||
align-items: center;
|
||||
font-size: var(--step--2);
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.recap-file-label {
|
||||
font-size: var(--step--1);
|
||||
color: var(--text-secondary);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.admin-file-label-input {
|
||||
font-size: var(--step--2);
|
||||
padding: var(--space-3xs) var(--space-2xs);
|
||||
border: 1px solid var(--accent-muted);
|
||||
border-radius: var(--radius);
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
margin-top: var(--space-3xs);
|
||||
}
|
||||
|
||||
@@ -79,20 +79,19 @@ $websiteLabel = htmlspecialchars($_POST['website_label'] ?? '');
|
||||
if ($editMode && (!empty($_efiles) || $_cover)):
|
||||
?>
|
||||
<div class="admin-form-group">
|
||||
<ul id="existing-files-sortable" class="admin-file-list">
|
||||
<ul id="existing-files-sortable" class="admin-file-list" role="list">
|
||||
<?php if ($_cover): ?>
|
||||
<li class="admin-file-list-item">
|
||||
<span class="admin-file-icon-col">🖼️</span>
|
||||
<span class="admin-file-info">
|
||||
<span class="admin-file-name">Couverture</span>
|
||||
<span class="admin-file-meta-row">
|
||||
<img src="/media?path=<?= urlencode($_cover) ?>"
|
||||
alt="Couverture actuelle" style="max-height:120px;border-radius:var(--radius);margin-top:var(--space-3xs);">
|
||||
</span>
|
||||
<label class="admin-checkbox-label" style="margin-top:var(--space-3xs);">
|
||||
<input type="checkbox" name="remove_cover" value="1"> Supprimer
|
||||
</label>
|
||||
</span>
|
||||
<figure class="admin-file-figure">
|
||||
<img src="/media?path=<?= urlencode($_cover) ?>"
|
||||
alt="Couverture actuelle" class="admin-file-thumb">
|
||||
<figcaption class="admin-file-caption">
|
||||
<span class="admin-file-name">Couverture</span>
|
||||
<label class="admin-checkbox-label" style="margin-top:var(--space-3xs);">
|
||||
<input type="checkbox" name="remove_cover" value="1"> Supprimer
|
||||
</label>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
@@ -118,27 +117,31 @@ $websiteLabel = htmlspecialchars($_POST['website_label'] ?? '');
|
||||
?>
|
||||
<li class="admin-file-list-item" data-file-id="<?= (int)$_f["id"] ?>">
|
||||
<input type="hidden" name="file_sort_order[]" value="<?= (int)$_f["id"] ?>">
|
||||
<span class="admin-file-icon-col"><?= $_fIcon ?></span>
|
||||
<span class="admin-file-info">
|
||||
<a href="<?= $_fLinkHref ?>" target="_blank" rel="noopener" class="admin-file-name">
|
||||
<?= htmlspecialchars($_f["file_name"] ?? basename($_f["file_path"])) ?>
|
||||
</a>
|
||||
<span class="admin-file-meta-row">
|
||||
<span class="admin-file-type-badge"><?= htmlspecialchars($_fType) ?></span>
|
||||
<?php if (!empty($_f["file_size"]) && $_f["file_size"] > 0): ?>
|
||||
<span class="admin-file-size"><?= number_format($_f["file_size"] / 1024 / 1024, 2) ?> MB</span>
|
||||
<figure class="admin-file-figure">
|
||||
<span class="admin-file-icon"><?= $_fIcon ?></span>
|
||||
<figcaption class="admin-file-caption">
|
||||
<a href="<?= $_fLinkHref ?>" target="_blank" rel="noopener" class="admin-file-name">
|
||||
<?= htmlspecialchars($_f["file_name"] ?? basename($_f["file_path"])) ?>
|
||||
</a>
|
||||
<?php if ($_fIsPeerTube): ?>
|
||||
<span class="admin-file-peertube-id">ID : <?= htmlspecialchars(substr($_fPath, strlen("peertube_ids:"))) ?></span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
<input type="text" name="file_label[<?= (int)$_f["id"] ?>]"
|
||||
value="<?= htmlspecialchars($_f["display_label"] ?? "") ?>"
|
||||
placeholder="Légende / description (optionnel)"
|
||||
class="admin-file-label-input">
|
||||
</span>
|
||||
<span class="admin-file-meta-row">
|
||||
<span class="admin-file-type-badge"><?= htmlspecialchars($_fType) ?></span>
|
||||
<?php if (!empty($_f["file_size"]) && $_f["file_size"] > 0): ?>
|
||||
<span class="admin-file-size"><?= number_format($_f["file_size"] / 1024 / 1024, 2) ?> MB</span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
<input type="text" name="file_label[<?= (int)$_f["id"] ?>]"
|
||||
value="<?= htmlspecialchars($_f["display_label"] ?? "") ?>"
|
||||
placeholder="Légende / description (optionnel)"
|
||||
class="admin-file-label-input">
|
||||
</figcaption>
|
||||
</figure>
|
||||
<input type="hidden" name="delete_files[]" value="<?= (int)$_f["id"] ?>" disabled>
|
||||
<button type="button"
|
||||
class="admin-btn-remove fq-remove"
|
||||
onclick="this.previousElementSibling.disabled=false;this.closest('li').style.opacity='0.4';this.disabled=true;"
|
||||
aria-label="Supprimer <?= htmlspecialchars($_f["file_name"] ?? basename($_f["file_path"])) ?>">✕</button>
|
||||
class="btn btn--danger btn--sm"
|
||||
onclick="this.previousElementSibling.previousElementSibling.disabled=false;this.closest('li').style.opacity='0.4';this.disabled=true;">Supprimer</button>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* HTMX fragment: renders the licence section with conditional required states.
|
||||
* HTMX fragment (partage): renders the licence section with conditional options.
|
||||
*
|
||||
* POST: access_type_id, license_id, license_custom, cc2r, admin_mode
|
||||
* POST: access_type_id, license_id, license_custom, cc2r, want_license, admin_mode
|
||||
*
|
||||
* When access_type_id=1 (Libre): licence fields are required.
|
||||
* When access_type_id=2|3 (Interne/Interdit): licence fields are optional.
|
||||
* Libre (1): CC2r checkbox + licence select/custom (au moins une des deux)
|
||||
* Interne (2): opt-in "Je souhaite appliquer une licence" → CC2r + licence
|
||||
* Interdit (3): no licence options
|
||||
*/
|
||||
require_once __DIR__ . '/../../bootstrap.php';
|
||||
|
||||
$accessTypeId = $_POST['access_type_id'] ?? '2';
|
||||
$licenseId = $_POST['license_id'] ?? '';
|
||||
$accessTypeId = $_POST['access_type_id'] ?? '';
|
||||
$licenseId = $_POST['license_id'] ?? '';
|
||||
$licenseCustom = $_POST['license_custom'] ?? '';
|
||||
$cc2r = !empty($_POST['cc2r']);
|
||||
$adminMode = ($_POST['admin_mode'] ?? '0') === '1';
|
||||
|
||||
$required = !$adminMode && $accessTypeId === '1';
|
||||
$cc2r = !empty($_POST['cc2r']);
|
||||
$wantLicense = !empty($_POST['want_license']);
|
||||
$adminMode = ($_POST['admin_mode'] ?? '0') === '1';
|
||||
|
||||
require_once APP_ROOT . '/src/Database.php';
|
||||
$db = Database::getInstance();
|
||||
@@ -23,25 +23,86 @@ $licenseTypes = $db->getAllLicenseTypes();
|
||||
?>
|
||||
|
||||
<div class="licence-license-choice">
|
||||
<?php if ($accessTypeId === '1'): ?>
|
||||
<fieldset class="licence-options-fieldset">
|
||||
<legend>Options de licence</legend>
|
||||
<p class="licence-note">J'autorise que mon TFE soit disponible en libre accès. Je suis conscient·e des responsabilités légales.</p>
|
||||
|
||||
<div class="admin-form-group">
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="cc2r" value="1"
|
||||
<?= $cc2r ? 'checked' : '' ?>>
|
||||
J'accepte les conditions collectives de réutilisation (CC2r)
|
||||
</label>
|
||||
<small><a href="https://cc2r.net/" target="_blank" rel="noopener">En savoir plus sur la CC2r ↗</a></small>
|
||||
</div>
|
||||
|
||||
<div class="licence-or-separator"><span>et / ou</span></div>
|
||||
|
||||
<?php
|
||||
$name = 'license_id'; $label = 'Licence :'; $options = $licenseTypes;
|
||||
$selected = $licenseId; $placeholder = '— Sélectionner —';
|
||||
$selected = $licenseId; $placeholder = '— Sélectionner —'; $required = false;
|
||||
include APP_ROOT . '/templates/partials/form/select-field.php';
|
||||
?>
|
||||
|
||||
<?php
|
||||
$name = 'license_custom'; $label = 'Ou précisez une autre licence :';
|
||||
$value = htmlspecialchars($licenseCustom);
|
||||
$hint = 'Ex: CC BY-NC 4.0, Tous droits réservés...';
|
||||
$hint = 'Ex: CC BY-NC 4.0, Tous droits réservés…';
|
||||
include APP_ROOT . '/templates/partials/form/text-field.php';
|
||||
?>
|
||||
</fieldset>
|
||||
|
||||
<?php elseif ($accessTypeId === '2'): ?>
|
||||
<fieldset class="licence-options-fieldset">
|
||||
<legend>Options de licence</legend>
|
||||
<p class="licence-note">Mon TFE est accessible sur place et sur la plateforme xamxam par la communauté erg. J'autorise une (ré-)utilisation dans un contexte académique au sein de l'erg.</p>
|
||||
|
||||
<div class="admin-form-group">
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="want_license" value="1"
|
||||
hx-post="/partage/licence-fragment"
|
||||
hx-target=".licence-license-choice"
|
||||
hx-swap="outerHTML"
|
||||
hx-include="closest fieldset"
|
||||
<?= $wantLicense ? 'checked' : '' ?>>
|
||||
<strong>Je souhaite appliquer une licence sur mon TFE</strong>
|
||||
</label>
|
||||
<small>Par défaut, aucune licence spécifique n'est appliquée. Cochez pour en choisir une.</small>
|
||||
</div>
|
||||
|
||||
<?php if ($wantLicense): ?>
|
||||
<div class="admin-form-group">
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="cc2r" value="1"
|
||||
<?= $cc2r ? 'checked' : '' ?>>
|
||||
J'accepte les Conditions Collectives de Réutilisation (CC2r)
|
||||
J'accepte les conditions collectives de réutilisation (CC2r)
|
||||
</label>
|
||||
<small><a href="https://cc2r.net/" target="_blank" rel="noopener">En savoir plus sur la CC2r ↗</a></small>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$name = 'license_id'; $label = 'Licence :'; $options = $licenseTypes;
|
||||
$selected = $licenseId; $placeholder = '— Sélectionner —'; $required = false;
|
||||
include APP_ROOT . '/templates/partials/form/select-field.php';
|
||||
?>
|
||||
|
||||
<?php
|
||||
$name = 'license_custom'; $label = 'Ou précisez une autre licence :';
|
||||
$value = htmlspecialchars($licenseCustom);
|
||||
$hint = 'Ex: CC BY-NC 4.0, Tous droits réservés…';
|
||||
include APP_ROOT . '/templates/partials/form/text-field.php';
|
||||
?>
|
||||
|
||||
<p class="licence-note"><em>Je suis conscient·e des obligations légales venant avec la licence choisie et acquiesce avoir lu la documentation prévue à cet effet par l'erg, ainsi qu'avoir discuté des enjeux des licences avec l'équipe pédagogique.</em></p>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
|
||||
<?php elseif ($accessTypeId === '3'): ?>
|
||||
<fieldset class="licence-options-fieldset">
|
||||
<legend>Options de licence</legend>
|
||||
<p class="licence-note">Mon TFE n'est pas disponible en physique ni sur le site. Une note descriptive est visible publiquement.</p>
|
||||
<p class="licence-note"><em>Aucune licence n'est applicable.</em></p>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -1065,6 +1065,32 @@
|
||||
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
+\\\\\\\ to: mrtoqozz a1fbaf50 "server-side upload progress: poll /admin/actions/upload-progress.php via token; progress file written during PeerTube uploads" (rebased revision)
|
||||
++ $linkName = $link['name'] ?? '';
|
||||
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: mrtoqozz a1fbaf50 "server-side upload progress: poll /admin/actions/upload-progress.php via token; progress file written during PeerTube uploads" (rebased revision)
|
||||
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
- $linkName = $link['name'] ?? '';
|
||||
- $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: somsyvxz 14a3cd10 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebase destination)
|
||||
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: pnyrukop 065bd011 "Added details and summary to the license choosing element." (rebased revision)
|
||||
$linkName = $link['name'] ?? '';
|
||||
$linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
$linkLockedYear = $link['locked_year'] ?? null;
|
||||
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
+\\\\\\\ to: pnyrukop 12bfbc93 "Added details and summary to the license choosing element." (rebased revision)
|
||||
++ $linkName = $link['name'] ?? '';
|
||||
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: pnyrukop 12bfbc93 "Added details and summary to the license choosing element." (rebased revision)
|
||||
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
- $linkName = $link['name'] ?? '';
|
||||
- $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: somsyvxz 14a3cd10 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebase destination)
|
||||
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: yupunuzo d7e461fa "refactor licence fragment: Libre→CC2r+licence, Interne→opt-in want_license, Interdit→none" (rebased revision)
|
||||
$linkName = $link['name'] ?? '';
|
||||
$linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
$linkLockedYear = $link['locked_year'] ?? null;
|
||||
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||
+\\\\\\\ to: yupunuzo c830a93c "refactor licence fragment: Libre→CC2r+licence, Interne→opt-in want_license, Interdit→none" (rebased revision)
|
||||
++ $linkName = $link['name'] ?? '';
|
||||
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||
?>
|
||||
<tr class="admin-table-row" onclick="event.stopPropagation(); window.open('/partage/<?= urlencode($link['slug']) ?>', '_blank')" style="cursor:pointer">
|
||||
|
||||
@@ -35,8 +35,9 @@
|
||||
<p><a href="/admin/add.php" class="btn btn--secondary">Retour au formulaire</a></p>
|
||||
|
||||
<?php elseif ($thesis): ?>
|
||||
<!-- ═══════════ Identité ═══════════ -->
|
||||
<section>
|
||||
<h2>Informations de base</h2>
|
||||
<h2>Identité</h2>
|
||||
<dl>
|
||||
<dt>Identifiant</dt><dd><?= htmlspecialchars($thesis['identifier']) ?></dd>
|
||||
<dt>Titre</dt><dd><?= htmlspecialchars($thesis['title']) ?></dd>
|
||||
@@ -44,101 +45,221 @@
|
||||
<dt>Sous-titre</dt><dd><?= htmlspecialchars($thesis['subtitle']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<dt>Auteur·ice(s)</dt><dd><?= htmlspecialchars($thesis['authors']) ?></dd>
|
||||
<dt>Année</dt><dd><?= htmlspecialchars($thesis['year']) ?></dd>
|
||||
<?php if (!empty($thesis['contact_interne'])): ?>
|
||||
<dt>Contact (interne)</dt><dd><?= htmlspecialchars($thesis['contact_interne']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<dt>Contact public</dt><dd><?= !empty($thesis['contact_public']) ? 'Oui' : 'Non' ?></dd>
|
||||
<dt>Année</dt><dd><?= htmlspecialchars((string)$thesis['year']) ?></dd>
|
||||
<dt>Objet</dt><dd><?= htmlspecialchars($thesis['objet'] ?? 'tfe') ?></dd>
|
||||
<?php if ($thesis['is_doctoral']): ?>
|
||||
<dt>Doctoral</dt><dd>Oui</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<!-- ═══════════ Cadre académique ═══════════ -->
|
||||
<section>
|
||||
<h2>Détails académiques</h2>
|
||||
<h2>Cadre académique</h2>
|
||||
<dl>
|
||||
<dt>Orientation</dt><dd><?= htmlspecialchars($thesis['orientation'] ?? '–') ?></dd>
|
||||
<dt>Atelier pratique</dt><dd><?= htmlspecialchars($thesis['ap_program'] ?? '–') ?></dd>
|
||||
<dt>Atelier Pratique</dt><dd><?= htmlspecialchars($thesis['ap_program'] ?? '–') ?></dd>
|
||||
<dt>Finalité</dt><dd><?= htmlspecialchars($thesis['finality_type'] ?? '–') ?></dd>
|
||||
<?php if ($thesis['supervisors']): ?>
|
||||
<dt>Promoteur·ice(s)</dt><dd><?= htmlspecialchars($thesis['supervisors']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($thesis['jury_promoteurs_ulb'])): ?>
|
||||
<dt>Promoteur·ice(s) ULB</dt><dd><?= htmlspecialchars($thesis['jury_promoteurs_ulb']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($thesis['jury_lecteurs_internes'])): ?>
|
||||
<dt>Lecteur·ices (interne)</dt><dd><?= htmlspecialchars($thesis['jury_lecteurs_internes']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($thesis['jury_lecteurs_externes'])): ?>
|
||||
<dt>Lecteur·ices (externe)</dt><dd><?= htmlspecialchars($thesis['jury_lecteurs_externes']) ?></dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<!-- ═══════════ Jury ═══════════ -->
|
||||
<?php
|
||||
$hasJury = $thesis['jury_president']
|
||||
|| $thesis['jury_promoteurs']
|
||||
|| $thesis['jury_promoteurs_ulb']
|
||||
|| $thesis['jury_lecteurs_internes']
|
||||
|| $thesis['jury_lecteurs_externes']
|
||||
|| $thesis['supervisors'];
|
||||
?>
|
||||
<?php if ($hasJury): ?>
|
||||
<section>
|
||||
<h2>Jury</h2>
|
||||
<dl>
|
||||
<?php if ($thesis['jury_president']): ?>
|
||||
<dt>Président·e</dt><dd><?= htmlspecialchars($thesis['jury_president']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($thesis['jury_promoteurs']): ?>
|
||||
<dt>Promoteur·ice(s)</dt><dd><?= htmlspecialchars($thesis['jury_promoteurs']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($thesis['jury_promoteurs_ulb']): ?>
|
||||
<dt>Promoteur·ice(s) ULB</dt><dd><?= htmlspecialchars($thesis['jury_promoteurs_ulb']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($thesis['jury_lecteurs_internes']): ?>
|
||||
<dt>Lecteur·ice(s) interne</dt><dd><?= htmlspecialchars($thesis['jury_lecteurs_internes']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($thesis['jury_lecteurs_externes']): ?>
|
||||
<dt>Lecteur·ice(s) externe</dt><dd><?= htmlspecialchars($thesis['jury_lecteurs_externes']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($thesis['supervisors'] && !$thesis['jury_promoteurs']): ?>
|
||||
<dt>Promoteur·ice(s)</dt><dd><?= htmlspecialchars($thesis['supervisors']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($thesis['jury_points'] !== null): ?>
|
||||
<dt>Note du jury</dt><dd><?= htmlspecialchars($thesis['jury_points']) ?>/20</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ═══════════ Contenu ═══════════ -->
|
||||
<section>
|
||||
<h2>Contenu</h2>
|
||||
<dl>
|
||||
<dt>Synopsis</dt>
|
||||
<dd class="recap-synopsis"><?= nl2br(htmlspecialchars($thesis['synopsis'] ?? '–')) ?></dd>
|
||||
|
||||
<?php if ($thesis['context_note']): ?>
|
||||
<dt>Note contextuelle</dt>
|
||||
<dd class="recap-long-text"><?= nl2br(htmlspecialchars($thesis['context_note'])) ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($thesis['languages']): ?>
|
||||
<dt>Langue(s)</dt><dd><?= htmlspecialchars($thesis['languages']) ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($thesis['formats']): ?>
|
||||
<dt>Format(s)</dt><dd><?= htmlspecialchars($thesis['formats']) ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($thesis['keywords']): ?>
|
||||
<dt>Mots-clés</dt><dd><?= htmlspecialchars($thesis['keywords']) ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($thesis['baiu_link']): ?>
|
||||
<dt>Lien</dt><dd><a href="<?= htmlspecialchars($thesis['baiu_link']) ?>" target="_blank" rel="noopener"><?= htmlspecialchars($thesis['baiu_link']) ?></a></dd>
|
||||
<dt>Lien BAIU</dt><dd><a href="<?= htmlspecialchars($thesis['baiu_link']) ?>" target="_blank" rel="noopener"><?= htmlspecialchars($thesis['baiu_link']) ?></a></dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<!-- ═══════════ Accès et licence ═══════════ -->
|
||||
<section>
|
||||
<h2>Accès et licence</h2>
|
||||
<dl>
|
||||
<dt>Degré d'ouverture</dt><dd><?= htmlspecialchars($thesis['access_type'] ?? '–') ?></dd>
|
||||
|
||||
<?php if ($thesis['license_type']): ?>
|
||||
<dt>Licence</dt><dd><?= htmlspecialchars($thesis['license_type']) ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($thesis['license_custom']): ?>
|
||||
<dt>Licence personnalisée</dt><dd><?= htmlspecialchars($thesis['license_custom']) ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<dt>CC2r</dt><dd><?= !empty($thesis['cc2r']) ? 'Acceptée' : 'Non' ?></dd>
|
||||
|
||||
<dt>Exemplaire BAIU</dt><dd><?= !empty($thesis['exemplaire_baiu']) ? 'Oui' : 'Non' ?></dd>
|
||||
<dt>Exemplaire ERG</dt><dd><?= !empty($thesis['exemplaire_erg']) ? 'Oui' : 'Non' ?></dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<!-- ═══════════ Dates et publication ═══════════ -->
|
||||
<section>
|
||||
<h2>Dates et publication</h2>
|
||||
<dl>
|
||||
<?php if ($thesis['submitted_at']): ?>
|
||||
<dt>Soumis le</dt><dd><?= date('d/m/Y à H:i', strtotime($thesis['submitted_at'])) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($thesis['defense_date']): ?>
|
||||
<dt>Date de défense</dt><dd><?= date('d/m/Y', strtotime($thesis['defense_date'])) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($thesis['published_at']): ?>
|
||||
<dt>Publié le</dt><dd><?= date('d/m/Y à H:i', strtotime($thesis['published_at'])) ?></dd>
|
||||
<?php endif; ?>
|
||||
<dt>Publié</dt><dd><?= !empty($thesis['is_published']) ? 'Oui' : 'Non' ?></dd>
|
||||
<?php if ($thesis['jury_note_added']): ?>
|
||||
<dt>Note du jury ajoutée</dt><dd><?= date('d/m/Y', strtotime($thesis['jury_note_added'])) ?></dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<!-- ═══════════ Remarques ═══════════ -->
|
||||
<?php if (!empty($thesis['remarks'])): ?>
|
||||
<section>
|
||||
<h2>Remarques</h2>
|
||||
<p class="recap-long-text"><?= nl2br(htmlspecialchars($thesis['remarks'])) ?></p>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ═══════════ Fichiers ═══════════ -->
|
||||
<?php if (!empty($files)): ?>
|
||||
<section>
|
||||
<h2>Fichiers</h2>
|
||||
<ul class="recap-file-list">
|
||||
<h2>Fichiers (<?= count($files) ?>)</h2>
|
||||
<ul class="recap-files-list" role="list">
|
||||
<?php foreach ($files as $f): ?>
|
||||
<?php
|
||||
$mime = $f['mime_type'] ?? '';
|
||||
$isImage = str_starts_with($mime, 'image/');
|
||||
$filePath = $f['file_path'] ?? '';
|
||||
$fileName = htmlspecialchars($f['file_name'] ?? basename($filePath));
|
||||
$fileType = htmlspecialchars($f['file_type']);
|
||||
$displayLabel = $f['display_label'] ?? $f['description'] ?? '';
|
||||
$isImage = str_starts_with($mime, 'image/');
|
||||
$isPeerTube = str_starts_with($filePath, 'peertube_ids:');
|
||||
$isExternal = str_starts_with($filePath, 'http://') || str_starts_with($filePath, 'https://');
|
||||
|
||||
if ($isPeerTube) {
|
||||
$_ptUuid = substr($filePath, strlen('peertube_ids:'));
|
||||
require_once APP_ROOT . '/src/PeerTubeService.php';
|
||||
$_ptDb = new Database();
|
||||
$_ptS = PeerTubeService::getSettings($_ptDb);
|
||||
// Only link to watch page for public (1) and unlisted (2) videos
|
||||
if ((int)$_ptS['privacy'] <= 2) {
|
||||
$mediaUrl = PeerTubeService::getWatchUrl($_ptDb, $_ptUuid);
|
||||
} else {
|
||||
$mediaUrl = '#';
|
||||
}
|
||||
$_ptUuid = substr($filePath, strlen('peertube_ids:'));
|
||||
$_ptS = PeerTubeService::getSettings($_ptDb);
|
||||
$mediaUrl = ((int)$_ptS['privacy'] <= 2)
|
||||
? PeerTubeService::getWatchUrl($_ptDb, $_ptUuid)
|
||||
: '#';
|
||||
} elseif ($isExternal) {
|
||||
$mediaUrl = htmlspecialchars($filePath);
|
||||
} else {
|
||||
$mediaUrl = '/media?path=' . urlencode($filePath);
|
||||
}
|
||||
$fileName = htmlspecialchars($f['file_name'] ?? basename($filePath));
|
||||
$fileType = htmlspecialchars($f['file_type']);
|
||||
|
||||
$typeIcon = match (true) {
|
||||
$isPeerTube && $fileType === 'video' => '🎬',
|
||||
$isPeerTube && $fileType === 'audio' => '🔊',
|
||||
$fileType === 'cover' => '🖼️',
|
||||
$fileType === 'note_intention' => '📝',
|
||||
$fileType === 'main' || ($mime === 'application/pdf') => '📄',
|
||||
$fileType === 'video' || str_starts_with($mime, 'video/') => '🎬',
|
||||
$fileType === 'audio' || str_starts_with($mime, 'audio/') => '🔊',
|
||||
$isImage => '🖼️',
|
||||
$fileType === 'caption' => '💬',
|
||||
$fileType === 'annex' => '📎',
|
||||
$fileType === 'website' => '🌐',
|
||||
default => '📎',
|
||||
};
|
||||
?>
|
||||
<li class="recap-file-item">
|
||||
<?php if ($isImage): ?>
|
||||
<a href="<?= $mediaUrl ?>" target="_blank" rel="noopener" class="recap-file-thumb-link">
|
||||
<li class="recap-files-list-item">
|
||||
<figure class="recap-file-figure">
|
||||
<?php if ($isImage && !$isPeerTube): ?>
|
||||
<img src="<?= $mediaUrl ?>" alt="<?= $fileName ?>" class="recap-file-thumb" loading="lazy">
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<span class="recap-file-icon">
|
||||
<?php
|
||||
if ($isPeerTube && $f['file_type'] === 'video') echo '🎬';
|
||||
elseif ($isPeerTube && $f['file_type'] === 'audio') echo '🎵';
|
||||
elseif ($mime === 'application/pdf') echo '📄';
|
||||
elseif (str_starts_with($mime, 'video/')) echo '🎬';
|
||||
elseif (str_starts_with($mime, 'audio/')) echo '🎵';
|
||||
elseif (in_array($mime, ['application/zip','application/x-zip-compressed'])) echo '🗜️';
|
||||
elseif (str_ends_with($f['file_name'] ?? '', '.vtt')) echo '💬';
|
||||
else echo '📎';
|
||||
?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<div class="recap-file-meta">
|
||||
<a href="<?= $mediaUrl ?>" target="_blank" rel="noopener" class="recap-file-name"><?= $fileName ?></a>
|
||||
<span class="recap-file-type-badge"><?= $fileType ?></span>
|
||||
<span class="recap-file-size"><?= formatFileSize($f['file_size']) ?></span>
|
||||
<span class="recap-file-date"><?= date('d/m/Y H:i', strtotime($f['uploaded_at'])) ?></span>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<span class="recap-file-icon"><?= $typeIcon ?></span>
|
||||
<?php endif; ?>
|
||||
<figcaption class="recap-file-caption">
|
||||
<div class="recap-file-name-row">
|
||||
<?php if ($isPeerTube && $mediaUrl !== '#'): ?>
|
||||
<a href="<?= $mediaUrl ?>" target="_blank" rel="noopener" class="recap-file-name"><?= $fileName ?></a>
|
||||
<?php elseif ($isExternal): ?>
|
||||
<a href="<?= $mediaUrl ?>" target="_blank" rel="noopener" class="recap-file-name"><?= $fileName ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?= $mediaUrl ?>" target="_blank" rel="noopener" class="recap-file-name"><?= $fileName ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($isPeerTube): ?>
|
||||
<div class="recap-file-peertube-meta">
|
||||
<span class="recap-file-peertube-id">ID : <?= htmlspecialchars($_ptUuid) ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($displayLabel): ?>
|
||||
<div class="recap-file-label"><?= htmlspecialchars($displayLabel) ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="recap-file-meta-row">
|
||||
<span class="recap-file-meta"><?= formatFileSize($f['file_size']) ?></span>
|
||||
<span class="recap-file-meta"><?= date('d/m/Y H:i', strtotime($f['uploaded_at'])) ?></span>
|
||||
</div>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
@@ -61,8 +61,15 @@ $adminMode = $adminMode ?? false;
|
||||
hx-swap="outerHTML"
|
||||
hx-include="closest fieldset"
|
||||
<?= (string)$selectedAccess === '1' ? 'checked' : '' ?> <?= $adminMode ? '' : 'required' ?>>
|
||||
<strong>🔓 Libre</strong> — Mon TFE est en libre accès à tout le monde sur la plateforme des TFE ainsi que dans la bibliothèque de l'erg.
|
||||
<strong>🔓 Libre</strong>
|
||||
<br>
|
||||
</label>
|
||||
<details>
|
||||
<summary> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg> Info</summary>
|
||||
<p>
|
||||
Mon TFE est en libre accès à tout le monde sur la plateforme des TFE ainsi que dans la bibliothèque de l’erg. Je suis conscient des responsabilités et obligations légales qui viennent avec une diffusion externe – et acquiesce avoir lu la documentation prévue à cet effet par l'erg, ainsi qu'avoir discuté des enjeux d'une publication avec l'équipe pédagogique. J'accepte de partager mes droits de diffusion avec l'erg, ce uniquement dans le cadre d'une diffusion sur la plateforme xamxam.
|
||||
</p>
|
||||
</details>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -75,8 +82,16 @@ $adminMode = $adminMode ?? false;
|
||||
hx-swap="outerHTML"
|
||||
hx-include="closest fieldset"
|
||||
<?= (string)$selectedAccess === '2' ? 'checked' : '' ?> <?= $adminMode ? '' : 'required' ?>>
|
||||
<strong>🔒 Interne</strong> — Mon TFE n'est accessible que sur place en physique. Une note descriptive est disponible sur le site.
|
||||
<strong>🔒 Interne</strong>
|
||||
</label>
|
||||
<br>
|
||||
<details>
|
||||
<summary> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg> Info</summary>
|
||||
<p>
|
||||
Mon TFE et ma note d'intention ne sont accessibles que sur place en physique ainsi que sur la plateforme xamxam par la communauté erg. Une note descriptive est disponible sur le site à toustes. J’autorise une (ré-)utilisation et diffusion dans un contexte académique et didactique au sein de l'erg.
|
||||
</p>
|
||||
</details>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -89,8 +104,16 @@ $adminMode = $adminMode ?? false;
|
||||
hx-swap="outerHTML"
|
||||
hx-include="closest fieldset"
|
||||
<?= (string)$selectedAccess === '3' ? 'checked' : '' ?> <?= $adminMode ? '' : 'required' ?>>
|
||||
<strong>🚫 Interdit</strong> — Mon TFE n'est pas disponible en physique ni sur le site. Une note descriptive est disponible sur le site.
|
||||
<strong>🚫 Interdit</strong>
|
||||
|
||||
</label>
|
||||
<br>
|
||||
<details>
|
||||
<summary> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg> Info</summary>
|
||||
<p>
|
||||
Mon TFE est en libre accès à tout le monde sur la plateforme des TFE ainsi que dans la bibliothèque de l’erg. Je suis conscient des responsabilités et obligations légales qui viennent avec une diffusion externe – et acquiesce avoir lu la documentation prévue à cet effet par l'erg, ainsi qu'avoir discuté des enjeux d'une publication avec l'équipe pédagogique. J'accepte de partager mes droits de diffusion avec l'erg, ce uniquement dans le cadre d'une diffusion sur la plateforme xamxam.
|
||||
</p>
|
||||
</details>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<p class="licence-note"><em>L'auteur·ice peut, à tout moment, décider de restreindre son propre choix. Iel ne peut par contre pas l'ouvrir.</em></p>
|
||||
|
||||
Reference in New Issue
Block a user