{% extends 'base.html.twig' %} {% block title %}{{ player.username }} — Profil joueur — CSI World{% endblock %} {% block stylesheets %} {% endblock %} {% block body %}
{% set totalUnlocked = 0 %} {% set totalCount = 0 %} {% set totalPoints = 0 %} {% for gameId, entries in byGame %} {% for e in entries %} {% set totalCount = totalCount + 1 %} {% if e.unlockedAt %} {% set totalUnlocked = totalUnlocked + 1 %} {% set totalPoints = totalPoints + e.achievement.pointsValue %} {% endif %} {% endfor %} {% endfor %} {% set profileTier = subscriber_tier(player) %}
{% if player.avatar %} {{ player.username }} {% else %}
{% endif %}

{{ player.username }} {% if profileTier %} Abonné {% endif %}

{% if player.playerBadges|length > 0 %}
{% for pb in player.playerBadges %} {{ pb.badge.displayName }} {% endfor %}
{% endif %} Membre depuis {{ player.createdAt|date('d/m/Y') }}
{% if player.description %}

{{ player.description }}

{% endif %}
{{ totalUnlocked }} succès débloqué{{ totalUnlocked != 1 ? 's' }}
{{ totalPoints }} G points de jeu
{% if totalCount > 0 %}
{{ ((totalUnlocked / totalCount) * 100)|round }}% complétion
{% endif %}
{% set gameBanners = { 0: 'CSI_Banner.png', 1: 'CSII_Banner.png', 2: 'CSR_Banner.png', 3: 'Narval_Banner.png' } %} {% set gameLabels = {0: 'CSI Forever', 1: 'CSII Forever', 2: 'CSI Rogue', 3: 'Narval Souls'} %} {% if byGame is empty %}

Aucun succès disponible pour le moment.

{% else %} {% for gameId, entries in byGame %}
{% if gameBanners[gameId] is defined %} {{ gameLabels[gameId] ?? ('Jeu ' ~ gameId) }} {% else %} {{ gameLabels[gameId] ?? ('Jeu ' ~ gameId) }} {% endif %}
{% for e in entries %}
{% if e.achievement.icon %} {% endif %}
{{ e.achievement.name }}
{% if e.achievement.description %}
{{ e.achievement.description }}
{% endif %} {% if e.unlockedAt %}
{{ e.unlockedAt|date('d/m/Y à H:i') }}
{% endif %}
{% endfor %}
{% endfor %} {% endif %}
{% endblock %}