2017-06-09 18:14:55 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh-CN">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
2021-04-21 12:22:34 +08:00
|
|
|
<title>{{i18n .Lang "mgr.attachment_mgr"}} - Powered by MinDoc</title>
|
2017-06-09 18:14:55 +08:00
|
|
|
|
|
|
|
<!-- Bootstrap -->
|
|
|
|
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet" type="text/css">
|
|
|
|
<link href="{{cdncss "/static/font-awesome/css/font-awesome.min.css"}}" rel="stylesheet" type="text/css">
|
|
|
|
|
2018-08-15 15:33:22 +08:00
|
|
|
<link href="{{cdncss "/static/css/main.css" "version"}}" rel="stylesheet">
|
2017-06-09 18:14:55 +08:00
|
|
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
|
|
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
|
|
|
<!--[if lt IE 9]>
|
|
|
|
<script src="{{cdnjs "/static/html5shiv/3.7.3/html5shiv.min.js"}}"></script>
|
|
|
|
<script src="{{cdnjs "/static/respond.js/1.4.2/respond.min.js" }}"></script>
|
|
|
|
<![endif]-->
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="manual-reader">
|
|
|
|
{{template "widgets/header.tpl" .}}
|
|
|
|
<div class="container manual-body">
|
|
|
|
<div class="row">
|
2021-04-21 12:22:34 +08:00
|
|
|
{{template "manager/widgets.tpl" .}}
|
2017-06-09 18:14:55 +08:00
|
|
|
<div class="page-right">
|
|
|
|
<div class="m-box">
|
|
|
|
<div class="box-head">
|
2021-04-21 12:22:34 +08:00
|
|
|
<strong class="box-title">{{i18n .Lang "mgr.attachment_mgr"}}</strong>
|
2017-06-09 18:14:55 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="box-body">
|
|
|
|
<div class="attach-list" id="attachList">
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>#</th>
|
2021-04-21 12:22:34 +08:00
|
|
|
<th>{{i18n .Lang "mgr.attachment_name"}}</th>
|
|
|
|
<th>{{i18n .Lang "mgr.proj_blog_name"}}</th>
|
|
|
|
<th>{{i18n .Lang "mgr.file_size"}}</th>
|
|
|
|
<th>{{i18n .Lang "mgr.is_exist"}}</th>
|
|
|
|
<th>{{i18n .Lang "common.operate"}}</th>
|
2017-06-09 18:14:55 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range $index,$item := .Lists}}
|
|
|
|
<tr>
|
|
|
|
<td>{{$item.AttachmentId}}</td>
|
|
|
|
<td>{{$item.FileName}}</td>
|
|
|
|
<td>{{$item.BookName}}</td>
|
|
|
|
<td>{{$item.FileShortSize}}</td>
|
2021-04-21 12:22:34 +08:00
|
|
|
<td>{{ if $item.IsExist }} {{i18n $.Lang "commont.yes"}}{{else}}{{i18n $.Lang "common.no"}}{{end}}</td>
|
2017-06-09 18:14:55 +08:00
|
|
|
<td>
|
2021-04-21 12:22:34 +08:00
|
|
|
<button type="button" data-method="delete" class="btn btn-danger btn-sm" data-id="{{$item.AttachmentId}}" data-loading-text="{{i18n $.Lang "message.processing"}}">{{i18n $.Lang "common.delete"}}</button>
|
|
|
|
<a href="{{urlfor "ManagerController.AttachDetailed" ":id" $item.AttachmentId}}" class="btn btn-success btn-sm">{{i18n $.Lang "common.detail"}}</a>
|
2017-06-09 18:14:55 +08:00
|
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{else}}
|
2021-04-21 12:22:34 +08:00
|
|
|
<tr><td class="text-center" colspan="6">{{i18n .Lang "message.no_data"}}</td></tr>
|
2017-06-09 18:14:55 +08:00
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-07-10 14:54:59 +08:00
|
|
|
<nav class="pagination-container">
|
2017-06-09 18:14:55 +08:00
|
|
|
{{.PageHtml}}
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{template "widgets/footer.tpl" .}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script src="{{cdnjs "/static/jquery/1.12.4/jquery.min.js"}}"></script>
|
|
|
|
<script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}"></script>
|
|
|
|
<script src="{{cdnjs "/static/js/jquery.form.js"}}" type="text/javascript"></script>
|
|
|
|
<script src="{{cdnjs "/static/layer/layer.js" }}" type="text/javascript"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
|
|
$("#attachList").on("click","button[data-method='delete']",function () {
|
|
|
|
var id = $(this).attr("data-id");
|
|
|
|
var $this = $(this);
|
|
|
|
$(this).button("loading");
|
|
|
|
$.ajax({
|
|
|
|
url : "{{urlfor "ManagerController.AttachDelete"}}",
|
|
|
|
data : { "attach_id" : id },
|
|
|
|
type : "post",
|
|
|
|
dataType : "json",
|
|
|
|
success : function (res) {
|
|
|
|
if(res.errcode === 0){
|
|
|
|
$this.closest("tr").remove().empty();
|
|
|
|
}else {
|
|
|
|
layer.msg(res.message);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error : function () {
|
2021-04-21 12:22:34 +08:00
|
|
|
layer.msg({{i18n .Lang "message.system_error"}});
|
2017-06-09 18:14:55 +08:00
|
|
|
},
|
|
|
|
complete : function () {
|
|
|
|
$this.button("reset");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|