From 8bb87cd685a9450ea770184bc0f51c831dd1b7f0 Mon Sep 17 00:00:00 2001 From: Victor_Jay Date: Sat, 30 May 2026 20:31:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E4=BF=AE=E8=AE=A2=E8=A1=A8=E6=A0=BC=EF=BC=8C=E6=B6=88=E9=99=A4?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E9=87=8D=E5=A4=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除管理后台独立的"修订待审核"表格区域 - 修订标识和按钮已在主列表中内联展示,无需额外表格 - PostsPage 不再额外查询 Revisions 列表 --- .../controller/admin/admin_post_controller.go | 4 -- templates/admin/html/posts/index.html | 43 +------------------ 2 files changed, 1 insertion(+), 46 deletions(-) diff --git a/internal/controller/admin/admin_post_controller.go b/internal/controller/admin/admin_post_controller.go index 24e0efd..8e488cd 100644 --- a/internal/controller/admin/admin_post_controller.go +++ b/internal/controller/admin/admin_post_controller.go @@ -47,9 +47,6 @@ func (ctrl *AdminPostController) PostsPage(c *gin.Context) { nextPage = totalPages } - // 查询待审修订(approved 帖子有 PendingBody 的) - revisions, _, _ := ctrl.postService.ListPendingRevisions(keyword, 1, 100) - c.HTML(http.StatusOK, "admin/posts/index.html", common.BuildAdminPageData(c, gin.H{ "Title": "内容管理", "Posts": posts, @@ -61,7 +58,6 @@ func (ctrl *AdminPostController) PostsPage(c *gin.Context) { "Keyword": keyword, "Status": status, "StatusNames": common.PostStatusDisplayNames, - "Revisions": revisions, "ExtraCSS": "/admin/static/css/posts.css", })) } diff --git a/templates/admin/html/posts/index.html b/templates/admin/html/posts/index.html index a227e97..c795c36 100644 --- a/templates/admin/html/posts/index.html +++ b/templates/admin/html/posts/index.html @@ -22,47 +22,6 @@
{{.Error}}
{{end}} - {{if .Revisions}} -
-

修订待审核 {{len .Revisions}}

- - - - - - - - - - - - - {{range .Revisions}} - - - - - - - - - {{end}} - -
ID标题作者状态时间操作
{{.ID}}{{.Title}} 修订中{{if .AuthorName}}{{.AuthorName}}({{.UserID}}){{else}}UID{{.UserID}}{{end}}{{index $.StatusNames .Status}}{{if .IsLocked}} 已锁定{{end}}{{.CreatedAt.Format "2006-01-02 15:04"}} -
- - - {{if and (not .IsLocked)}} - - {{end}} - {{if .IsLocked}} - - {{end}} -
-
-
- {{end}} - @@ -75,7 +34,7 @@ - {{if and (eq (len .Posts) 0) (eq (len .Revisions) 0)}} + {{if eq (len .Posts) 0}} {{end}} {{range .Posts}}
暂无帖子