{% extends 'base.html.twig' %} {% block title %}Page {{ game.title }}{% endblock %} {% block meta_description %} Détail du jeu {{ game.title }} {% endblock %} {% block body %}
{{ game.title }}
bearded dwarf forging a sword above "SquadForge" title SQUADFORGE

{{ game.title }}

{# Show menu Burger (mobile) #}
{# HeaderSouligne + Bandeau avertissement muted #} {% if app.user and app.user.muted and time_diff_future(app.user.endDateStatus) != false %}
Vous êtes actuellement réduit au silence ( fin dans {{ time_diff_future(app.user.endDateStatus) }} )
{% else %}
{% endif %}
{# Fil d'Ariane #}
{# Bandeau gauche: Clip path avec infos #}

Infos

{# GameId et GameColor pour fav asynch (plutot que dans controller ?) #} {# Infos #}
Éditeur: {{ game.editor }} {{ game.publishDate|date('Y') }} Genre: {{ gameGenre }}
{# Form Notation (Ajax) #}
{% if nbrOfNotations > 1 %} Moy: {{ averageRating }}/5 ({{ nbrOfNotations }} votes) {% else %} Moy: {{ averageRating }}/5 ({{ nbrOfNotations }} vote) {% endif %}
{# BackgroundImage et fav ici? #}
{# Titre absolute #}

{{ game.title }}

{# Bouton Favoris state (Btn toggle Async) #}
{% if app.user %} {% if isFavorited %}
{% else %}
{% endif %} {% else %} {% endif %} {# Adaptation de la couleur du load Spinner #}
{# Notation Game async #} {# Section Groupe #}

Teams

{# Ligne "Topics" + Bouton "+Créer" #}

Topics {#  ({{ gameTopicsCount }}) #}

{% if app.user %}  Créer {% else %}  Créer {% endif %}
{# Form d'ajout caché Topic, proc JS bouton #}
{{ form_start(formAddTopic, {'attr': {'id': 'form_add_topic'}}) }}
{{ form_errors(formAddTopic) }}
{{ form_label(formAddTopic.title, 'Titre')}}

(au moins 5 mots)

{{ form_widget(formAddTopic.title) }}
{{ form_label(formAddTopic.firstMsg, 'Introduction')}} {{ form_widget(formAddTopic.firstMsg) }}
{{ form_widget(formAddTopic.submit, { 'label': 'Publier' }) }}
{# A voir: CSRF protection #} {{ form_widget(formAddTopic._token) }} {{ form_end(formAddTopic) }} {# Spinning loader #}
{# Script vérif Topic Front 5 mots minimum #} {# Liste des Topics #} {% if gameTopics|length > 0 %} {% else %}

Aucun topic pour le moment

{% endif %}
{# Section Média #}

Medias {#  ({{ gameMediasCount }}) #}

{% if app.user %}  Créer {% else %}  Créer {% endif %}
{# Form d'ajout caché Media, proc JS bouton #}
{{ form_start(formAddMedia, {'attr': {'id': 'form_add_media'}}) }}
{{ form_errors(formAddMedia) }}
{{ form_label(formAddMedia.title, 'Titre')}}

(au moins 5 mots)

{{ form_widget(formAddMedia.title) }}
{{ form_label(formAddMedia.url, 'Choisissez un fichier')}}(.png .jpg .gif .jpeg) (5MB) {{ form_widget(formAddMedia.url) }}
{# Apercu du média à publier #}
{# Contenyu ajouté JS #}
{# Spinning loader #}
{{ form_widget(formAddMedia.submit, { 'label': 'Publier' }) }}
{{ form_widget(formAddMedia._token) }} {{ form_end(formAddMedia) }}
{# Script aperçu media upload #} {% if gameMedias|length > 0 %}
{% for media in gameMedias %}
{% if app.user and app.user.autoPlayGifs %} {% endif %}
{% if app.user and not app.user.autoPlayGifs %} {% elseif app.user is null %} {% endif %}
logo du jeu {{ media.game.title }}
{{ media.title|capitalize }} {# Sticker NEW #} {% if app.user and media.publishDate > app.user.previousCo %} new {% endif %}
{% if app.user and not app.user.autoPlayGifs %}
{% elseif app.user is null %} {% endif %} {# Gif autoplay=false si paramètre user #} {% if app.user %} {% if not app.user.autoPlayGifs %} media publié {% else %} media {% endif %} {% else %} media {% endif %}
{% if app.user and app.user.autoPlayGifs %} {% endif %} {# Upvote/downvote média + score + nbrPosts #}
{# Pas opti: bloucle sur tous les likes du post pour savoir si liké (boucle dans boucle) #} {% set liked = "" %} {% if app.user %} {% for upvote in media.UserUpvote %} {% if upvote == app.user %} {% set liked = "upBtnLiked" %} {% endif %} {% endfor %} {% endif %}
{{ media.upvoteCount }}
{% if media.mediaPostsCount == 0 %}
{{ media.mediaPostsCount }}
{% else %}
{{ media.mediaPostsCount }}
{% endif %}
{% endfor %}
Tout voir {% else %}

Aucun média pour le moment

{% endif %} {# Masonry JS Medias (permet de rendre responsive entre autre) #} {# imagesLoaded JS #}
{# // Adaptation couleur borderBottom HeaderFixed #} {# Script vérif fileExtension et fileSize #} {# (JS) Show/Hide form addTopic/addMedia Btn #} {# Script de Warning titres Topic/Media Front #} {# On censure pas mais proc warning (bloquand backend) #}
{% endblock %}