templates/admin/Competition/list.html.twig line 1

Open in your IDE?
  1. {% extends 'admin/admin_base.html.twig' %}
  2. {% block title %}List competitions{% endblock %}
  3. {% block heading %}List competitions{% endblock %}
  4. {% block admin_body %}
  5.     <table class="table">
  6.         <tr>
  7.             <th>{% trans %}ID{% endtrans %}</th>
  8.             <th>{% trans %}Tournament{% endtrans %}</th>
  9.             <th>{% trans %}Competition{% endtrans %}</th>
  10.             <th>{% trans %}State{% endtrans %}</th>
  11.             <th>{% trans %}Match format{% endtrans %}</th>
  12.             <th>{% trans %}Actions{% endtrans %}</th>
  13.         </tr>
  14.         {% for competition in competition_list %}
  15.             <tr>
  16.                 <td>{{ competition.id }}</td>
  17.                 <td>
  18.                     <a href="{{ path('app_admin_tournament_list') }}"> {# TODO: maybe add view tournament page, not sure for what. #}
  19.                         {{ competition.tournament.name }}
  20.                     </a>
  21.                 </td>
  22.                 <td>{{ competition.name }}</td>
  23.                 <td>{{ competition.state }}</td>
  24.                 <td>
  25.                     {# {% if competition.lastStage is null %} #}
  26.                     {# <a href="{{ path('app_admin_competition_stage_add', {'tournament': competition.tournament.id, 'competition': competition.id}) }}" #}
  27.                     {# class="btn btn-secondary">Add stage</a> #}
  28.                     {# {% else %} #}
  29.                     {# {{ competition.lastStage.type }} #}
  30.                     {# {% endif %} #}
  31.                 </td>
  32.                 <td>
  33.                     {% if competition.tournament.isActive %}
  34.                         <a href="{{ path('app_admin_competition_edit', {'tournament': competition.tournament.id, 'competition': competition.id}) }}"
  35.                            class="btn btn-secondary">{% trans %}Edit{% endtrans %}</a>
  36.                         <a href="{{ path('app_admin_competition_delete', {'tournament': competition.tournament.id, 'competition': competition.id}) }}"
  37.                            class="btn btn-danger">{% trans %}Delete{% endtrans %}</a>
  38.                     {% endif %}
  39.                     <a href="{{ path('app_admin_competition_match_list', {'tournament': competition.tournament.id, 'competition': competition.id}) }}"
  40.                        class="btn btn-primary">{% trans %}View launched matches{% endtrans %}</a>
  41.                     <a href="{{ path('app_admin_team_list', {'tournament': competition.tournament.id, 'competition': competition.id}) }}"
  42.                        class="btn btn-primary">{% trans %}View teams{% endtrans %}</a>
  43.                 </td>
  44.             </tr>
  45.         {% endfor %}
  46.     </table>
  47.     <a href="{{ path('app_admin_competition_add', {'tournament': tournament.id }) }}"
  48.        class="btn btn-primary">{% trans %}Add new competition{% endtrans %}</a>
  49.     <br/>
  50. {% endblock %}