{% 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('user_group') }}">User Group List</a></li>
                    <li>
                        <span class="show-for-sr">Current: </span> User Group Details
                    </li>
                </ul>
            </nav>
            {% include '@RxConnexion/UserGroup/overview.html.twig' with {userGroup: userGroup} %}
            <br/>
            <div class="content-container has-loading">
                <div class="content-container-content hide">
                    <ul class="tabs custom-tabs" data-tabs id="user-group-tabs">
                        {% if userData.type == 'Super Admin' or 'Admin User Group Detail' in userData.accesses %}
                            <li class="tabs-title {{ tab is null or tab is empty or tab == 'm' ? 'is-active' : '' }}"><a href="#panel-accountUser" aria-selected="true">Account User</a></li>
                        {% endif %}
                    </ul>
                    <div class="tabs-panel {{ tab is null or tab is empty or tab == 'm' ? 'is-active' : '' }}" id="panel-accountUser">
                        <div class="text-right">
                            {% if userData.type == 'Super Admin' or 'Admin User Group Account User New' in userData.accesses %}
                                <a href="javascript:void(0)" class="href-account-user-form href-new-action" data-action="n" data-id="0">Add User</a>
                            {% endif %}
                        </div>
                        <table class="display responsive" id="userGroupAccountUser-datalist" width="100%">
                            <thead>
                            <tr>
                                <th>Full Name</th>
                                <th>Start Date</th>
                                <th>End Date</th>
                                <th>Action</th>
                            </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </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[
        userGroup_detail.settings.user_group_id = '{{ user_group_id }}';
        userGroup_detail.settings.userGroup_account_user_ajaxUrl = '{{ path('user_group_account_user_ajax_list') }}';
        userGroup_detail.settings.userGroup_account_user_formUrl = '{{ path('user_group_account_user_form', {user_group_id:user_group_id}) }}';
        userGroup_detail.settings.userGroup_account_user_formActionUrl = '{{ path('user_group_account_user_save') }}';
        jQ(document).ready(userGroup_detail.init);
        //]]>
    </script>
{% endblock %}