1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-19 22:52:59 +08:00
koogua a7f197c01b !6 develop->master 1.1.0
* 更新版本号
* 完善后台今日统计,增加权限白名单,增加后台首页菜单,调整后台登录页样式
* Merge branch 'koogua/I1XFCF' of https://gitee.com/koogua/course-tencen…
* 前台学习资料部分完成
* !2 后台运营统计合并
* 后台学习资料部分完成
* Merge branch 'master' into develop
* Merge branch 'master' of https://github.com/xiaochong0302/course-tencent-cloud
* 1.增加changelog.md
* 1.简化部分路由地址
* Merge pull request #2 from xiaochong0302/dependabot/composer/symfony/h…
* Bump symfony/http-foundation from 4.3.4 to 5.1.6
2020-10-08 18:44:06 +08:00

71 lines
2.4 KiB
Plaintext

{% extends 'templates/main.volt' %}
{% block content %}
{%- macro type_info(value) %}
{% if value == 1 %}
内置
{% elseif value == 2 %}
自定义
{% endif %}
{%- endmacro %}
<div class="kg-nav">
<div class="kg-nav-left">
<span class="layui-breadcrumb">
<a><cite>角色管理</cite></a>
</span>
</div>
</div>
<table class="layui-table kg-table">
<colgroup>
<col>
<col>
<col>
<col>
<col width="12%">
</colgroup>
<thead>
<tr>
<th>编号</th>
<th>名称</th>
<th>类型</th>
<th>成员数</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{% for item in roles %}
{% set user_list_url = url({'for':'admin.user.list'},{'admin_role':item.id}) %}
{% set edit_url = url({'for':'admin.role.edit','id':item.id}) %}
{% set delete_url = url({'for':'admin.role.delete','id':item.id}) %}
{% set restore_url = url({'for':'admin.role.restore','id':item.id}) %}
<tr>
<td>{{ item.id }}</td>
<td><a href="{{ edit_url }}" title="{{ item.summary }}">{{ item.name }}</a></td>
<td>{{ type_info(item.type) }}</td>
<td>
<a href="{{ user_list_url }}">
<span class="layui-badge layui-bg-green">{{ item.user_count }}</span>
</a>
</td>
<td class="center">
<div class="layui-dropdown">
<button class="layui-btn layui-btn-sm">操作 <i class="layui-icon layui-icon-triangle-d"></i></button>
<ul>
<li><a href="{{ edit_url }}">编辑</a></li>
{% if item.deleted == 0 %}
<li><a href="javascript:" class="kg-delete" data-url="{{ delete_url }}">删除</a></li>
{% else %}
<li><a href="javascript:" class="kg-restore" data-url="{{ restore_url }}">还原</a></li>
{% endif %}
</ul>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}