diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index a76750e44..25fb15543 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1384,7 +1384,7 @@ issues.delete_branch_at = `deleted branch %s %s` issues.filter_label = Label issues.filter_label_exclude = `Use 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 diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index f5cec5a32..f243507c3 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/filters.tmpl b/templates/repo/issue/filters.tmpl index edc483d75..b75d98ed6 100644 --- a/templates/repo/issue/filters.tmpl +++ b/templates/repo/issue/filters.tmpl @@ -20,8 +20,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}} @@ -84,8 +84,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}}
@@ -141,8 +141,8 @@ {{svg "octicon-search" 16}}
- {{.locale.Tr "repo.issues.filter_assginee_no_assignee"}} - {{.locale.Tr "repo.issues.filter_assginee_no_select"}} + {{.locale.Tr "repo.issues.filter_assginee_no_select"}} + {{.locale.Tr "repo.issues.filter_assginee_no_assignee"}}
{{range .Assignees}}