diff options
author | yp05327 <576951401@qq.com> | 2024-02-15 12:30:11 +0100 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2024-02-17 23:24:30 +0100 |
commit | df439b6a983865ba559e517e5e93f5f1a53a97a0 (patch) | |
tree | 3a861849cc5041271aecf2c6220ee80f4510dee4 /templates | |
parent | [I18N] Translations update from Weblate (#2350) (diff) | |
download | forgejo-df439b6a983865ba559e517e5e93f5f1a53a97a0.tar.xz forgejo-df439b6a983865ba559e517e5e93f5f1a53a97a0.zip |
Fix can not select team reviewers when reviewers is empty (#29174)
Before:
![image](https://github.com/go-gitea/gitea/assets/18380374/b29e9c0c-f0fc-454f-b82d-ff9688d9e871)
After:
![image](https://github.com/go-gitea/gitea/assets/18380374/a982f7c6-4911-4951-91a5-4bb347e866f9)
Is this a bug? Maybe we don't need to fix this, as it only occurs when
there's only one user in the organization. 🤔
(cherry picked from commit 78c48d8fdde70a2874a7ed42b7762f797f432b03)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 6c13eef023..22f67ade7b 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -2,7 +2,7 @@ {{template "repo/issue/branch_selector_field" .}} {{if .Issue.IsPull}} <input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}"> - <div class="ui {{if or (not .Reviewers) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown"> + <div class="ui {{if or (and (not .Reviewers) (not .TeamReviewers)) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown"> <a class="text gt-df gt-ac muted"> <strong>{{ctx.Locale.Tr "repo.issues.review.reviewers"}}</strong> {{if and .CanChooseReviewer (not .Repository.IsArchived)}} @@ -29,7 +29,9 @@ {{end}} {{end}} {{if .TeamReviewers}} - <div class="divider"></div> + {{if .Reviewers}} + <div class="divider"></div> + {{end}} {{range .TeamReviewers}} {{if .Team}} <a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_team_{{.Team.ID}}" {{if not .CanChange}} data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}> |