refactor: 彻底移除 /posts/new 旧编辑器,统一迁移至 /studio/write
- 删除 /posts/new 路由,不再保留任何兼容层 - /posts/:id/edit 改为 301 跳转 /studio/write?id=:id - 删除 posts/new.html 模板和 editor.js - 移除 PostController.EditPage/Create/Update/Delete 孤儿方法 - 移除 /api/posts POST/PUT/DELETE 孤儿 API(保留 submit 和 upload-image) - posts/show.html 编辑链接指向 /studio/write
This commit is contained in:
@ -34,7 +34,7 @@
|
||||
{{if .IsLoggedIn}}
|
||||
<div class="post-actions">
|
||||
{{if and $.Post (or (eq $.Post.UserID $.UID) $.CanAccessAdmin) (ne $.Post.Status "pending") (not $.Post.IsLocked)}}
|
||||
<a href="/posts/{{$.Post.ID}}/edit" class="btn btn-secondary">编辑</a>
|
||||
<a href="/studio/write?id={{$.Post.ID}}" class="btn btn-secondary">编辑</a>
|
||||
{{end}}
|
||||
{{if and $.Post (eq $.Post.UserID $.UID) (or (eq $.Post.Status "draft") (eq $.Post.Status "rejected"))}}
|
||||
<button class="btn btn-primary" id="submitAuditBtn" data-id="{{$.Post.ID}}">提交审核</button>
|
||||
|
||||
Reference in New Issue
Block a user