summaryrefslogtreecommitdiffstats
path: root/modules/templates/helper.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-12-28 22:43:46 +0800
committerzeripath <art27@cantab.net>2019-12-28 14:43:46 +0000
commited67bbe4442cc26fc64102c04d6fbea348f52e7c (patch)
tree3fcd6b83162867ae5f206941fd01d138827b8822 /modules/templates/helper.go
parent1ea447aedf50f8340a67ed1705ec145d30385c9d (diff)
downloadgitea-ed67bbe4442cc26fc64102c04d6fbea348f52e7c.tar.gz
gitea-ed67bbe4442cc26fc64102c04d6fbea348f52e7c.zip
Fix repository issues pagination bug when there are more than one label filter (#9512)
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r--modules/templates/helper.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index deaa9526be..c3c92f856b 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -269,6 +269,14 @@ func NewFuncMap() []template.FuncMap {
return ""
}
},
+ "contain": func(s []int64, id int64) bool {
+ for i := 0; i < len(s); i++ {
+ if s[i] == id {
+ return true
+ }
+ }
+ return false
+ },
}}
}