MrDoc/template/app_doc/manage_project_self_colla.html
2020-11-16 21:32:08 +08:00

66 lines
2.1 KiB
HTML

{% extends 'app_doc/user/user_base.html' %}
{% load static %}
{% block title %}我协作的文集{% endblock %}
{% block content %}
<div class="layui-card">
<div class="layui-card-body">
<div class="layui-card-header" style="margin-bottom: 10px;">
<div class="layui-row">
<span style="font-size:18px;">我的协作文集
</span>
</div>
</div>
{% if colla_pros.count != 0 %}
<div class="layui-row">
<table class="layui-table">
<thead>
<tr>
<th>文集名称</th>
<th>作者</th>
<th>权限</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{% for colla in colla_pros %}
<tr>
<td>{{ colla.project }}</td>
<td>{{ colla.project.create_user }}</td>
<td>
{% if colla.role == 0 %}
初级 - 可新建文档、修改和删除自己创建的文档
{% else %}
高级 - 可新建文档、修改所有文档、删除自己创建的文档
{% endif %}
</td>
<td>
<a href="{% url 'pro_index' colla.project.id %}" target="_blank" class="layui-btn layui-btn-xs">查看</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="layui-row">
你还没有成为任何文集的协作者
</div>
{% endif %}
</div>
</div>
{% endblock %}
{% block custom_script %}
<script>
layui.use(['table','jquery','form','layer','element'], function() {
let table = layui.table;
let form = layui.form;
let $ = layui.jquery;
let layer = layui.layer;
let element = layui.element;
$.ajaxSetup({
data: {csrfmiddlewaretoken: '{{ csrf_token }}' },
});
})
</script>
{% endblock %}