mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-11-24 16:53:22 +08:00
实现项目列表、概述功能
This commit is contained in:
@@ -26,53 +26,63 @@
|
||||
<div class="row">
|
||||
<div class="page-left">
|
||||
<ul class="menu">
|
||||
<li class="active"><a href="{{urlfor "BookController.Dashboard" ":key" "test"}}" class="item"><i class="fa fa-dashboard" aria-hidden="true"></i> 概要</a> </li>
|
||||
<li><a href="{{urlfor "BookController.Users" ":key" "test"}}" class="item"><i class="fa fa-users" aria-hidden="true"></i> 成员</a> </li>
|
||||
<li><a href="{{urlfor "BookController.Setting" ":key" "test"}}" class="item"><i class="fa fa-gear" aria-hidden="true"></i> 设置</a> </li>
|
||||
<li class="active"><a href="{{urlfor "BookController.Dashboard" ":key" .Model.Identify}}" class="item"><i class="fa fa-dashboard" aria-hidden="true"></i> 概要</a> </li>
|
||||
<li><a href="{{urlfor "BookController.Users" ":key" .Model.Identify}}" class="item"><i class="fa fa-users" aria-hidden="true"></i> 成员</a> </li>
|
||||
<li><a href="{{urlfor "BookController.Setting" ":key" .Model.Identify}}" class="item"><i class="fa fa-gear" aria-hidden="true"></i> 设置</a> </li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="page-right">
|
||||
<div class="m-box">
|
||||
<div class="box-head">
|
||||
<strong class="box-title"><i class="fa fa-unlock" aria-hidden="true" title="公开项目" data-toggle="tooltip"></i> 这是一个测试项目</strong>
|
||||
<a href="{{urlfor "BookController.Edit" ":key" "test" ":id" "1"}}" class="btn btn-default btn-sm pull-right" target="_blank"><i class="fa fa-edit" aria-hidden="true"></i> 编辑</a>
|
||||
<a href="{{urlfor "DocumentController.Index" ":key" "test"}}" class="btn btn-default btn-sm pull-right" style="margin-right: 5px;" target="_blank"><i class="fa fa-eye"></i> 阅读</a>
|
||||
<a href="{{urlfor "DocumentController.Index" ":key" "test"}}" class="btn btn-default btn-sm pull-right" style="margin-right: 5px;" target="_blank"><i class="fa fa-upload" aria-hidden="true"></i> 发布</a>
|
||||
<strong class="box-title">
|
||||
{{if eq .Model.PrivatelyOwned 0}}
|
||||
<i class="fa fa-unlock" aria-hidden="true" title="公开项目" data-toggle="tooltip"></i>
|
||||
{{else}}
|
||||
<i class="fa fa-lock" aria-hidden="true" title="私有项目" data-toggle="tooltip"></i>
|
||||
{{end}}
|
||||
{{.Model.BookName}}
|
||||
</strong>
|
||||
{{if ne .Model.RoleId 3}}
|
||||
<a href="{{urlfor "BookController.Edit" ":key" .Model.Identify ":id" .Model.BookId}}" class="btn btn-default btn-sm pull-right" target="_blank"><i class="fa fa-edit" aria-hidden="true"></i> 编辑</a>
|
||||
<a href="{{urlfor "DocumentController.Index" ":key" .Model.Identify}}" class="btn btn-default btn-sm pull-right" style="margin-right: 5px;" target="_blank"><i class="fa fa-eye"></i> 阅读</a>
|
||||
<a href="{{urlfor "DocumentController.Index" ":key" .Model.Identify}}" class="btn btn-default btn-sm pull-right" style="margin-right: 5px;" target="_blank"><i class="fa fa-upload" aria-hidden="true"></i> 发布</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="dashboard">
|
||||
<div class="pull-left" style="width: 200px;margin-bottom: 15px;">
|
||||
<div class="book-image">
|
||||
<img src="/static/images/5fcb811e04c23cdb2088f26923fcc287_100.jpg">
|
||||
<img src="{{.Model.Cover}}" onerror="this.src='/static/images/book.jpg'" width="174" height="229" style="border: 1px solid #666">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list">
|
||||
<span class="title">创建者:</span>
|
||||
<span class="body">
|
||||
Minho
|
||||
</span>
|
||||
<span class="body">{{.Model.CreateName}}</span>
|
||||
</div>
|
||||
<div class="list">
|
||||
<span class="title">文档数量:</span>
|
||||
<span class="body">20</span>
|
||||
<span class="body">{{.Model.DocCount}} 篇</span>
|
||||
</div>
|
||||
<div class="list">
|
||||
<span class="title">创建时间:</span>
|
||||
<span class="body"> 2017-05-25 12:25:45 </span>
|
||||
<span class="body"> {{date .Model.CreateTime "Y-m-d H:i:s"}} </span>
|
||||
</div>
|
||||
<div class="list">
|
||||
<span class="title">修改时间:</span>
|
||||
<span class="body"> 2017-05-25 12:25:45 </span>
|
||||
</div>
|
||||
<div class="summary">《TCP/IP详解,卷1:协议》是一本完整而详细的TCP/IP协议指南。描述了属于每一层的各个协议以及它们如何在不同操作系统中运行。<br>
|
||||
<br>
|
||||
作者用Lawrence Berkeley实验室的tcpdump程序来捕获不同操作系统和TCP/IP实现之间传输的不同分组。对tcpdump输出的研究可以帮助理解不同协议如何工作。 <br>
|
||||
<br>
|
||||
本书适合作为计算机专业学生学习网络的教材和教师参考书。也适用于研究网络的技术人员。
|
||||
<span class="body"> {{date .Model.ModifyTime "Y-m-d H:i:s"}} </span>
|
||||
</div>
|
||||
<div class="list">
|
||||
<span class="title">担任角色:</span>
|
||||
<span class="body">{{.Model.RoleName}}</span>
|
||||
</div>
|
||||
<div class="list">
|
||||
<span class="title">评论数量:</span>
|
||||
<span class="body">{{.Model.CommentCount}} 条</span>
|
||||
</div>
|
||||
<div class="summary">{{.Model.Description}} </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,35 +37,54 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="book-list">
|
||||
<div class="list-item">
|
||||
<div class="book-list" id="bookList">
|
||||
<template v-if="lists.length <= 0">
|
||||
|
||||
</template>
|
||||
<template v-else>
|
||||
|
||||
<div class="list-item" v-for="item in lists">
|
||||
<div class="book-title">
|
||||
<div class="pull-left">
|
||||
<a href="{{urlfor "BookController.Dashboard" ":key" "test"}}" title="项目概要" data-toggle="tooltip">
|
||||
<i class="fa fa-unlock" aria-hidden="true"></i> 测试项目
|
||||
<a :href="'/book/' + item.identify + '/dashboard'" title="项目概要" data-toggle="tooltip">
|
||||
<i class="fa fa-unlock" aria-hidden="true"></i> ${item.book_name}
|
||||
</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{{urlfor "DocumentController.Index" ":key" "test"}}" title="查看文档" data-toggle="tooltip"><i class="fa fa-eye"></i> 查看文档</a>
|
||||
<a href="{{urlfor "BookController.Edit" ":key" "test" ":id" "1"}}" title="编辑文档" data-toggle="tooltip"><i class="fa fa-edit" aria-hidden="true"></i> 编辑文档</a>
|
||||
<a :href="'{{urlfor "DocumentController.Index" ":key" ""}}' + item.identify" title="查看文档" data-toggle="tooltip"><i class="fa fa-eye"></i> 查看文档</a>
|
||||
<a :href="'/book/' + item.identify + '/edit'" title="编辑文档" data-toggle="tooltip"><i class="fa fa-edit" aria-hidden="true"></i> 编辑文档</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="desc-text">
|
||||
<a href="{{urlfor "BookController.Dashboard" ":key" "test"}}" title="项目概要" style="font-size: 12px;" target="_blank">
|
||||
这是一个测试用户测试项目
|
||||
</a>
|
||||
|
||||
<template v-if="item.description === ''">
|
||||
|
||||
</template>
|
||||
<template v-else="">
|
||||
<a :href="'/book/' + item.identify + '/dashboard'" title="项目概要" style="font-size: 12px;" target="_blank">
|
||||
${item.description}
|
||||
</a>
|
||||
</template>
|
||||
</div>
|
||||
<div class="info">
|
||||
<span title="创建时间" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-clock-o"></i> 2016/11/27 06:09</span>
|
||||
<span title="创建者" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-user"></i> admin</span>
|
||||
<span title="文档数量" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-pie-chart"></i> 4</span>
|
||||
<span title="项目角色" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-user-secret"></i> 拥有者</span>
|
||||
<span title="最后编辑" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-pencil"></i> 最后编辑: admin 于 2017-04-20 12:19</span>
|
||||
<span title="创建时间" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-clock-o"></i>
|
||||
${(new Date(item.create_time)).format("yyyy-MM-dd hh:mm:ss")}
|
||||
|
||||
</span>
|
||||
<span title="创建者" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-user"></i> ${item.create_name}</span>
|
||||
<span title="文档数量" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-pie-chart"></i> ${item.doc_count}</span>
|
||||
<span title="项目角色" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-user-secret"></i>${item.role_name}</span>
|
||||
<template v-if="item.last_modify_text !== ''">
|
||||
<span title="最后编辑" data-toggle="tooltip" data-placement="bottom"><i class="fa fa-pencil"></i> 最后编辑: ${item.last_modify_text}</span>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<nav>
|
||||
{{.PageHtml}}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -91,7 +110,7 @@
|
||||
</div>
|
||||
<input type="text" class="form-control pull-left" style="width: 220px;vertical-align: middle" placeholder="项目唯一标识(不能超过50字)" name="identify" id="identify">
|
||||
<div class="clearfix"></div>
|
||||
<p class="text" style="font-size: 12px;color: #999;margin-top: 6px;">文档标识只能包含小写字母、数字,以及“-”和“_”符号,并且只能小写字母打头</p>
|
||||
<p class="text" style="font-size: 12px;color: #999;margin-top: 6px;">文档标识只能包含小写字母、数字,以及“-”和“_”符号,并且只能小写字母开头</p>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -118,12 +137,12 @@
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<label>
|
||||
<input type="radio" name="comment_status" value="">关闭评论<span class="text"></span>
|
||||
<input type="radio" name="comment_status" value="closed">关闭评论<span class="text"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<label>
|
||||
<input type="radio" name="comment_status" value="">仅允许参与者评论<span class="text"></span>
|
||||
<input type="radio" name="comment_status" value="group_only">仅允许参与者评论<span class="text"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
@@ -147,6 +166,7 @@
|
||||
|
||||
<script src="/static/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="/static/vuejs/vue.min.js" type="text/javascript"></script>
|
||||
<script src="/static/js/jquery.form.js" type="text/javascript"></script>
|
||||
<script src="/static/js/main.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
@@ -176,9 +196,27 @@
|
||||
return showSuccess("");
|
||||
},
|
||||
success : function (res) {
|
||||
console.log(res)
|
||||
if(res.errcode === 0){
|
||||
|
||||
}else{
|
||||
showError(res.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
new Vue({
|
||||
el : "#bookList",
|
||||
data : {
|
||||
lists : {{.Result}}
|
||||
},
|
||||
delimiters : ['${','}'],
|
||||
methods : {
|
||||
}
|
||||
});
|
||||
Vue.nextTick(function () {
|
||||
$("[data-toggle='tooltip']").tooltip();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>概要 - Powered by MinDoc</title>
|
||||
<title>设置 - Powered by MinDoc</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
@@ -26,9 +26,9 @@
|
||||
<div class="row">
|
||||
<div class="page-left">
|
||||
<ul class="menu">
|
||||
<li><a href="{{urlfor "BookController.Dashboard" ":key" "test"}}" class="item"><i class="fa fa-dashboard" aria-hidden="true"></i> 概要</a> </li>
|
||||
<li><a href="{{urlfor "BookController.Users" ":key" "test"}}" class="item"><i class="fa fa-users" aria-hidden="true"></i> 成员</a> </li>
|
||||
<li class="active"><a href="{{urlfor "BookController.Setting" ":key" "test"}}" class="item"><i class="fa fa-gear" aria-hidden="true"></i> 设置</a> </li>
|
||||
<li><a href="{{urlfor "BookController.Dashboard" ":key" .Model.Identify}}" class="item"><i class="fa fa-dashboard" aria-hidden="true"></i> 概要</a> </li>
|
||||
<li><a href="{{urlfor "BookController.Users" ":key" .Model.Identify}}" class="item"><i class="fa fa-users" aria-hidden="true"></i> 成员</a> </li>
|
||||
<li class="active"><a href="{{urlfor "BookController.Setting" ":key" .Model.Identify}}" class="item"><i class="fa fa-gear" aria-hidden="true"></i> 设置</a> </li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
@@ -36,8 +36,17 @@
|
||||
<div class="m-box">
|
||||
<div class="box-head">
|
||||
<strong class="box-title"> 项目设置</strong>
|
||||
{{if eq .Model.RoleId 0 1}}
|
||||
{{if eq .Model.RoleId 0}}
|
||||
<button type="button" class="btn btn-success btn-sm pull-right">转让项目</button>
|
||||
{{end}}
|
||||
<button type="button" class="btn btn-danger btn-sm pull-right" style="margin-right: 5px;">删除项目</button>
|
||||
{{end}}
|
||||
{{if eq .Model.PrivatelyOwned 1}}
|
||||
<button type="button" class="btn btn-success btn-sm pull-right" style="margin-right: 5px;">转为公有</button>
|
||||
{{else}}
|
||||
<button type="button" class="btn btn-danger btn-sm pull-right" style="margin-right: 5px;">转为私有</button>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body" style="padding-right: 200px;">
|
||||
@@ -45,18 +54,68 @@
|
||||
<form method="post" id="bookEditForm">
|
||||
<div class="form-group">
|
||||
<label>标题</label>
|
||||
<input type="text" class="form-control" placeholder="项目名称">
|
||||
<input type="text" class="form-control" placeholder="项目名称" value="{{.Model.BookName}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>标识</label>
|
||||
<input type="text" class="form-control" value=" {{.BaseUrl}}{{urlfor "DocumentController.Index" ":key" .Model.Identify}}" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>描述</label>
|
||||
<textarea rows="3" class="form-control" name="description" style="height: 90px">{{.Model.Description}}</textarea>
|
||||
<p class="text">描述信息不超过300个字符</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>标签</label>
|
||||
<input type="text" class="form-control" placeholder="项目标签" value="{{.Model.Label}}">
|
||||
<p class="text">最多允许添加10个标签,多个标签请用“;”分割</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>开启评论</label>
|
||||
<div class="radio">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {{if eq .Model.CommentStatus "open"}}checked{{end}} name="comment_status" value="open">允许所有人评论<span class="text"></span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {{if eq .Model.CommentStatus "closed"}}checked{{end}} name="comment_status" value="closed">关闭评论<span class="text"></span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {{if eq .Model.CommentStatus "group_only"}}checked{{end}} name="comment_status" value="group_only">仅允许参与者评论<span class="text"></span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {{if eq .Model.CommentStatus "registered_only"}}checked{{end}} name="comment_status" value="registered_only">仅允许注册者评论<span class="text"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{{if eq .Model.PrivatelyOwned 1}}
|
||||
<div class="form-group">
|
||||
<label>访问令牌</label>
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" placeholder="访问令牌" readonly>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button class="btn btn-success btn-sm">重写生成</button>
|
||||
<button class="btn btn-danger btn-sm">删除令牌</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success" data-loading-text="保存中...">保存修改</button>
|
||||
<span id="form-error-message" class="error-message"></span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="form-right">
|
||||
<label>
|
||||
<a href="javascript:;" data-toggle="modal" data-target="#upload-logo-panel">
|
||||
<img src="/static/images/5fcb811e04c23cdb2088f26923fcc287_100.jpg" onerror="this.src='https://wiki.iminho.me/static/images/middle.gif'" alt="头像" style="max-width: 120px;" id="headimgurl">
|
||||
<img src="{{.Model.Cover}}" onerror="this.src='/static/images/book.png'" alt="封面" style="max-width: 120px;border: 1px solid #999" id="headimgurl">
|
||||
</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>概要 - Powered by MinDoc</title>
|
||||
<title>成员 - Powered by MinDoc</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
@@ -26,9 +26,9 @@
|
||||
<div class="row">
|
||||
<div class="page-left">
|
||||
<ul class="menu">
|
||||
<li><a href="{{urlfor "BookController.Dashboard" ":key" "test"}}" class="item"><i class="fa fa-dashboard" aria-hidden="true"></i> 概要</a> </li>
|
||||
<li class="active"><a href="{{urlfor "BookController.Users" ":key" "test"}}" class="item"><i class="fa fa-users" aria-hidden="true"></i> 成员</a> </li>
|
||||
<li><a href="{{urlfor "BookController.Setting" ":key" "test"}}" class="item"><i class="fa fa-gear" aria-hidden="true"></i> 设置</a> </li>
|
||||
<li><a href="{{urlfor "BookController.Dashboard" ":key" .Model.Identify}}" class="item"><i class="fa fa-dashboard" aria-hidden="true"></i> 概要</a> </li>
|
||||
<li class="active"><a href="{{urlfor "BookController.Users" ":key" .Model.Identify}}" class="item"><i class="fa fa-users" aria-hidden="true"></i> 成员</a> </li>
|
||||
<li><a href="{{urlfor "BookController.Setting" ":key" .Model.Identify}}" class="item"><i class="fa fa-gear" aria-hidden="true"></i> 设置</a> </li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
@@ -36,48 +36,38 @@
|
||||
<div class="m-box">
|
||||
<div class="box-head">
|
||||
<strong class="box-title"> 成员管理</strong>
|
||||
<a href="{{urlfor "BookController.Edit" ":key" "test" ":id" "1"}}" class="btn btn-success btn-sm pull-right" target="_blank"><i class="fa fa-edit" aria-hidden="true"></i> 添加成员</a>
|
||||
<button type="button" class="btn btn-success btn-sm pull-right" data-toggle="modal" data-target="#addBookMemberDialogModal"><i class="fa fa-user-plus" aria-hidden="true"></i> 添加成员</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="users-list">
|
||||
<div class="list-item">
|
||||
<img src="/static/images/middle.gif" class="img-circle" width="34" height="34">
|
||||
<span>lifei6671</span>
|
||||
<div class="operate">
|
||||
创始人
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<img src="/static/images/middle.gif" class="img-circle" width="34" height="34">
|
||||
<span>lifei6671</span>
|
||||
<div class="operate">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">编辑者 <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">管理员</a> </li>
|
||||
<li><a href="#">编辑者</a> </li>
|
||||
<li><a href="#">观察者</a> </li>
|
||||
</ul>
|
||||
<div class="users-list" id="userList">
|
||||
<template v-if="lists.length <= 0">
|
||||
<div class="text-center">暂无数据</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="list-item" v-for="item in lists">
|
||||
<img :src="item.avatar" onerror="this.src='/static/images/middle.gif'" class="img-circle" width="34" height="34">
|
||||
<span>${item.account}</span>
|
||||
<div class="operate">
|
||||
<template v-if="item.role_id == 0">
|
||||
创始人
|
||||
</template>
|
||||
<template v-else-if="item.role_id == 1">
|
||||
{{if eq .Member.Role 0}}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">编辑者 <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">管理员</a> </li>
|
||||
<li><a href="#">编辑者</a> </li>
|
||||
<li><a href="#">观察者</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
<a href="#" class="btn btn-danger btn-sm">移除</a>
|
||||
{{end}}
|
||||
</template>
|
||||
</div>
|
||||
<a href="#" class="btn btn-danger btn-sm">移除</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<img src="/static/images/middle.gif" class="img-circle" width="34" height="34">
|
||||
<span>lifei6671</span>
|
||||
<div class="operate">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">编辑者 <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">管理员</a> </li>
|
||||
<li><a href="#">编辑者</a> </li>
|
||||
<li><a href="#">观察者</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
<a href="#" class="btn btn-danger btn-sm">移除</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,9 +75,77 @@
|
||||
</div>
|
||||
{{template "widgets/footer.tpl" .}}
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="addBookMemberDialogModal" tabindex="-1" role="dialog" aria-labelledby="addBookMemberDialogModalLabel">
|
||||
<div class="modal-dialog modal-sm" role="document" style="width: 400px;">
|
||||
<form method="post" autocomplete="off" class="form-horizontal" action="{{urlfor "BookController.AddMember"}}" id="addBookMemberDialogForm">
|
||||
<input type="hidden" name="identify" value="{{.Model.Identify}}">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">添加成员</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">账号</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="account" class="form-control" placeholder="用户账号" id="account" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">角色</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="role_id" class="form-control">
|
||||
<option value="1">管理员</option>
|
||||
<option value="2">编辑者</option>
|
||||
<option value="3">观察者</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span id="form-error-message"></span>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
||||
<button type="submit" class="btn btn-success">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div><!--END Modal-->
|
||||
<script src="/static/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="/static/vuejs/vue.min.js"></script>
|
||||
<script src="/static/js/jquery.form.js" type="text/javascript"></script>
|
||||
<script src="/static/js/main.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#addBookMemberDialogForm").ajaxForm({
|
||||
beforeSubmit : function () {
|
||||
var account = $.trim($("#account").val());
|
||||
if(account === ""){
|
||||
return showError("账号不能为空");
|
||||
}
|
||||
},
|
||||
success : function (res) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
new Vue({
|
||||
el : "#userList",
|
||||
data : {
|
||||
lists : {{.Result}}
|
||||
},
|
||||
delimiters : ['${','}'],
|
||||
methods : {
|
||||
}
|
||||
});
|
||||
Vue.nextTick(function () {
|
||||
$("[data-toggle='tooltip']").tooltip();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user