{% extends 'base.html.twig' %}

{% block body %}
    <div class="row">
        <div class="col-md-6">
            {{ form(form) }}
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <table class="table table-striped 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>
                        <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>
{% endblock %}

{% block javascripts %}
    <script type="text/javascript">
        $(document).ready( function () {
            $('.table-references').DataTable();
        } );
    </script>
{% endblock %}
