myaac/system/templates/team.html.twig
slawkens 6d4724f4f4 Squashed commit of the following:
commit da18629d1652c304a75b684939255a1838989279
Author: slawkens <slawkens@gmail.com>
Date:   Mon Apr 1 21:53:53 2024 +0200

    Fixes to tables headline

commit 41c3d9ad21304e99330ea42841b5932af792db92
Author: slawkens <slawkens@gmail.com>
Date:   Sun Mar 31 13:59:25 2024 +0200

    [WIP] Tables headline
2024-04-01 21:54:53 +02:00

171 lines
4.2 KiB
Twig

{% set title = 'Support in game' %}
{% set content %}
{% set i = 0 %}
{% if setting('core.team_style') == 1 %}
<table border="0" cellpadding="4" cellspacing="1" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
<td width="10%" class="white">
<b>Group</b>
</td>
{% if setting('core.team_outfit') %}
<td width="5%" class="white">
<b>Outfit</b>
</td>
{% endif %}
<td width="40%" class="white">
<b>Name</b>
</td>
{% if setting('core.team_status') %}
<td class="white">
<b>Status</b>
</td>
{% endif %}
{% if (setting('core.multiworld') or setting('core.team_world')) %}
<td class="white">
<b>World</b>
</td>
{% endif %}
{% if setting('core.team_lastlogin') %}
<td class="white">
<b>Last login</b>
</td>
{% endif %}
</tr>
{% for group in groupmember|reverse %}
{% if group.members is not empty %}
{% for member in group.members|reverse %}
{% set i = i + 1 %}
<tr bgcolor="{{ getStyle(i) }}" style="height: 32px;">
<td>{{ group.group_name|capitalize }}</td>
{% if setting('core.team_outfit') %}
<td>
<img style="position: absolute; margin-top: {% if member.player.looktype in setting('core.outfit_images_wrong_looktypes') %}-16px;margin-left:-0px;{% else %} -45px; margin-left: -30px;{% endif %}" src="{{ member.outfit }}" alt="player outfit"/>
</td>
{% endif %}
<td>
{% if setting('core.account_country') %}
{{ member.flag_image|raw }}
{% endif %}
{{ member.link|raw }}
</td>
{% if setting('core.team_status') %}
<td>
{% if member.status %}
<span style="color: green"><b>Online</b></span>
{% else %}
<span style="color: red"><b>Offline</b></span>
{% endif %}
</td>
{% endif %}
{% if (setting('core.multiworld') or setting('core.team_world')) %}
<td>
<span><b>{{ member.world_name }}</b></span>
</td>
{% endif %}
{% if setting('core.team_lastlogin') %}
<td>
<span>{{ member.last_login }}</span>
</td>
{% endif %}
</tr>
{% endfor %}
{% endif %}
{% endfor %}
</table>
{% elseif setting('core.team_style') == 2 %}
{% for group in groupmember|reverse %}
{% if group.members is not empty %}
<div style="text-align:center"><h2>{{ group.group_name|capitalize }}</h2></div>
<table cellspacing="1" cellpadding="4" border="0" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
{% if setting('core.team_outfit') %}
<td width="5%" class="white">
<b>Outfit</b>
</td>
{% endif %}
<td width="40%" class="white">
<b>Name</b>
</td>
{% if setting('core.team_status') %}
<td class="white">
<b>Status</b>
</td>
{% endif %}
{% if (setting('core.multiworld') or setting('core.team_world')) %}
<td class="white">
<b>World</b>
</td>
{% endif %}
{% if setting('core.team_lastlogin') %}
<td class="white">
<b>Last login</b>
</td>
{% endif %}
</tr>
{% for member in group.members %}
{% set i = i + 1 %}
<tr bgcolor="{{ getStyle(i) }}" style="height: 32px;">
{% if setting('core.team_outfit') %}
<td>
<img style="position: absolute; margin-top: {% if member.player.looktype in setting('core.outfit_images_wrong_looktypes') %}-16px;margin-left:-0px;{% else %} -45px; margin-left: -30px;{% endif %}" src="{{ member.outfit }}" alt="player outfit"/>
</td>
{% endif %}
<td>
{% if setting('core.account_country') %}
{{ member.flag_image|raw }}
{% endif %}
{{ member.link|raw }}
</td>
{% if setting('core.team_status') %}
<td>
{% if member.status %}
<span style="color: green"><b>Online</b></span>
{% else %}
<span style="color: red"><b>Offline</b></span>
{% endif %}
</td>
{% endif %}
{% if (setting('core.multiworld') or setting('core.team_world')) %}
<td>
<span><b>{{ member.world_name }}</b></span>
</td>
{% endif %}
{% if setting('core.team_lastlogin') %}
<td>
<span>{{ member.last_login }}</span>
</td>
{% endif %}
</tr>
{% endfor %}
</table>
{% endif %}
{% endfor %}
{% endif %}
{% endset %}
{% include 'tables.headline.html.twig' %}