forked from TruthHun/BookStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomments.html
More file actions
91 lines (90 loc) · 4.74 KB
/
comments.html
File metadata and controls
91 lines (90 loc) · 4.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!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">
<title>评论管理 - {{.SITE_NAME}}</title>
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="/static/css/main.css?version={{$.Version}}" rel="stylesheet">
<script src="/static/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="/static/respond.js/1.4.2/respond.min.js"></script>
<link rel="stylesheet" href="/static/css/toast.css">
<style>
.content-block{
max-width: 300px;word-break: break-all;
}
</style>
</head>
<body>
<div class="manual-reader">
{{template "widgets/header.html" .}}
<div class="container manual-body">
<div class="row">
<div class="page-left">
{{template "manager/menu.html" .}}
</div>
<div class="page-right">
<div class="m-box">
<div class="box-head">
<strong class="box-title">评论管理</strong>
</div>
</div>
<div class="box-body">
<ul class="nav nav-tabs">
<li {{if eq .Status "0"}}class="active"{{end}}><a href="{{urlfor "ManagerController.Comments"}}?status=0">待审核</a></li>
<li {{if eq .Status "1"}}class="active"{{end}}><a href="{{urlfor "ManagerController.Comments"}}?status=1">审核通过</a></li>
<li {{if eq .Status "-1"}}class="active"{{end}}><a href="{{urlfor "ManagerController.Comments"}}?status=-1">审核不通过</a></li>
</ul>
<br>
<table class="table table-hover table-striped">
<thead>
<tr>
<th>#</th>
<th>用户</th>
<th>书籍</th>
<th>内容</th>
<th>状态/时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{{range .Comments}}
<tr>
<td>{{.Id}}</td>
<td><a href="{{urlfor "UserController.Index" ":username" .Account}}" target="_blank">{{.Nickname}}</a></td>
<td><a href="{{urlfor "DocumentController.Index" ":key" .Identify}}" target="_blank">《{{.BookName}}》</a></td>
<td>
<div class="help-block content-block">
{{.Content}}
</div>
</td>
<td>
<select name="status" class="form-control change-update" data-refresh="true" data-url="{{urlfor "ManagerController.SetCommentStatus"}}?id={{.Id}}">
<option value="1" {{if eq .Status 1}}selected{{end}}>审核通过</option>
<option value="0" {{if eq .Status 0}}selected{{end}}>待审核</option>
<option value="-1" {{if eq .Status -1}}selected{{end}}>审核不通过</option>
</select>
<div class="help-block">{{date .TimeCreate "Y-m-d H:i:s"}}</div>
</td>
<td>
<a href="{{urlfor "ManagerController.ClearComments"}}?uid={{.Uid}}" class="tooltips confirm ajax-get" title="清除当前用户的所有评论">清评</a><br>
<a href="{{urlfor "ManagerController.DeleteComment"}}?id={{.Id}}" class="tooltips confirm ajax-get" title="删除当前评论">删评</a>
</td>
</tr>
{{end}}
</tbody>
</table>
{{.PageHtml}}
</div>
</div>
</div>
</div>
</div>
<script src="/static/jquery/1.12.4/jquery.min.js"></script>
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
<script src="{{$.StaticDomain}}/static/js/toast.script.js"></script>
<script src="/static/js/main.js?version={{$.Version}}" type="text/javascript"></script>
</body>
</html>