1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-12 19:39:10 +08:00
2020-07-27 21:00:25 +08:00

71 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{%- macro type_info(value) %}
{% if value == 'course' %}
<span class="layui-badge layui-bg-green">课</span>
{% elseif value == 'chat' %}
<span class="layui-badge layui-bg-blue">聊</span>
{% endif %}
{%- endmacro %}
{%- macro owner_info(owner) %}
{% if owner %}
{{ owner.name }}{{ owner.id }}
{% else %}
未设置
{% endif %}
{%- endmacro %}
<div class="kg-nav">
<div class="kg-nav-left">
<span class="layui-breadcrumb">
<a><cite>群组管理</cite></a>
</span>
</div>
<div class="kg-nav-right">
<a class="layui-btn layui-btn-sm" href="{{ url({'for':'admin.group.add'}) }}">
<i class="layui-icon layui-icon-add-1"></i>添加群组
</a>
</div>
</div>
<table class="kg-table layui-table layui-form">
<colgroup>
<col>
<col>
<col>
<col>
<col>
<col width="12%">
</colgroup>
<thead>
<tr>
<th>编号</th>
<th>名称</th>
<th>群主</th>
<th>成员</th>
<th>发布</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{% for item in pager.items %}
<tr>
<td>{{ item.id }}</td>
<td>{{ item.name }} {{ type_info(item.type) }}</td>
<td>{{ owner_info(item.owner) }}</td>
<td><span class="layui-badge layui-bg-gray">{{ item.user_count }}</span></td>
<td><input type="checkbox" name="published" value="1" lay-filter="published" lay-skin="switch" lay-text="是|否" data-url="{{ url({'for':'admin.group.update','id':item.id}) }}" {% if item.published == 1 %}checked{% endif %}></td>
<td align="center">
<div class="layui-dropdown">
<button class="layui-btn layui-btn-sm">操作 <span class="layui-icon layui-icon-triangle-d"></span></button>
<ul>
<li><a href="{{ url({'for':'admin.group.edit','id':item.id}) }}">编辑</a></li>
<li><a href="javascript:" class="kg-delete" data-url="{{ url({'for':'admin.group.delete','id':item.id}) }}">删除</a></li>
</ul>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ partial('partials/pager') }}