Amélioration ; ajout de photo de console et ajout de checkbox physique, demat ou ROM
This commit is contained in:
1 parent
df11d023f0
commit
3235bc50c7
22 files changed
+710
-62
No files matched your search
@@ -12,6 +12,11 @@
|
||||
<span class="badge-etat etat-<?php print Helpers::echapper($jeu["etat"]); ?>">
|
||||
<?php print Helpers::echapper(Helpers::libelleEtat($jeu["etat"])); ?>
|
||||
</span>
|
||||
<?php foreach (Helpers::normaliserFormats($jeu["formats"] ?? []) as $format): ?>
|
||||
<span class="badge-format format-<?php print Helpers::echapper($format); ?>">
|
||||
<?php print Helpers::echapper(Helpers::libelleFormat($format)); ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
<?php if (!empty($jeu["dateSortie"])): ?>
|
||||
<span><i class="mdi mdi-calendar"></i> <?php print Helpers::echapper($jeu["dateSortie"]); ?></span>
|
||||
<?php endif; ?>
|
||||
@@ -72,6 +77,21 @@
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>Supports</dt>
|
||||
<dd>
|
||||
<?php $formats = Helpers::normaliserFormats($jeu["formats"] ?? []); ?>
|
||||
<?php if ($formats === []): ?>
|
||||
—
|
||||
<?php else: ?>
|
||||
<?php foreach ($formats as $format): ?>
|
||||
<span class="badge-format format-<?php print Helpers::echapper($format); ?>">
|
||||
<?php print Helpers::echapper(Helpers::libelleFormat($format)); ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>Notes</dt>
|
||||
<dd><?php print nl2br(Helpers::echapper($jeu["notes"] ?: "—")); ?></dd>
|
||||
|
||||
@@ -3,6 +3,7 @@ $estEdition = isset($jeu["id"]);
|
||||
$genresTexte = is_array($jeu["genres"] ?? null)
|
||||
? implode(", ", $jeu["genres"])
|
||||
: (string) ($jeu["genres"] ?? "");
|
||||
$formatsSelectionnes = Helpers::normaliserFormats($jeu["formats"] ?? []);
|
||||
$retourEnrichissement = $action;
|
||||
?>
|
||||
|
||||
@@ -70,6 +71,23 @@ $retourEnrichissement = $action;
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<span class="form-label d-block">Support(s)</span>
|
||||
<div class="format-checks">
|
||||
<?php foreach (Helpers::formatsJeu() as $valeur => $libelle): ?>
|
||||
<label class="format-check">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="formats[]"
|
||||
value="<?php print Helpers::echapper($valeur); ?>"
|
||||
<?php print in_array($valeur, $formatsSelectionnes, true) ? "checked" : ""; ?>
|
||||
>
|
||||
<span><?php print Helpers::echapper($libelle); ?></span>
|
||||
</label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="form-text">Cochez toutes les versions que vous possédez.</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="consoleId">Console</label>
|
||||
<select class="form-select" id="consoleId" name="consoleId" required>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<form method="get" action="/jeux" class="filter-bar">
|
||||
<div class="row g-3 align-items-end">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" for="q">Recherche</label>
|
||||
<input type="search" class="form-control" id="q" name="q" placeholder="Titre, genre, éditeur…" value="<?php print Helpers::echapper($filtres["q"]); ?>">
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-2">
|
||||
<label class="form-label" for="etat">État</label>
|
||||
<select class="form-select" id="etat" name="etat">
|
||||
<option value="">Tous</option>
|
||||
@@ -39,6 +39,17 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label" for="format">Support</label>
|
||||
<select class="form-select" id="format" name="format">
|
||||
<option value="">Tous</option>
|
||||
<?php foreach (Helpers::formatsJeu() as $valeur => $libelle): ?>
|
||||
<option value="<?php print Helpers::echapper($valeur); ?>" <?php print ($filtres["format"] ?? "") === $valeur ? "selected" : ""; ?>>
|
||||
<?php print Helpers::echapper($libelle); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-outline-neon w-100">Filtrer</button>
|
||||
</div>
|
||||
@@ -63,9 +74,16 @@
|
||||
<div class="game-card-body">
|
||||
<h3><?php print Helpers::echapper($jeu["titre"]); ?></h3>
|
||||
<p><?php print Helpers::echapper($console["nom"] ?? "Console inconnue"); ?></p>
|
||||
<span class="badge-etat etat-<?php print Helpers::echapper($jeu["etat"]); ?>">
|
||||
<?php print Helpers::echapper(Helpers::libelleEtat($jeu["etat"])); ?>
|
||||
</span>
|
||||
<div class="game-card-badges">
|
||||
<span class="badge-etat etat-<?php print Helpers::echapper($jeu["etat"]); ?>">
|
||||
<?php print Helpers::echapper(Helpers::libelleEtat($jeu["etat"])); ?>
|
||||
</span>
|
||||
<?php foreach (Helpers::normaliserFormats($jeu["formats"] ?? []) as $format): ?>
|
||||
<span class="badge-format format-<?php print Helpers::echapper($format); ?>">
|
||||
<?php print Helpers::echapper(Helpers::libelleFormat($format)); ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
|
||||