{% extends '@RxConnexion/Admin/content.html.twig' %}
{% block content %}
    <div id="flash-messages-container">
    </div>
    <div class="row max-width-initial">
        <div class="small-12 columns">
            <nav aria-label="You are here:" role="navigation">
                <ul class="breadcrumbs">
                    <li><a href="{{ path('referring_provider') }}">Referring Physician List</a></li>
                    <li>
                        <span class="show-for-sr">Current: </span> Referring Physician Details
                    </li>
                </ul>
            </nav>
            {% include '@RxConnexion/ReferringProvider/overview.html.twig' with {referringProvider: referringProvider} %}
            <br/>
            <div class="content-container has-loading">
                <div class="content-container-content hide">
                    <ul class="tabs custom-tabs" data-tabs id="referring-provider-tabs">
                        <li class="tabs-title {{ tab is null or tab is empty or tab == 'm' ? 'is-active' : '' }}"><a href="#panel-referring-medical-facilities" aria-selected="true">Referring Medical Facilities</a></li>
                    </ul>
                    <div class="tabs-content custom-tabs-content" data-tabs-content="referring-provider-tabs">
                        <div class="tabs-panel {{ tab is null or tab is empty or tab == 'm' ? 'is-active' : '' }}" id="panel-referring-medical-facilities">
                            <div class="text-right">
                                {% if userData.type == 'Super Admin' or 'Admin Referring Provider Referring Health Facility New' in userData.accesses %}
                                    <a href="javascript:void(0)" class="href-referring-medical-facility-form href-new-action" data-action="n" data-id="0">Add Referring Medical Facility</a>
                                {% endif %}
                            </div>
                            <table class="display responsive" id="referringMedicalFacilities-datalist" width="100%">
                                <thead>
                                <tr>
                                    <th>Company</th>
                                    <th>Branch</th>
                                    <th>Description</th>
                                    <th>Address</th>
                                    <th>Phone No(s).</th>
                                    <th>Mobile No(s).</th>
                                    <th>Email(s)</th>
                                    <th>Start Date</th>
                                    <th>End Date</th>
                                    <th>Action</th>
                                </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="reveal small" id="modal" data-reveal>
        <div id="modal-content"></div>
        <button class="close-button" data-close aria-label="Close modal" type="button">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        referringProvider_detail.settings.referringProvider_id = '{{ referringProvider_id }}';
        referringProvider_detail.settings.referringMedicalFacilities_ajaxUrl = '{{ path('referring_provider_health_facilities_ajax_list') }}';
        referringProvider_detail.settings.referringMedicalFacilities_formUrl = '{{ path('referring_provider_health_facilities_form', {referringProvider_id:referringProvider_id}) }}';
        referringProvider_detail.settings.referringMedicalFacilities_formActionUrl = '{{ path('referring_provider_health_facilities_save') }}';
        jQ(document).ready(referringProvider_detail.init);
        //]]>
    </script>
{% endblock %}