You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.5 KiB
49 lines
1.5 KiB
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Pokemon index{% endblock %}
|
|
|
|
{% block body %}
|
|
<h1>Pokemon index</h1>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Numero</th>
|
|
<th>Nom</th>
|
|
<th>Type 1</th>
|
|
<th>Type 2</th>
|
|
<th>Generation</th>
|
|
<th>Vie</th>
|
|
<th>Attaque</th>
|
|
<th>Defense</th>
|
|
<th>Legendaire</th>
|
|
<th>actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for pokemon in pokemon %}
|
|
<tr>
|
|
<td>{{ pokemon.numero }}</td>
|
|
<td>{{ pokemon.nom }}</td>
|
|
<td>{{ pokemon.type1.name }}</td>
|
|
<td>{% if pokemon.type2 %} {{ pokemon.type2.name }} {% endif %}</td>
|
|
<td>{{ pokemon.generation.name }}</td>
|
|
<td>{{ pokemon.vie }}</td>
|
|
<td>{{ pokemon.attaque }}</td>
|
|
<td>{{ pokemon.defense }}</td>
|
|
<td>{{ pokemon.legendaire ? 'Yes' : 'No' }}</td>
|
|
<td>
|
|
<a href="{{ path('pokemon_show', {'id': pokemon.id}) }}">show</a>
|
|
<a href="{{ path('pokemon_edit', {'id': pokemon.id}) }}">edit</a>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="8">no records found</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<a href="{{ path('pokemon_new') }}">Create new</a>
|
|
{% endblock %}
|
|
|