{% 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.name %}{{ server.name }}{% elseif server.info.HostName %}{{ 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 }} {# let's show real connections for players {{ value }} #} {% if key == 'Players' %} {{ server.connections }} {% else %} {{ value }} {% endif %}
{% 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 | format_ago }} {{ online.players }} {{ online.bots }} {{ online.total }}
{% if request.get('sort') == 'online' and request.get('page') > 1 %} {% else %} {% endif %} {% if request.get('sort') != 'online' or request.get('page') ? request.get('page') : 1 < server.pagination.online %} {% else %} {% endif %} {{ 'page' | trans }} {{ request.get('sort') == 'online' and request.get('page') ? request.get('page') : 1 }}/{{ server.pagination.online }}
{% 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') }} {{ 'Joined' | trans }} {{ sort(request, server.crc32server, 'players', 'joined') }} {{ 'Online' | trans }} {{ sort(request, server.crc32server, 'players', 'online') }}
{{ player.frags }} {{ player.name }} {{ player.joined | format_ago }} {{ player.online | format_ago }}
{% if request.get('sort') == 'players' and request.get('page') > 1 %} {% else %} {% endif %} {% if request.get('sort') != 'players' or request.get('page') ? request.get('page') : 1 < server.pagination.players %} {% else %} {% endif %} {{ 'page' | trans }} {{ request.get('sort') == 'players' and request.get('page') ? request.get('page') : 1 }}/{{ server.pagination.players }}
{% endif %}
{% endblock %}