summaryrefslogtreecommitdiffstats
path: root/routers/admin/notice.go
diff options
context:
space:
mode:
authorThomas Boerger <thomas@webhippie.de>2016-11-21 10:37:14 +0100
committerGitHub <noreply@github.com>2016-11-21 10:37:14 +0100
commit1d9576d5ea334556400926a0218acfebb59523df (patch)
tree80cae2c04590ac77558e96d0b45d2671f537dc50 /routers/admin/notice.go
parentbd13c816845356e96be507b69b8c733cc788b2d2 (diff)
parent659bc2814c4b6f23c6039e0c7dc962a40968cdb1 (diff)
downloadgitea-1d9576d5ea334556400926a0218acfebb59523df.tar.gz
gitea-1d9576d5ea334556400926a0218acfebb59523df.zip
Merge pull request #202 from lunny/lunny/golint_fixed_routers_admin
go lint fixed for routers/admin
Diffstat (limited to 'routers/admin/notice.go')
-rw-r--r--routers/admin/notice.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/routers/admin/notice.go b/routers/admin/notice.go
index 1ff55124a4..4e4f0f1e94 100644
--- a/routers/admin/notice.go
+++ b/routers/admin/notice.go
@@ -16,9 +16,10 @@ import (
)
const (
- NOTICES base.TplName = "admin/notice"
+ tplNotices base.TplName = "admin/notice"
)
+// Notices show notices for admin
func Notices(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("admin.notices")
ctx.Data["PageIsAdmin"] = true
@@ -39,9 +40,10 @@ func Notices(ctx *context.Context) {
ctx.Data["Notices"] = notices
ctx.Data["Total"] = total
- ctx.HTML(200, NOTICES)
+ ctx.HTML(200, tplNotices)
}
+// DeleteNotices delete the specific notices
func DeleteNotices(ctx *context.Context) {
strs := ctx.QueryStrings("ids[]")
ids := make([]int64, 0, len(strs))
@@ -61,6 +63,7 @@ func DeleteNotices(ctx *context.Context) {
}
}
+// EmptyNotices delete all the notices
func EmptyNotices(ctx *context.Context) {
if err := models.DeleteNotices(0, 0); err != nil {
ctx.Handle(500, "DeleteNotices", err)