{% extends 'base.html.twig' %}
{%block facebook%}
<meta property="og:type" content="website">
<meta property="og:url" content="https://bridgefestival.fr">
<meta property="og:title" content="{{bfedition.festival.name}} - {{bfedition.name}}">
<meta property="og:description" content="Bridge Festival - Le guide des tournois et festivals de bridge">
{%if bfedition.festival.description.image1 != null%}
<meta property="og:image" content="{{ absolute_url(vich_uploader_asset(bfedition.festival.description, 'image1File')) }}">
{%else%}
<meta property="og:image" content="{{ absolute_url(asset('assets/img/cards-3662554_1920.jpg')) }}">
{%endif%}
{%endblock%}
{%block twitter %}
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://bridgefestival.fr">
<meta property="twitter:title" content="{{bfedition.festival.name}} - {{bfedition.name}}">
<meta property="twitter:description" content="Bridge Festival - Le guide des tournois et festivals de bridge">
{%if bfedition.festival.description.image1 != null%}
<meta property="twitter:image" content="{{ absolute_url(vich_uploader_asset(bfedition.festival.description, 'image1File')) }}">
{%else%}
<meta property="twitter:image" content="{{ absolute_url(asset('assets/img/cards-3662554_1920.jpg')) }}">
{%endif%}
{%endblock%}
{% block title %}- {{bfedition.festival.name}}: {{bfedition.name}} {% endblock %}
{% block headersection %}
{%if bfedition.festival.description.image1 != null%}
<section class="section section-header section-image bg-primary overlay-primary text-white overflow-hidden pb-6 covernorepeat" data-background="{{ vich_uploader_asset(bfedition.festival.description, 'image1File') }}">
{%else%}
<section class="section section-header section-image bg-primary overlay-primary text-white overflow-hidden pb-6 covernorepeat" data-background="{{ asset('assets/img/cards-3662554_1920.jpg') }}">
{%endif%}
<div class="container">
<div class="row justify-content-center">
<div class="col-12 text-center pt-3">
<nav aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-transparent justify-content-center mb-4">
<li class="breadcrumb-item"><a href="{{ path('home', {}, relative = false) }}">Accueil</a></li>
<li class="breadcrumb-item active"> <a href="{{ path('home_route', {'routename':'search'}, relative = false) }}">Festivals</a></li>
</ol>
</nav>
<!-- Heading -->
<h1 class="display-2">
{{bfedition.festival.name}}
</h1>
<h5>
{%if bfedition.description.website != null and is_granted('option_website', bfedition)%}
<a href="{{bfedition.description.website}}" target="_blank" class="font-weight-bold primary mb-0 mr-1">
<i class="fas fa-globe mr-2"></i>{{bfedition.description.website}}
</a>
{%endif%}
</h5>
<!-- Text -->
<p class="lead text-muted mt-4">
{{bfedition.festival.description.longdescription|nl2br}}
</p>
{{form(formsubscription)}}
</div>
</div>
</div>
</section>
{%endblock%}
{%block body%}
<main>
<div class="section pt-5 pt-lg-6">
<div class="container">
{{ include('flashmessages/flashmessages.html.twig') }}
</div>
<div class="container">
<div class="row">
<div class="col">
<div class="tab-content mb-3">
<div class="card" aria-labelledby="nav-about-tab">
<h2 class="font-weight-normal">{{bfedition.festival.name}} - {{bfedition.name}}
</h2>
<div class="d-block d-md-flex">
{%if bfedition.haschallengeeditionsactive==true %}
{% for bfchallengeedition in bfedition.challengeeditionsactive %}
<a href="{{ path('challenge_view', {'idedition':bfchallengeedition.id}, relative = false) }}">
<span class="badge badge-primary mr-2" style="background-color:{{bfchallengeedition.description.labelcolor}}">
<span class="font-weight-normal font-xs">{{bfchallengeedition.description.labeltext}}</span>
</span>
</a>
{%endfor%}
{%endif%}
</div>
<div class="d-block d-md-flex">
<span class="lh-120 ml-md-2 mt-2 mb-2"><i class="far fa-calendar-alt mr-1 pr-1"></i>{{bfedition.startdate|date("d/m/Y")}} - {{bfedition.enddate|date("d/m/Y")}}</span>
</div>
<div class="d-block d-md-flex">
<span class="lh-120 ml-md-2"><i class="fas fa-map-marker-alt mr-1 pr-1"></i>{{bfedition.location}}</span>
</div>
{%if is_granted('option_inscription', bfedition)%}
<nav class="row mt-4">
<div class="nav col nav-tabs flex-column flex-md-row border-light mb-3" id="nav-tab" role="tablist">
<a class="nav-item nav-link active grey" id="nav-about-tab" data-toggle="tab" href="#nav-about" role="tab" aria-controls="nav-about" aria-selected="true"><i class="far fa-address-card mr-2"></i>A propos</a>
<a class="nav-item nav-link greay" id="nav-video-tab" data-toggle="tab" href="#nav-video" role="tab" aria-controls="nav-video" aria-selected="false"><i class="fas fa-signature mr-2"></i>Inscriptions</a>
</div>
</nav>
<div class="tab-content mb-3" id="nav-tabContent">
<div class="tab-pane fade show active " id="nav-about" role="tabpanel" aria-labelledby="nav-about-tab">
{%include('editions/editionabout.html.twig')%}
</div>
<div class="tab-pane fade" id="nav-video" role="tabpanel" aria-labelledby="nav-video-tab">
{%include('editions/editioninscription.html.twig')%}
</div>
</div>
{%else%}
{%include('editions/editionabout.html.twig')%}
{%endif%}
</div>
</div>
</div>
<aside class="col-12 col-lg-4">
{%if is_granted('canpay', bfedition.festival) and is_granted('option_payment', bfedition.festival) %}
{{ render(controller('App\\Controller\\BFProductEditionController::ShowBFProductEditionForEditionDetail', {idedition:bfedition.id} )) }}
{%endif%}
<div class="card border-light p-3">
<h5 class="font-weight-normal mb-3">Demande d'informations</h5>
{{form(formaskmail)}}
</div>
<div class="card border-light mt-4 p-3">
<h5 class="font-weight-normal">Contact</h5>
<div class="my-3">
{%if bfedition.description.displayedcontactnumber != null %}
<div><i class="fas fa-phone mr-2"></i>{{bfedition.description.displayedcontactnumber}} </div>
{%endif%}
{%if bfedition.description.displayedcontactmail != null %}
<div>
<i class="fas fa-envelope mr-2"></i>{{bfedition.description.displayedcontactmail}}
</div>
{%endif%}
</div>
</div>
</aside>
</div>
</div>
</div>
</main>
<!-- Recaptcha -->
<script src="https://www.google.com/recaptcha/api.js?render=6Le2aesUAAAAAG4fDNIF_lqShoh6-PvS2lHexW2K"></script>
<script src="{{ asset('/assets/js/recaptcha.js') }}"></script>
{%endblock%}