summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-03-26 18:10:35 +0100
committerMax Magorsch <arzano@gentoo.org>2020-03-26 18:10:35 +0100
commitf742473ad7a61e57842999a78f097adbba6cb091 (patch)
treedc940692bc7b6bfc2e662471b3dd7ba17d6d94f8
parentLimit the number of changed versions for the index page (diff)
downloadsoko-f742473ad7a61e57842999a78f097adbba6cb091.tar.gz
soko-f742473ad7a61e57842999a78f097adbba6cb091.tar.bz2
soko-f742473ad7a61e57842999a78f097adbba6cb091.zip
Fix the keywords in the version row
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r--pkg/config/config.go2
-rw-r--r--web/templates/packages/changedVersionRow.tmpl4
-rw-r--r--web/templates/packages/versionrow.tmpl6
3 files changed, 6 insertions, 6 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go
index 6f80c37..cb95c46 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -39,7 +39,7 @@ func LogFile() string {
}
func Version() string {
- return getEnv("SOKO_VERSION", "v0.1.5")
+ return getEnv("SOKO_VERSION", "v0.1.6")
}
func Port() string {
diff --git a/web/templates/packages/changedVersionRow.tmpl b/web/templates/packages/changedVersionRow.tmpl
index 2aeb3a6..ce93e7f 100644
--- a/web/templates/packages/changedVersionRow.tmpl
+++ b/web/templates/packages/changedVersionRow.tmpl
@@ -59,9 +59,9 @@
<p>
{{ $arches := mkSlice "amd64" "x86" "alpha" "arm" "arm64" "hppa" "ia64" "ppc" "ppc64" "sparc" }}
{{ range $arches }}
- {{if contains (print " " $.Keywords) (print " " .)}}
+ {{if contains (print " " $.Keywords " ") (print " " . " ")}}
<span class="label kk-keyword-stable" title="{{$.Version}} is testing on {{.}}">~{{.}}</span>
- {{else if contains $.Keywords (print "~" .)}}
+ {{else if contains (print " " $.Keywords " ") (print "~" . " ")}}
<span class="label kk-keyword-testing" title="{{$.Version}} is stable on {{.}}">{{.}}</span>
{{else}}
<span class="label kk-keyword-unknown" title="{{$.Version}} is unknown on {{.}}">?{{.}}</span>
diff --git a/web/templates/packages/versionrow.tmpl b/web/templates/packages/versionrow.tmpl
index f6a93f8..17018ca 100644
--- a/web/templates/packages/versionrow.tmpl
+++ b/web/templates/packages/versionrow.tmpl
@@ -13,7 +13,7 @@
{{ $arches := mkSlice "amd64" "x86" "alpha" "arm" "arm64" "hppa" "ia64" "ppc" "ppc64" "sparc" }}
{{ range $arches }}
- {{ if contains $.Keywords (print "~" .) }}
+ {{ if contains (print " " $.Keywords " ") (print "~" . " ") }}
{{ if ge (len $.Masks) 1 }}
<td class="kk-keyword kk-keyword-masked" title="{{$.Version}} is masked (testing) on {{.}}">
@@ -27,14 +27,14 @@
</td>
{{end}}
- {{ else if contains $.Keywords (print "-" .) }}
+ {{ else if contains (print " " $.Keywords " ") (print "-" . " ") }}
<td class="kk-keyword kk-keyword-unavailable" title="{{$.Version}} is unavailable on {{.}}">
<svg height="16" class="octicon octicon-diff-removed" viewBox="0 0 14 16" version="1.1" width="14" aria-hidden="true"><path fill-rule="evenodd" d="M13 1H1c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1zm0 13H1V2h12v12zm-2-5H3V7h8v2z"></path></svg>
<span class="sr-only">-{{.}}</span>
</td>
- {{ else if contains $.Keywords . }}
+ {{ else if contains (print " " $.Keywords " ") (print . " ") }}
{{ if ge (len $.Masks) 1 }}
<td class="kk-keyword kk-keyword-masked" title="{{$.Version}} is masked (stable) on {{.}}">