<div class="content-wrapper">

    <section class="content-header">
        <?=$this->partial('layout/breadcrumb')?>

        <h1 class="pull-right">
            <a href="<?=$this->url('admin-group', ['action'=> 'addAdminGroup']);?>" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> <?=$this->translate('添加管理员组')?></a>
            <?=$this->HelpUrl('adminGroupList')?>
        </h1>

    </section>

    <section class="content">
        <?=$this->partial('layout/messages'); ?>

        <div class="row">
            <div class="col-xs-12">
                <div class="box erp-box">

                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <thead>
                            <tr class="erp-bg-thead">
                                <th>ID</th>
                                <th><?=$this->translate('管理员组')?></th>
                                <th width="18%"><?=$this->translate('操作')?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if($this->adminGroup) foreach ($this->adminGroup as $group) { ?>
                                <tr>
                                    <td><?= $group->getAdminGroupId()?></td>
                                    <td><?= $this->escapeHtml($group->getAdminGroupName())?></td>
                                    <td>
                                        <?php if($group->getAdminGroupId() != 1) { ?>
                                        <a href="<?= $this->url('admin-group',
                                            ['action'=>'editAdminGroup', 'id'=>$group->getAdminGroupId()]); ?>"
                                           class="btn btn-xs btn-success"><i class="fa fa-pencil"></i> <?=$this->translate('编辑')?></a>

                                            <a href="javascript:;" onclick="deleteConfirm('<?php echo $this->translate('您确实要删除该管理员组吗？'); ?>', '<?= $this->url('admin-group', ['action'=>'deleteAdminGroup', 'id'=>$group->getAdminGroupId()], ['query' => ['qToken' => $this->common()->getCsrfValue()]]); ?>');" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i> <?=$this->translate('删除')?></a>
                                        <?php } ?>

                                    </td>
                                </tr>
                            <?php } ?>
                            </tbody>
                        </table>
                    </div>

                </div>

            </div>
        </div>

    </section>
</div>