<!-- Extend area where template is defined -->
<?= $this->extend('templates/adminlte/generalcontent') ?>
<!-- .Extend -->

<!-- Title of the page -->
<?= $this->section('title') ?>User Maintenance<?= $this->endSection() ?>
<!-- .Title -->

<!-- CSS of the page -->
<?= $this->section('css') ?>
<?= $this->endSection() ?>
<!-- .CSS -->

<!-- body attribute - class definition -->
<?= $this->section('bodyclass') ?>sidebar-mini<?= $this->endSection() ?>
<!-- .body attribute -->

<!-- Container title -->
<?= $this->section('containertitle') ?>Change User Group<?= $this->endSection() ?>
<!-- .Container title -->

<!-- Active breadcrumb -->
<?= $this->section('breadcrumbs') ?>
<li class="breadcrumb-item"><a href="<?= base_url('/adminuser') ?>">User Maintenance</a></li>
<li class="breadcrumb-item active">Change User Group</li>
<?= $this->endSection() ?>

<!-- .Active breadcrumb -->

<!-- Main content -->
<?= $this->section('main') ?>

<div class="row">
    <div class="col-12">
        <div class="card card-warning">
            <div class="card-header">
                <h3 class="card-title">Current Group of <?= $user->display_name ?></h3>
            </div>
            <div class="card-body p-0">
                <table class="table table-hover">
                    <tbody>
                        <?php foreach($membershipgroups as $group): ?>
                        <tr data-widget="expandable-table" aria-expanded="false">
                            <td>
                                <div class="form-group">
                                    <i class="expandable-table-caret fas fa-caret-right fa-fw"></i>
                                    <?= $group['group'] ?>
                                </div>
                            </td>
                            </tr>
                            <tr class="expandable-body d-none">
                            <td>
                                <div class="p-2">
                                    <table class="table table-hover">
                                        <tbody>
                                            <?php foreach($group['permissions'] as $permission): ?>
                                            <tr>
                                                <td><?= $permission['description'] ?></td>
                                            </tr>
                                            <?php endforeach; ?>
                                        </tbody>
                                    </table>
                                </div>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<?= $this->endSection() ?>
<!-- .Main content -->

<!-- Javascript -->

<?= $this->section('js') ?>

<script>
$(document).ready(function() {
    
});



</script>

<?= $this->endSection() ?>

<!-- .Javascript -->