{% macro sort(request, crc32server, sort, field) %} {% if sort == request.get('sort') and crc32server == request.get('crc32server') %} {% if field == request.get('field') %} {% if 'asc' == request.get('order') %} {% else %} {% endif %} {% else %} {% endif %} {% else %} {% if 'online' == sort and 'time' == field %} {% elseif 'players' == sort and 'frags' == field %} {% else %} {% endif %} {% endif %} {% endmacro %} {% from _self import sort %} {% extends 'default/layout.html.twig' %} {% block head_title_content %}{% if server.info.HostName is defined %}{{ server.info.HostName }}{% else %}#{{ server.crc32server }}{% endif %} - {{ app.name }}{% endblock %} {% block main_content %}

{{ server.address }} {% if server.status %} {% else %} {% endif %}


{% if server.info %}

{{ 'Info' | trans }}

{% for key, value in server.info %} {% endfor %}
{{ key }} {{ value }}
{% endif %} {% if server.session %}

{{ 'Session' | trans }}

{% for player in server.session %} {% endfor %}
{{ 'Player' | trans }} {{ 'Frags' | trans }} {{ 'Time' | trans }}
{{ player.Name }} {{ player.Frags }} {% if player.TimeF == '59:59' %} {% else %} {{ player.TimeF }} {% endif %}
{% endif %} {% if server.online %}

{{ 'Online' | trans }}

{% for online in server.online %} {% endfor %}
{{ 'Time' | trans }} {{ sort(request, server.crc32server, 'online', 'time') }} {{ 'Players' | trans }} {{ sort(request, server.crc32server, 'online', 'players') }} {{ 'Bots' | trans }} {{ sort(request, server.crc32server, 'online', 'bots') }} {{ 'Total' | trans }} {{ sort(request, server.crc32server, 'online', 'total') }}
{{ online.time | date('r') }} {{ online.players }} {{ online.bots }} {{ online.total }}
{% endif %} {% if server.players %}

{{ 'Players' | trans }}

{% for player in server.players %} {% endfor %}
{{ 'Frags' | trans }} {{ sort(request, server.crc32server, 'players', 'frags') }} {{ 'Name' | trans }} {{ sort(request, server.crc32server, 'players', 'name') }} {{ 'Online' | trans }} {{ sort(request, server.crc32server, 'players', 'online') }} {{ 'Joined' | trans }} {{ sort(request, server.crc32server, 'players', 'joined') }}
{{ player.frags }} {{ player.name }} {{ player.online | format_date }} {{ player.joined | format_date }}
{% endif %}
{% endblock %}