FrankProjects/UltimateWarfare

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

Summary

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

{% block title %}Ultimate Warfare - Select World{% endblock title %}

{% block content %}
    <table class="table text-center">
        <tr class="tabletop">
            <td colspan="2"><b>Select your World</b></td>
        </tr>
        {% for world in worlds %}
            <tr>
                <td width="400">
                    <b>{{ world.name }}</b><br />
                    <img src="{{ asset('images/world/' ~ world.image) }}" alt="{{ world.name }}">
                </td>
                <td width="300">
                    <b>Max players:</b> {{ world.maxplayers }}<br /><br />
                    <b>Info:</b><br />
                    {{ world.description }}<br /><br />
                    <b>At start:</b><br />
                    Cash: {{ world.resources.cash }}<br />
                    Wood: {{ world.resources.wood }}<br />
                    Steel: {{ world.resources.steel }}<br />
                    Food: {{ world.resources.food }}<br /><br />
                    <a class="btn btn-primary" href="{{ path('Game/SelectName', {'worldId': world.id}) }}"><b>Play this World</b></a>
                </td>
            </tr>
        {% else %}
            <tr>
                <td colspan="2">
                    <div>
                        No active worlds to join. Create a new game world!
                    </div>
                    <div>
                        <a class="btn btn-primary" href="{{ path('Game/World/Create') }}"><b>Create new world</b></a>
                    </div>
                </td>
            </tr>
        {% endfor %}
    </table>
{% endblock %}