start_sf5_project/app/templates/beer/index.html.twig

48 lines
1.6 KiB
Twig
Raw Permalink Normal View History

2021-02-18 19:13:14 +00:00
{% extends 'base.html.twig' %}
{% block title %}{{'Beer index'}}{% endblock %}
2021-02-18 19:13:14 +00:00
{% block body %}
{# responsive, fixed-width container class #}
<div class="container">
<h1 class="display-1">{{'Beer index'}}</h1>
2021-02-18 19:13:14 +00:00
<table class="table">
<thead class="thead-light">
2021-02-18 19:13:14 +00:00
<tr>
<th scope="col">{{'Id'}}</th>
<th scope="col">{{'Name'}}</th>
<th scope="col">{{'Alcool'}}</th>
<th scope="col">{{'actions'}}</th>
2021-02-18 19:13:14 +00:00
</tr>
</thead>
<tbody>
{% for beer in beers %}
<tr>
<th scope="row">{{ beer.id }}</th>
2021-02-18 19:13:14 +00:00
<td>{{ beer.name }}</td>
<td>{{ beer.alcool|format_percent_number({rounding_mode: 'floor', fraction_digit: 1}) }}</td>
2021-02-18 19:13:14 +00:00
<td>
2021-02-18 22:54:02 +00:00
<a href="{{ path('beer_show', {'id': beer.id}) }}" class="btn btn-secondary" role="button" title="{{'show'}}">
<i class="fa fa-eye fa-fw"></i>
</a>
2021-02-18 22:54:02 +00:00
<a href="{{ path('beer_edit', {'id': beer.id}) }}" class="btn btn-warning" role="button" title="{{'edit'}}">
<i class="fa fa-pencil fa-fw"></i>
</a>
2021-02-18 19:13:14 +00:00
</td>
</tr>
{% else %}
<tr>
<td colspan="4">{{'no records found'}}</td>
2021-02-18 19:13:14 +00:00
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('beer_new') }}" class="btn btn-primary" role="button">
<i class="fa fa-plus fa-fw"></i> {{'Create new'}}
</a>
</div>
2021-02-18 19:13:14 +00:00
{% endblock %}