/
index.html.twig
39 lines (37 loc) · 1.2 KB
/
index.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{% extends 'base.html.twig' %}
{% use '@NadiaPaginator/templates/bootstrap4/pagination.html.twig' %}
{% block body %}
<div class="container-fluid">
{{ block('pagination') }}
</div>
{% endblock %}
{% block tableContent %}
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
{{ nadia_paginator_sort_link(pagination, 'title', 'movie.title', 'ASC') }}
</th>
<th>
{{ nadia_paginator_sort_link(pagination, 'description', 'movie.description', 'ASC') }}
</th>
<th>
{{ nadia_paginator_sort_link(pagination, 'releasedAt', 'movie.releasedAt', 'DESC') }}
</th>
<th>Director</th>
<th>Company</th>
</tr>
</thead>
<tbody>
{% for movie in pagination %}
<tr>
<td>{{ movie.title }}</td>
<td>{{ movie.description }}</td>
<td>{{ movie.releasedAt|date('Y-m-d') }}</td>
<td>{{ movie.director.name }}</td>
<td>{{ movie.company }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock tableContent %}