X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=templates%2Fview_attendee.sh;h=10cb06e764d9b2219665db638fd0c820fa20bf95;hb=0dc31a9e7992c227b680180d3ceee031ac293169;hp=5966729e01611df62bb78485d186cf8ecefd1b0d;hpb=70c5786a6b3dd9c6561e2f19f2827ce92191c13f;p=lobster
diff --git a/templates/view_attendee.sh b/templates/view_attendee.sh
index 5966729..10cb06e 100755
--- a/templates/view_attendee.sh
+++ b/templates/view_attendee.sh
@@ -1,4 +1,4 @@
-# Copyright 2014, 2015 Paul Hänsch
+# Copyright 2014 - 2016 Paul Hänsch
#
# This file is part of Confetti.
#
@@ -15,71 +15,119 @@
# You should have received a copy of the GNU Affero General Public License
# along with Confetti. If not, see .
+list_items(){
+ item="$1"
+ [ -n "${values[$item]+x}" ] && \
+ printf '
%s
\n' "$(l10n $item)"
+ for n in "$item" "$item"{0..100}; do
+ [ -z "${values[$n]+x}" ] && break \
+ || printf '%s\n' \
+ "$item" "$(htmlsafe ${values[$n]})"
+ done
+}
+
+list_section(){
+ printf '
' "$1"
+ shift 1
+ for each in $@; do
+ list_items "$each"
+ done
+ printf '