{% extends '@RxConnexion/Admin/content.html.twig' %}
{% block content %}
    <div class="row max-width-initial">
        <div class="small-12 columns">
            <div class="content-container has-loading">
                <div class="content-container-content hide">
                    <div class="text-right">
                        {% if userData.type == 'Super Admin' or 'Admin Medication New' in userData.accesses %}
                            <a class="href-new-action" href="{{ path('medication_form') }}">New Medication</a>
                        {% endif %}
                    </div>
                    <table class="display responsive" id="medication-datalist" width="100%">
                        <thead>
                        <tr>
                            <th>Type</th>
                            <th>Code</th>
                            <th>Description</th>
                            <th>Action</th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        medication.settings.ajaxUrl = '{{ path('medication_ajax_list') }}';
        jQ(document).ready(function(){
            medication.init();
        });
        //]]>
    </script>
{% endblock %}