123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- {% extends 'base.html.twig' %}
- {% block body %}
- <div class="row">
- <div class="col-md-12">
- <table class="table table-striped table-hover table-references">
- <thead>
- <tr>
- <th>Type</th>
- <th>Id</th>
- <th>Authority</th>
- <th>Title</th>
- <th>Issued</th>
- </tr>
- </thead>
- <tbody>
- {% for reference in references %}
- <tr data-url="{{ path('edit', {'id': reference.id|escape('url')}) }}">
- <td>{{ reference.type }}</td>
- <td>{{ reference.id }}</td>
- <td>{{ reference.authority }}</td>
- <td>{{ reference.title }}</td>
- <td class="date-field">{{ reference.issued|localizeddate('medium', 'none') }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- <div class="col-md-12">
- <a href="{{ path('create') }}" class="btn btn-success">Créer</a>
- <a href="{{ path('list', {'_format': 'yml'}) }}" class="btn btn-default">Télécharger references.yml</a>
- </div>
- </div>
- {% endblock %}
- {% block javascripts %}
- <script type="text/javascript">
- $(document).ready( function () {
- $('.table-references').DataTable({
- drawCallback: function () {
- $('.table-references tbody tr').on('click', function() {
- window.location = $(this).data('url');
- });
- }
- });
- } );
- </script>
- {% endblock %}
|