diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 81ab13980a48..7404d046fefd 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -239,6 +239,14 @@ func NewFuncMap() []template.FuncMap { "MirrorFullAddress": mirror_service.AddressNoCredentials, "MirrorUserName": mirror_service.Username, "MirrorPassword": mirror_service.Password, + "contain": func(s []int64, id int64) bool { + for i := 0; i < len(s); i++ { + if s[i] == id { + return true + } + } + return false + }, }} } diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 16a049c7aa6d..40e3b140ec21 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -261,7 +261,8 @@ func issues(ctx *context.Context, milestoneID int64, isPullOption util.OptionalB } ctx.Data["IssueStats"] = issueStats - ctx.Data["SelectLabels"] = com.StrTo(selectLabels).MustInt64() + ctx.Data["SelLabelIDs"] = labelIDs + ctx.Data["SelectLabels"] = selectLabels ctx.Data["ViewType"] = viewType ctx.Data["SortType"] = sortType ctx.Data["MilestoneID"] = milestoneID diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 6af831131326..5572df671e26 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -154,7 +154,7 @@
diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index 889cd2c2f671..f5c6e1733101 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -60,7 +60,7 @@ @@ -148,7 +148,7 @@