From 608ba10eecb1f5c02eb41b288d2af5ce2de3f4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Sun, 14 Apr 2019 23:19:25 +0200 Subject: sklad: show the number of members of each series --- cmd/sklad/series.tmpl | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'cmd/sklad/series.tmpl') diff --git a/cmd/sklad/series.tmpl b/cmd/sklad/series.tmpl index 4956e3a..01e2539 100644 --- a/cmd/sklad/series.tmpl +++ b/cmd/sklad/series.tmpl @@ -21,15 +21,24 @@ -{{ range $prefix, $desc := .AllSeries }} +{{ range .AllSeries }}
-

{{ $prefix }}

-
- {{ .Prefix }} +{{ with $count := len .Containers }} +{{ if eq $count 1 }} +

{{ $count }} obal +{{ else if and (ge $count 2) (le $count 4) }} +

{{ $count }} obaly +{{ else if gt $count 0 }} +

{{ $count }} obalů +{{ end }} +{{ end }} + +

-
+
-- cgit v1.2.3