Revert adding htmx until we finaly decide to add it (#28879)
This commit is contained in:
parent
1df06e3f39
commit
49d7663929
9 changed files with 20 additions and 44 deletions
|
@ -8,15 +8,10 @@ import (
|
|||
"strconv"
|
||||
|
||||
issues_model "code.gitea.io/gitea/models/issues"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
)
|
||||
|
||||
const (
|
||||
tplWatching base.TplName = "repo/issue/view_content/watching"
|
||||
)
|
||||
|
||||
// IssueWatch sets issue watching
|
||||
func IssueWatch(ctx *context.Context) {
|
||||
issue := GetActionIssue(ctx)
|
||||
|
@ -57,7 +52,5 @@ func IssueWatch(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
ctx.Data["Issue"] = issue
|
||||
ctx.Data["IssueWatch"] = &issues_model.IssueWatch{IsWatching: watch}
|
||||
ctx.HTML(http.StatusOK, tplWatching)
|
||||
ctx.Redirect(issue.Link())
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import (
|
|||
"code.gitea.io/gitea/models/db"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
|
@ -27,10 +26,6 @@ import (
|
|||
shared_user "code.gitea.io/gitea/routers/web/shared/user"
|
||||
)
|
||||
|
||||
const (
|
||||
tplProfileBigAvatar base.TplName = "shared/user/profile_big_avatar"
|
||||
)
|
||||
|
||||
// OwnerProfile render profile page for a user or a organization (aka, repo owner)
|
||||
func OwnerProfile(ctx *context.Context) {
|
||||
if strings.Contains(ctx.Req.Header.Get("Accept"), "application/rss+xml") {
|
||||
|
@ -314,10 +309,8 @@ func Action(ctx *context.Context) {
|
|||
|
||||
if err != nil {
|
||||
log.Error("Failed to apply action %q: %v", ctx.FormString("action"), err)
|
||||
ctx.Error(http.StatusBadRequest, fmt.Sprintf("Action %q failed", ctx.FormString("action")))
|
||||
ctx.JSONError(fmt.Sprintf("Action %q failed", ctx.FormString("action")))
|
||||
return
|
||||
}
|
||||
|
||||
shared_user.PrepareContextForProfileBigAvatar(ctx)
|
||||
ctx.HTML(http.StatusOK, tplProfileBigAvatar)
|
||||
ctx.JSONOK()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue