1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-15 21:02:20 +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

97 lines
3.2 KiB
Plaintext

{% extends 'templates/main.volt' %}
{% block content %}
{%- macro gender_info(value) %}
{% if value == 1 %}
{% elseif value == 2 %}
{% elseif value == 3 %}
{% endif %}
{%- endmacro %}
{%- macro edu_role_info(user) %}
{% if user.edu_role.id == 1 %}
学员
{% elseif user.edu_role.id == 2 %}
<a href="{{ url({'for':'admin.user.list'},{'edu_role':user.edu_role.id}) }}">讲师</a>
{% endif %}
{%- endmacro %}
{%- macro admin_role_info(user) %}
{% if user.admin_role.id > 0 %}
<a href="{{ url({'for':'admin.user.list'},{'admin_role':user.admin_role.id}) }}">{{ user.admin_role.name }}</a>
{% endif %}
{%- endmacro %}
{%- macro status_info(user) %}
{% if user.vip == 1 %}
<span class="layui-badge layui-bg-orange" title="期限:{{ date('Y-m-d H:i:s',user.vip_expiry_time) }}">会员</span>
{% endif %}
{% if user.locked == 1 %}
<span class="layui-badge" title="期限:{{ date('Y-m-d H:i:s',user.lock_expiry_time) }}">锁定</span>
{% 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>
<col>
<col>
<col width="12%">
</colgroup>
<thead>
<tr>
<th>编号</th>
<th>昵称</th>
<th>性别</th>
<th>教学角色</th>
<th>后台角色</th>
<th>活跃时间</th>
<th>注册时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{% for item in pager.items %}
{% set preview_url = url({'for':'home.user.show','id':item.id}) %}
{% set edit_url = url({'for':'admin.user.edit','id':item.id}) %}
<tr>
<td>{{ item.id }}</td>
<td><a href="{{ edit_url }}" title="{{ item.about }}">{{ item.name }}</a>{{ status_info(item) }}</td>
<td>{{ gender_info(item.gender) }}</td>
<td>{{ edu_role_info(item) }}</td>
<td>{{ admin_role_info(item) }}</td>
<td>{{ date('Y-m-d H:i:s',item.active_time) }}</td>
<td>{{ date('Y-m-d H:i:s',item.create_time) }}</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="{{ preview_url }}" target="_blank">预览</a></li>
<li><a href="{{ edit_url }}">编辑</a></li>
</ul>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ partial('partials/pager') }}
{% endblock %}