From d650b6e641f7deaf25dcc04a0d37f8d586bc38f8 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Fri, 14 Jul 2023 07:46:42 +0000 Subject: [PATCH 1/5] improve labels --- routers/web/repo/issue.go | 6 +++++- templates/repo/issue/list.tmpl | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 317f762fb1a21..ae5f3fa59219d 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) diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index c7d73c6667405..74798118b615f 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -103,8 +103,8 @@ {{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}
- {{.locale.Tr "repo.issues.filter_label_select_no_label"}} - {{.locale.Tr "repo.issues.filter_label_no_select"}} + {{.locale.Tr "repo.issues.filter_label_no_select"}} + {{.locale.Tr "repo.issues.filter_label_select_no_label"}} {{$previousExclusiveScope := "_no_scope"}} {{range .Labels}} {{$exclusiveScope := .ExclusiveScope}} From d422d3ec92916bb282bb10adfaf70b70a98bdf66 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Fri, 14 Jul 2023 07:51:06 +0000 Subject: [PATCH 2/5] improve projects --- templates/repo/issue/list.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 74798118b615f..c828d12a98561 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -165,8 +165,8 @@ {{svg "octicon-search" 16}} - {{.locale.Tr "repo.issues.filter_project_all"}} - {{.locale.Tr "repo.issues.filter_project_none"}} + {{.locale.Tr "repo.issues.filter_project_all"}} + {{.locale.Tr "repo.issues.filter_project_none"}} {{if .OpenProjects}}alt
+ click/enter
to exclude labels`
issues.filter_label_no_select = All labels
-issues.filter_label_select_no_label = No Label
+issues.filter_label_select_no_label = No label
issues.filter_milestone = Milestone
issues.filter_milestone_all = All milestones
issues.filter_milestone_none = No milestones
From 6b361b3ce3187af35bacadd69737ff12e60290a4 Mon Sep 17 00:00:00 2001
From: yp05327 <576951401@qq.com>
Date: Fri, 14 Jul 2023 07:52:37 +0000
Subject: [PATCH 4/5] improve assignee
---
templates/repo/issue/list.tmpl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index c828d12a98561..a4846f1ce6f69 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -222,8 +222,8 @@
{{svg "octicon-search" 16}}