{% extends '@RxConnexion/Admin/global.html.twig' %}
{% block body %}
    <h5 class="report-header" style="width: 100%">{{ page_title }}</h5>
    <table class="report-data" width="100%">
        <thead class="header">
        <tr>
            <th width="10%">Date</th>
            <th width="10%">Full Name</th>
            <th width="10%">Module</th>
            <th width="10%">Action</th>
            <th width="60%">Data</th>
        </tr>
        </thead>
        <tbody>
        {% set totalCount = 0 %}
        {% for record in records.data %}
            {% set trC = loop.index > 1 and loop.index % 2 == 0 ? 'even' : 'odd' %}
            {% set totalCount = totalCount + 1 %}
            <tr class="{{ trC }}">
                <td>{{ record.date_created }}</td>
                <td>{{ record.user ? record.user : 'Super Admin' }}</td>
                <td>{{ record.label }}</td>
                <td>{{ record.action }}</td>
                <td>{{ record.history_data }}</td>
            </tr>
        {% endfor %}
    </table>
    <div>Total Records: {{ totalCount }}</div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script>
        //<![CDATA[
        jQ(document).ready(function(){
            report_preview.init();
        });
        //]]>
    </script>
{% endblock %}