FrankProjects/UltimateWarfare

View on GitHub
templates/game/profile.html.twig

Summary

Maintainability
Test Coverage
{% extends 'game.html.twig' %}

{% block title %}Ultimate Warfare - Profile{% endblock title %}

{% block content %}
    <table class="table text-center">
        <tr class="tabletop">
            <td colspan="2"><b>Player</b></td>
        </tr>
        <tr>
            <td width="150" valign="middle">Name:</td>
            <td width="350">
                <table class="table text-center">
                    <tr>
                        <td style="border:0" valign="middle">{{ profilePlayer.name }}</td>
                        {% if profilePlayer.getUser.hasAvatar %}
                            <td style="border:0" align="right">
                                <img alt="{{ profilePlayer.getUser.username }} Avatar" src="data:image/jpeg;base64,{{ profilePlayer.getUser.avatar|base64_encode(constant('FrankProjects\\UltimateWarfare\\Twig\\Base64EncodeExtension::GET_CONTENT_FROM_STREAM')) }}" />
                            </td>
                        {% endif %}
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td width="150">Join date:</td>
            <td width="350">{{ profilePlayer.timestampJoined|date("Y-m-d H:i:s") }}</td>
        </tr>
        <tr class="tabletop">
            <td colspan="2"><b>Player stats</b></td>
        </tr>
        <tr>
            <td width="150">Regions:</td>
            <td width="350">{{ profilePlayer.worldRegions|length }}</td>
        </tr>
        <tr>
            <td width="150">Networth:</td>
            <td width="350">{{ profilePlayer.networth }}</td>
        </tr>
        {% if profilePlayer.federation is not null %}
            <tr>
                <td width="150">Federation:</td>
                <td width="350">{{ profilePlayer.federation.name }}</td>
            </tr>
        {% endif %}
    </table>

    <br />
    <br />

    <a class="B" href="{{ path('Game/Message/New', {'playerName': profilePlayer.name}) }}">Send message</a>
{% endblock %}