templates/game/regionList.html.twig
{% extends 'game.html.twig' %}
{% block title %}Ultimate Warfare - Region List{% endblock title %}
{% block content %}
<table class="table text-center">
<tr class="tabletop">
<td colspan="3"><b>Regions</b></td>
</tr>
{% for regionData in regionList %}
<tr>
<td width="120">
<img src="{{ asset('images/map/' ~ regionData.region.type ~ '.jpg') }}" alt="Region {{ regionData.region.id }}" width="120" height="100">
</td>
<td class="text-start" width="370">
<ul>
<li>Position: {{ regionData.region.x }}, {{ regionData.region.y }}</li>
<li>Built: {{ regionData.buildings }}
{% if regionData.buildingsInConstruction > 0 %}
( {{ regionData.buildingsInConstruction }} )
{% endif %}
/ {{ regionData.region.space }}
</li>
<li>Population: {{ regionData.region.population }} / {{ regionData.region.population * 500 }}
<li>Click <a class="B" href="{{ path('Game/World/Region', {'regionId': regionData.region.id}) }}">here</a> to go to this region.</li>
<li>Quick Links:
<a class="B" href="{{ path('Game/World/Region/Build', {'regionId': regionData.region.id, 'gameUnitTypeId': 1}) }}">Build</a> -
<a class="B" href="{{ path('Game/World/Region/Build', {'regionId': regionData.region.id, 'gameUnitTypeId': 4}) }}">Build Units</a>
</li>
</ul>
</td>
<td class="text-start" width="210">
{% for unit in regionData.region.worldRegionUnits %}
{{ unit.gameUnit.name }}: {{ unit.amount }}
<br />
{% else %}
No units stationed here!
{% endfor %}
</td>
</tr>
{% else %}
<tr>
<td colspan="3">You have to buy a region on the map first!</td>
</tr>
{% endfor %}
</table>
<br />
<br />
{% endblock %}