82 lines
3.5 KiB
PHP
82 lines
3.5 KiB
PHP
<section class="detail-hero">
|
|
<div class="detail-cover">
|
|
<img
|
|
src="<?php print Helpers::echapper(Helpers::urlJaquette($jeu["jaquette"] ?? null)); ?>"
|
|
alt="Jaquette de <?php print Helpers::echapper($jeu["titre"]); ?>"
|
|
>
|
|
</div>
|
|
<div class="detail-info">
|
|
<p class="eyebrow"><?php print Helpers::echapper($console["nom"] ?? "Console"); ?></p>
|
|
<h1 class="page-title"><?php print Helpers::echapper($jeu["titre"]); ?></h1>
|
|
<div class="detail-meta">
|
|
<span class="badge-etat etat-<?php print Helpers::echapper($jeu["etat"]); ?>">
|
|
<?php print Helpers::echapper(Helpers::libelleEtat($jeu["etat"])); ?>
|
|
</span>
|
|
<?php if (!empty($jeu["dateSortie"])): ?>
|
|
<span><i class="mdi mdi-calendar"></i> <?php print Helpers::echapper($jeu["dateSortie"]); ?></span>
|
|
<?php endif; ?>
|
|
<?php if (!empty($jeu["sourceEnrichissement"])): ?>
|
|
<span><i class="mdi mdi-database-outline"></i> <?php print Helpers::echapper($jeu["sourceEnrichissement"]); ?></span>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="page-actions mt-3">
|
|
<a href="/jeux/<?php print Helpers::echapper($jeu["id"]); ?>/modifier" class="btn btn-neon">
|
|
<i class="mdi mdi-pencil"></i> Modifier
|
|
</a>
|
|
<?php if (!empty($jaquetteAbsente) && !empty($apiDisponible)): ?>
|
|
<form method="post" action="/jeux/<?php print Helpers::echapper($jeu["id"]); ?>/jaquette">
|
|
<?php print Csrf::champCache(); ?>
|
|
<button type="submit" class="btn btn-outline-neon">
|
|
<i class="mdi mdi-image-search-outline"></i> Récupérer la jaquette
|
|
</button>
|
|
</form>
|
|
<?php endif; ?>
|
|
<form method="post" action="/jeux/<?php print Helpers::echapper($jeu["id"]); ?>/supprimer" onsubmit="return confirm('Supprimer ce jeu ?');">
|
|
<?php print Csrf::champCache(); ?>
|
|
<button type="submit" class="btn btn-outline-danger">
|
|
<i class="mdi mdi-delete-outline"></i> Supprimer
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="detail-grid mt-4">
|
|
<article class="form-panel">
|
|
<h2>Description</h2>
|
|
<?php if (!empty($jeu["description"])): ?>
|
|
<p class="detail-text"><?php print nl2br(Helpers::echapper($jeu["description"])); ?></p>
|
|
<?php else: ?>
|
|
<p class="text-muted">Aucune description.</p>
|
|
<?php endif; ?>
|
|
</article>
|
|
|
|
<aside class="form-panel">
|
|
<h2>Informations</h2>
|
|
<dl class="info-list">
|
|
<div>
|
|
<dt>Développeur</dt>
|
|
<dd><?php print Helpers::echapper($jeu["developpeur"] ?: "—"); ?></dd>
|
|
</div>
|
|
<div>
|
|
<dt>Éditeur</dt>
|
|
<dd><?php print Helpers::echapper($jeu["editeur"] ?: "—"); ?></dd>
|
|
</div>
|
|
<div>
|
|
<dt>Genres</dt>
|
|
<dd>
|
|
<?php if (!empty($jeu["genres"])): ?>
|
|
<?php print Helpers::echapper(implode(", ", $jeu["genres"])); ?>
|
|
<?php else: ?>
|
|
—
|
|
<?php endif; ?>
|
|
</dd>
|
|
</div>
|
|
<div>
|
|
<dt>Notes</dt>
|
|
<dd><?php print nl2br(Helpers::echapper($jeu["notes"] ?: "—")); ?></dd>
|
|
</div>
|
|
</dl>
|
|
</aside>
|
|
</section>
|