aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorhiifong <i@hiif.ong>2024-12-13 08:45:06 +0800
committerGitHub <noreply@github.com>2024-12-13 00:45:06 +0000
commit30008fcfcfa84bf607baa493ffcebe7102363ba4 (patch)
tree4968f5934534fa32b14157278afb85f11b9c191d /templates/repo
parent0b8a8941a01ed4bf914843c88740ad6203550b85 (diff)
downloadgitea-30008fcfcfa84bf607baa493ffcebe7102363ba4.tar.gz
gitea-30008fcfcfa84bf607baa493ffcebe7102363ba4.zip
Fix bug of branch/tag selector in the issue sidebar (#32744)
Fix: #32731 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/issue/branch_selector_field.tmpl18
-rw-r--r--templates/repo/issue/new_form.tmpl3
-rw-r--r--templates/repo/issue/view_content/sidebar.tmpl2
3 files changed, 19 insertions, 4 deletions
diff --git a/templates/repo/issue/branch_selector_field.tmpl b/templates/repo/issue/branch_selector_field.tmpl
index 286ac0cd05..9183b7b46a 100644
--- a/templates/repo/issue/branch_selector_field.tmpl
+++ b/templates/repo/issue/branch_selector_field.tmpl
@@ -1,3 +1,17 @@
+{{/* TODO: RemoveIssueRef: the Issue.Ref will be removed in 1.24 or 1.25 if no end user really needs it or there could be better alternative then.
+PR: https://github.com/go-gitea/gitea/pull/32744
+
+The Issue.Ref was added by Add possibility to record branch or tag information in an issue (#780)
+After 8 years, this "branch selector" does nothing more than saving the branch/tag name into database and displays it.
+
+There are still users using it:
+* @didim99: it is a really useful feature to specify a branch in which issue found.
+
+Still needs to figure out:
+* Could the "recording branch/tag name" be replaced by other approaches?
+ * Write the branch name in the issue title/body then it will still be displayed, eg: `[bug] (fix/ui-broken-bug) there is a bug ....`
+* Is "GitHub-like development sidebar (`#31899`)" good enough (or better) for your usage?
+*/}}
{{if and (not .Issue.IsPull) (not .PageIsComparePull)}}
<input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}">
<div class="ui dropdown select-branch branch-selector-dropdown ellipsis-items-nowrap {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}}"
@@ -29,7 +43,7 @@
{{range .Branches}}
<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector" title="{{.}}">{{.}}</div>
{{else}}
- <div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
+ <div class="item disabled">{{ctx.Locale.Tr "no_results_found"}}</div>
{{end}}
</div>
<div id="tag-list" class="scrolling menu reference-list-menu tw-hidden">
@@ -39,7 +53,7 @@
{{range .Tags}}
<div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector">{{.}}</div>
{{else}}
- <div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
+ <div class="item disabled">{{ctx.Locale.Tr "no_results_found"}}</div>
{{end}}
</div>
</div>
diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl
index ceaaebc4d5..dd4c7617ce 100644
--- a/templates/repo/issue/new_form.tmpl
+++ b/templates/repo/issue/new_form.tmpl
@@ -47,7 +47,8 @@
</div>
<div class="issue-content-right ui segment">
- {{template "repo/issue/branch_selector_field" $}}
+ {{template "repo/issue/branch_selector_field" $}}{{/* TODO: RemoveIssueRef: template "repo/issue/branch_selector_field" $*/}}
+
{{if .PageIsComparePull}}
{{template "repo/issue/sidebar/reviewer_list" $.IssuePageMetaData}}
<div class="divider"></div>
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index 02f5d3e2df..987a882be7 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -1,5 +1,5 @@
<div class="issue-content-right ui segment">
- {{template "repo/issue/branch_selector_field" $}}
+ {{template "repo/issue/branch_selector_field" $}}{{/* TODO: RemoveIssueRef: template "repo/issue/branch_selector_field" $*/}}
{{if .Issue.IsPull}}
{{template "repo/issue/sidebar/reviewer_list" $.IssuePageMetaData}}