diff --git a/routers/web/repo/issue_watch.go b/routers/web/repo/issue_watch.go index dfa3491786e..19d723c0eae 100644 --- a/routers/web/repo/issue_watch.go +++ b/routers/web/repo/issue_watch.go @@ -5,7 +5,6 @@ package repo import ( "net/http" - "strconv" issues_model "code.gitea.io/gitea/models/issues" "code.gitea.io/gitea/modules/log" @@ -46,12 +45,7 @@ func IssueWatch(ctx *context.Context) { return } - watch, err := strconv.ParseBool(ctx.Req.PostFormValue("watch")) - if err != nil { - ctx.ServerError("watch is not bool", err) - return - } - + watch := ctx.FormBool("watch") if err := issues_model.CreateOrUpdateIssueWatch(ctx, ctx.Doer.ID, issue.ID, watch); err != nil { ctx.ServerError("CreateOrUpdateIssueWatch", err) return diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index 6bc339bc61e..5c85b50d337 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -228,7 +228,7 @@ func (d *DiffLine) RenderBlobExcerptButtons(fileNameHash string, data *DiffBlobE link += fmt.Sprintf("&pull_issue_index=%d", data.PullIssueIndex) } return htmlutil.HTMLFormat( - ``, + ``, link, dataHiddenCommentIDs, svg.RenderHTML(svgName), ) } diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 90f6b7546e5..9b29ab3843a 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -23,7 +23,7 @@ {{template "base/head_script" .}} {{template "custom/header" .}} - + {{template "custom/body_outer_pre" .}}
diff --git a/templates/org/follow_unfollow.tmpl b/templates/org/follow_unfollow.tmpl index ba0bd01efe4..77977c12794 100644 --- a/templates/org/follow_unfollow.tmpl +++ b/templates/org/follow_unfollow.tmpl @@ -1,4 +1,4 @@ -
diff --git a/templates/repo/issue/view_content/watching.tmpl b/templates/repo/issue/view_content/watching.tmpl index 1abc92742ad..1fdf93b9ee2 100644 --- a/templates/repo/issue/view_content/watching.tmpl +++ b/templates/repo/issue/view_content/watching.tmpl @@ -1,12 +1,7 @@ -
- - -
+ diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl index 41bcdaccb0d..b70013c7f0e 100644 --- a/templates/shared/user/profile_big_avatar.tmpl +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -115,16 +115,19 @@ {{end}} {{if and .IsSigned (ne .SignedUserID .ContextUser.ID)}} {{if not .UserBlocking}} -
  • - {{if $.IsFollowing}} - - {{else}} - - {{end}} + {{end}} +
  • {{end}}
  • diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl index 993975169b5..8a28f8dc620 100644 --- a/templates/user/notification/notification_div.tmpl +++ b/templates/user/notification/notification_div.tmpl @@ -53,8 +53,8 @@ {{DateUtils.TimeSince $one.UpdatedUnix}} {{end}} -
    {{if ne $one.Status $statusPinned}} diff --git a/tests/integration/compare_test.go b/tests/integration/compare_test.go index a3cb538d5b0..3f0034c86be 100644 --- a/tests/integration/compare_test.go +++ b/tests/integration/compare_test.go @@ -147,12 +147,12 @@ func TestCompareCodeExpand(t *testing.T) { req := NewRequest(t, "GET", "/user1/test_blob_excerpt/compare/main...user2/test_blob_excerpt-fork:forked-branch") resp := session.MakeRequest(t, req, http.StatusOK) htmlDoc := NewHTMLParser(t, resp.Body) - els := htmlDoc.Find(`button.code-expander-button[hx-get]`) + els := htmlDoc.Find(`button.code-expander-button[data-fetch-url]`) // all the links in the comparison should be to the forked repo&branch assert.NotZero(t, els.Length()) for i := 0; i < els.Length(); i++ { - link := els.Eq(i).AttrOr("hx-get", "") + link := els.Eq(i).AttrOr("data-fetch-url", "") assert.True(t, strings.HasPrefix(link, "/user2/test_blob_excerpt-fork/blob_excerpt/")) } })