diff options
author | Jason Song <i@wolfogre.com> | 2023-08-23 10:29:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-23 02:29:17 +0000 |
commit | 5db21ce7e10ba78ede8841bea9db7a63adbececb (patch) | |
tree | 0e73df14b63b18becf7af115706105ad0be6a6f8 /templates/user | |
parent | 3b91b2d6b12b9c9c18406f484775925bbd557618 (diff) | |
download | gitea-5db21ce7e10ba78ede8841bea9db7a63adbececb.tar.gz gitea-5db21ce7e10ba78ede8841bea9db7a63adbececb.zip |
Fix counting and filtering on the dashboard page for issues (#26657)
This PR has multiple parts, and I didn't split them because
it's not easy to test them separately since they are all about the
dashboard page for issues.
1. Support counting issues via indexer to fix #26361
2. Fix repo selection so it also fixes #26653
3. Keep keywords in filter links.
The first two are regressions of #26012.
After:
https://github.com/go-gitea/gitea/assets/9418365/71dfea7e-d9e2-42b6-851a-cc081435c946
Thanks to @CaiCandong for helping with some tests.
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/dashboard/issues.tmpl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl index 8d6cc67afe..a89098c6ab 100644 --- a/templates/user/dashboard/issues.tmpl +++ b/templates/user/dashboard/issues.tmpl @@ -5,29 +5,29 @@ <div class="ui stackable grid"> <div class="four wide column"> <div class="ui secondary vertical filter menu gt-bg-transparent"> - <a class="{{if eq .ViewType "your_repositories"}}active{{end}} item" href="{{.Link}}?type=your_repositories&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}"> + <a class="{{if eq .ViewType "your_repositories"}}active{{end}} item" href="{{.Link}}?type=your_repositories&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}"> {{.locale.Tr "home.issues.in_your_repos"}} <strong class="ui right">{{CountFmt .IssueStats.YourRepositoriesCount}}</strong> </a> - <a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{.Link}}?type=assigned&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}"> + <a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{.Link}}?type=assigned&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}"> {{.locale.Tr "repo.issues.filter_type.assigned_to_you"}} <strong class="ui right">{{CountFmt .IssueStats.AssignCount}}</strong> </a> - <a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{.Link}}?type=created_by&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}"> + <a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{.Link}}?type=created_by&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}"> {{.locale.Tr "repo.issues.filter_type.created_by_you"}} <strong class="ui right">{{CountFmt .IssueStats.CreateCount}}</strong> </a> {{if .PageIsPulls}} - <a class="{{if eq .ViewType "review_requested"}}active{{end}} item" href="{{.Link}}?type=review_requested&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}"> + <a class="{{if eq .ViewType "review_requested"}}active{{end}} item" href="{{.Link}}?type=review_requested&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}"> {{.locale.Tr "repo.issues.filter_type.review_requested"}} <strong class="ui right">{{CountFmt .IssueStats.ReviewRequestedCount}}</strong> </a> - <a class="{{if eq .ViewType "reviewed_by"}}active{{end}} item" href="{{.Link}}?type=reviewed_by&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}"> + <a class="{{if eq .ViewType "reviewed_by"}}active{{end}} item" href="{{.Link}}?type=reviewed_by&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}"> {{.locale.Tr "repo.issues.filter_type.reviewed_by_you"}} <strong class="ui right">{{CountFmt .IssueStats.ReviewedCount}}</strong> </a> {{end}} - <a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{.Link}}?type=mentioned&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}"> + <a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{.Link}}?type=mentioned&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}"> {{.locale.Tr "repo.issues.filter_type.mentioning_you"}} <strong class="ui right">{{CountFmt .IssueStats.MentionCount}}</strong> </a> |