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)

After:


Projects:
Before: (no highlights)

After:


Assignee:
Before: (no highlights)

After:


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) |