42 lines
1.8 KiB
Twig
42 lines
1.8 KiB
Twig
{% extends "base.html.twig" %}
|
|
{% block body %}
|
|
<div class="container">
|
|
<div class="text-center mt-5">
|
|
<form action="/tournament" method="post" style="display: none">
|
|
<fieldset>
|
|
<legend>Create tournament</legend>
|
|
<div class="mb-3">
|
|
<label for="title" class="form-label">Tournament title</label>
|
|
<input type="text" id="title" name="title" class="form-control"
|
|
placeholder="Enter your tournament title">
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Create tournament</button>
|
|
</fieldset>
|
|
</form>
|
|
<div class="text-center mt-5"><a href="/generate" class="btn btn-primary">Generate new prefilled
|
|
tournament</a></div>
|
|
</div>
|
|
<div class="text-center mt-5">
|
|
{% if tournamentCount > 0 %}
|
|
<div>There are {{ tournamentCount }} created tournaments.</div>
|
|
|
|
{% for tournament in tournamentList %}
|
|
<div>
|
|
<a href="{{ path('tournament_get', { tournamentId: tournament.getId() }) }}">{{ tournament.getTitle() }}</a>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if page > 0 %}
|
|
<a href="{{ path('tournament_list_get', { page: page - 1 }) }}">Previous</a>
|
|
{% endif %}
|
|
{% if page + 1 < tournamentCount/tournamentPerPage and tournamentList.count() >= tournamentPerPage %}
|
|
<a href="{{ path('tournament_list_get', { page: page + 1 }) }}">Next</a>
|
|
{% endif %}
|
|
{% else %}
|
|
<div>No tournaments have been created yet.</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|