diff options
author | yp05327 <576951401@qq.com> | 2023-07-26 22:00:50 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 13:00:50 +0000 |
commit | 1c6c38fa6eae2efd35d38b78385d37fba92a93e2 (patch) | |
tree | df37d687f6f441e0e85656c7e06eda8c0c51638a /routers | |
parent | f9e5d980bc06c23f81873e245bc75e98dfcbf0bc (diff) | |
download | gitea-1c6c38fa6eae2efd35d38b78385d37fba92a93e2.tar.gz gitea-1c6c38fa6eae2efd35d38b78385d37fba92a93e2.zip |
Improve display of Labels/Projects/Assignees sort options (#25886)
Labels:
Before: (no highlights)
![image](https://github.com/go-gitea/gitea/assets/18380374/88ffbff0-1b14-4d93-810d-f2ce2b2d7321)
After:
![image](https://github.com/go-gitea/gitea/assets/18380374/ab7b665b-d17c-4acd-a681-64cbb67ae460)
![image](https://github.com/go-gitea/gitea/assets/18380374/19f8a0d0-ad5f-4dbf-b45a-1001e60a8399)
Projects:
Before: (no highlights)
![image](https://github.com/go-gitea/gitea/assets/18380374/2079e6a8-8801-4662-acda-e248f115462f)
After:
![image](https://github.com/go-gitea/gitea/assets/18380374/7180a086-68be-49c4-bb29-3d05454fb41d)
![image](https://github.com/go-gitea/gitea/assets/18380374/3c5a791f-1852-4957-89b8-10940c672e10)
Assignee:
Before: (no highlights)
![image](https://github.com/go-gitea/gitea/assets/18380374/09273636-d9b1-4144-9533-2ce66cab8c49)
After:
![image](https://github.com/go-gitea/gitea/assets/18380374/24bd0cfe-b589-4c8a-be67-74f242dda6d3)
![image](https://github.com/go-gitea/gitea/assets/18380374/7476be73-5201-4330-82e2-44b0b5080f71)
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/issue.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index f5cec5a323..f243507c33 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -174,7 +174,11 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti // 0 means issues with no label // blank means labels will not be filtered for issues selectLabels := ctx.FormString("labels") - if len(selectLabels) > 0 { + if selectLabels == "" { + ctx.Data["AllLabels"] = true + } else if selectLabels == "0" { + ctx.Data["NoLabel"] = true + } else if len(selectLabels) > 0 { labelIDs, err = base.StringsToInt64s(strings.Split(selectLabels, ",")) if err != nil { ctx.ServerError("StringsToInt64s", err) |