<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* auteurs/detail.html.twig */
class __TwigTemplate_3dd1850b50cfcd43e03d6f556a7d9de1 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "auteurs/detail.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "auteurs/detail.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "auteurs/detail.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["auteur"]) || array_key_exists("auteur", $context) ? $context["auteur"] : (function () { throw new RuntimeError('Variable "auteur" does not exist.', 3, $this->source); })()), "nomComplet", [], "any", false, false, false, 3), "html", null, true);
yield " - BDD-Books";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 6
yield "<div class=\"container-fluid px-4\">
<!-- En-tête -->
<div class=\"card mb-4\">
<div class=\"card-header\" style=\"background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\">
<div class=\"d-flex justify-content-between align-items-center\">
<h5 class=\"mb-0 text-white\">
<i class=\"fas fa-user\"></i> ";
// line 12
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["auteur"]) || array_key_exists("auteur", $context) ? $context["auteur"] : (function () { throw new RuntimeError('Variable "auteur" does not exist.', 12, $this->source); })()), "nomComplet", [], "any", false, false, false, 12), "html", null, true);
yield "
</h5>
<a href=\"";
// line 14
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("liste_auteurs");
yield "\" class=\"btn btn-light btn-sm\">
<i class=\"fas fa-arrow-left\"></i> Retour aux auteurs
</a>
</div>
</div>
<div class=\"card-body\">
<div class=\"d-flex align-items-center\">
<div class=\"mr-4\">
<span class=\"badge\" style=\"font-size: 2rem; width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white;\">
";
// line 23
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["auteur"]) || array_key_exists("auteur", $context) ? $context["auteur"] : (function () { throw new RuntimeError('Variable "auteur" does not exist.', 23, $this->source); })()), "initiale", [], "any", false, false, false, 23), "html", null, true);
yield "
</span>
</div>
<div>
<h3 class=\"mb-1\">";
// line 27
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["auteur"]) || array_key_exists("auteur", $context) ? $context["auteur"] : (function () { throw new RuntimeError('Variable "auteur" does not exist.', 27, $this->source); })()), "nomComplet", [], "any", false, false, false, 27), "html", null, true);
yield "</h3>
<p class=\"text-muted mb-0\">
<i class=\"fas fa-book\"></i> ";
// line 29
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["livres"]) || array_key_exists("livres", $context) ? $context["livres"] : (function () { throw new RuntimeError('Variable "livres" does not exist.', 29, $this->source); })())), "html", null, true);
yield " livre(s) dans la bibliothèque
</p>
</div>
</div>
</div>
</div>
<!-- Liste des livres -->
";
// line 37
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["livres"]) || array_key_exists("livres", $context) ? $context["livres"] : (function () { throw new RuntimeError('Variable "livres" does not exist.', 37, $this->source); })())) > 0)) {
// line 38
yield " <!-- Grille de livres (même style que la recherche) -->
<div class=\"row\">
";
// line 40
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["livres"]) || array_key_exists("livres", $context) ? $context["livres"] : (function () { throw new RuntimeError('Variable "livres" does not exist.', 40, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["livre"]) {
// line 41
yield " <div class=\"col-6 col-md-4 col-lg-3 col-xl-2 mb-4\">
<div class=\"card h-100 livre-card shadow-sm\">
<!-- Image -->
<div class=\"livre-cover-wrapper text-center p-2\" style=\"background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);\">
";
// line 45
if (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "id", [], "any", false, false, false, 45), Twig\Extension\CoreExtension::keys((isset($context["images"]) || array_key_exists("images", $context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.', 45, $this->source); })())))) {
// line 46
yield " <img class=\"img-fluid\"
alt=\"";
// line 47
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "titre", [], "any", false, false, false, 47), "html", null, true);
yield "\"
src=\"data:image/png;base64,";
// line 48
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["images"]) || array_key_exists("images", $context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.', 48, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "id", [], "any", false, false, false, 48), [], "array", false, false, false, 48), "html", null, true);
yield "\"
style=\"max-height: 180px; object-fit: contain;\" />
";
} else {
// line 51
yield " <div class=\"d-flex align-items-center justify-content-center\" style=\"height: 180px;\">
<i class=\"fas fa-book fa-4x text-muted\"></i>
</div>
";
}
// line 55
yield " </div>
<!-- Corps de la card -->
<div class=\"card-body p-2\">
<h6 class=\"card-title mb-1\">
<a href=\"";
// line 60
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("livreDetail", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "id", [], "any", false, false, false, 60)]), "html", null, true);
yield "\" class=\"text-dark text-decoration-none livre-titre\">
";
// line 61
yield (((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "titre", [], "any", false, false, false, 61)) > 40)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((Twig\Extension\CoreExtension::slice($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "titre", [], "any", false, false, false, 61), 0, 40) . "..."), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "titre", [], "any", false, false, false, 61), "html", null, true)));
yield "
</a>
</h6>
";
// line 65
if ((CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "tome", [], "any", false, false, false, 65) && (CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "tome", [], "any", false, false, false, 65) > 0))) {
// line 66
yield " <span class=\"badge badge-secondary badge-sm mb-1\">Tome ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "tome", [], "any", false, false, false, 66), "html", null, true);
yield "</span>
";
}
// line 68
yield "
<!-- Éditeur -->
";
// line 70
if (CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "edition", [], "any", false, false, false, 70)) {
// line 71
yield " <p class=\"card-text small text-muted mb-1\">
<i class=\"fas fa-building\"></i> ";
// line 72
yield (((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "edition", [], "any", false, false, false, 72), "nom", [], "any", false, false, false, 72)) > 20)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((Twig\Extension\CoreExtension::slice($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "edition", [], "any", false, false, false, 72), "nom", [], "any", false, false, false, 72), 0, 20) . "..."), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "edition", [], "any", false, false, false, 72), "nom", [], "any", false, false, false, 72), "html", null, true)));
yield "
</p>
";
}
// line 75
yield "
";
// line 76
if (CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "annee", [], "any", false, false, false, 76)) {
// line 77
yield " <p class=\"card-text small text-muted mb-1\">
<i class=\"fas fa-calendar\"></i> ";
// line 78
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "annee", [], "any", false, false, false, 78), "html", null, true);
yield "
</p>
";
}
// line 81
yield " </div>
<!-- Footer -->
<div class=\"card-footer bg-white border-top-0 p-2 pt-0\">
<div class=\"d-flex justify-content-between align-items-center\">
<span class=\"badge badge-primary\">";
// line 86
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "prixBase", [], "any", false, false, false, 86), 2), "html", null, true);
yield " €</span>
<a href=\"";
// line 87
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("livreDetail", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["livre"], "id", [], "any", false, false, false, 87)]), "html", null, true);
yield "\" class=\"btn btn-sm btn-outline-primary\">
<i class=\"fas fa-eye\"></i>
</a>
</div>
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['livre'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 95
yield " </div>
";
} else {
// line 97
yield " <div class=\"alert alert-info\">
<i class=\"fas fa-info-circle\"></i> Aucun livre trouvé pour cet auteur.
</div>
";
}
// line 101
yield "</div>
<style>
.livre-card {
transition: transform 0.2s, box-shadow 0.2s;
border: 1px solid #e9ecef;
}
.livre-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}
.livre-titre:hover {
color: #667eea !important;
}
.livre-cover-wrapper {
border-radius: 0.25rem 0.25rem 0 0;
min-height: 180px;
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "auteurs/detail.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 276 => 101, 270 => 97, 266 => 95, 252 => 87, 248 => 86, 241 => 81, 235 => 78, 232 => 77, 230 => 76, 227 => 75, 221 => 72, 218 => 71, 216 => 70, 212 => 68, 206 => 66, 204 => 65, 197 => 61, 193 => 60, 186 => 55, 180 => 51, 174 => 48, 170 => 47, 167 => 46, 165 => 45, 159 => 41, 155 => 40, 151 => 38, 149 => 37, 138 => 29, 133 => 27, 126 => 23, 114 => 14, 109 => 12, 101 => 6, 88 => 5, 64 => 3, 41 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}{{ auteur.nomComplet }} - BDD-Books{% endblock %}
{% block body %}
<div class=\"container-fluid px-4\">
<!-- En-tête -->
<div class=\"card mb-4\">
<div class=\"card-header\" style=\"background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\">
<div class=\"d-flex justify-content-between align-items-center\">
<h5 class=\"mb-0 text-white\">
<i class=\"fas fa-user\"></i> {{ auteur.nomComplet }}
</h5>
<a href=\"{{ path('liste_auteurs') }}\" class=\"btn btn-light btn-sm\">
<i class=\"fas fa-arrow-left\"></i> Retour aux auteurs
</a>
</div>
</div>
<div class=\"card-body\">
<div class=\"d-flex align-items-center\">
<div class=\"mr-4\">
<span class=\"badge\" style=\"font-size: 2rem; width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white;\">
{{ auteur.initiale }}
</span>
</div>
<div>
<h3 class=\"mb-1\">{{ auteur.nomComplet }}</h3>
<p class=\"text-muted mb-0\">
<i class=\"fas fa-book\"></i> {{ livres|length }} livre(s) dans la bibliothèque
</p>
</div>
</div>
</div>
</div>
<!-- Liste des livres -->
{% if livres|length > 0 %}
<!-- Grille de livres (même style que la recherche) -->
<div class=\"row\">
{% for livre in livres %}
<div class=\"col-6 col-md-4 col-lg-3 col-xl-2 mb-4\">
<div class=\"card h-100 livre-card shadow-sm\">
<!-- Image -->
<div class=\"livre-cover-wrapper text-center p-2\" style=\"background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);\">
{% if livre.id in images|keys %}
<img class=\"img-fluid\"
alt=\"{{ livre.titre }}\"
src=\"data:image/png;base64,{{ images[livre.id] }}\"
style=\"max-height: 180px; object-fit: contain;\" />
{% else %}
<div class=\"d-flex align-items-center justify-content-center\" style=\"height: 180px;\">
<i class=\"fas fa-book fa-4x text-muted\"></i>
</div>
{% endif %}
</div>
<!-- Corps de la card -->
<div class=\"card-body p-2\">
<h6 class=\"card-title mb-1\">
<a href=\"{{ path('livreDetail', {'id': livre.id}) }}\" class=\"text-dark text-decoration-none livre-titre\">
{{ livre.titre|length > 40 ? livre.titre|slice(0, 40) ~ '...' : livre.titre }}
</a>
</h6>
{% if livre.tome and livre.tome > 0 %}
<span class=\"badge badge-secondary badge-sm mb-1\">Tome {{ livre.tome }}</span>
{% endif %}
<!-- Éditeur -->
{% if livre.edition %}
<p class=\"card-text small text-muted mb-1\">
<i class=\"fas fa-building\"></i> {{ livre.edition.nom|length > 20 ? livre.edition.nom|slice(0, 20) ~ '...' : livre.edition.nom }}
</p>
{% endif %}
{% if livre.annee %}
<p class=\"card-text small text-muted mb-1\">
<i class=\"fas fa-calendar\"></i> {{ livre.annee }}
</p>
{% endif %}
</div>
<!-- Footer -->
<div class=\"card-footer bg-white border-top-0 p-2 pt-0\">
<div class=\"d-flex justify-content-between align-items-center\">
<span class=\"badge badge-primary\">{{ livre.prixBase|number_format(2) }} €</span>
<a href=\"{{ path('livreDetail', {'id': livre.id}) }}\" class=\"btn btn-sm btn-outline-primary\">
<i class=\"fas fa-eye\"></i>
</a>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class=\"alert alert-info\">
<i class=\"fas fa-info-circle\"></i> Aucun livre trouvé pour cet auteur.
</div>
{% endif %}
</div>
<style>
.livre-card {
transition: transform 0.2s, box-shadow 0.2s;
border: 1px solid #e9ecef;
}
.livre-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}
.livre-titre:hover {
color: #667eea !important;
}
.livre-cover-wrapper {
border-radius: 0.25rem 0.25rem 0 0;
min-height: 180px;
}
</style>
{% endblock %}
", "auteurs/detail.html.twig", "/home/jla23/project/DEV/Bdd-Books-DEV/templates/auteurs/detail.html.twig");
}
}