X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=templates%2Fview_card.sh;h=13dbab782e817e53853e81343b31e2d88e043018;hb=15013eb0790a7935dc28b8ace6d5001122e400f1;hp=3319e07e188bdf2e0df64fec841c73f6524f8598;hpb=a81f06aa9030d86dd6e4b83eb9f33272be86db20;p=lobster
diff --git a/templates/view_card.sh b/templates/view_card.sh
index 3319e07..13dbab7 100755
--- a/templates/view_card.sh
+++ b/templates/view_card.sh
@@ -1,4 +1,4 @@
-# Copyright 2014 - 2016 Paul Hänsch
+# Copyright 2014 - 2017 Paul Hänsch
#
# This file is part of Confetti.
#
@@ -20,9 +20,18 @@ list_items(){
[ -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]})"
+ if [ -z "${values[$n]+x}" ]; then
+ break
+ else case "$item" in
+ EMAIL)
+ printf '%s\n' \
+ "$(attribsafe "${values[$n]}")" "$(htmlsafe "${values[$n]}")"
+ ;;
+ *)
+ printf '%s\n' \
+ "$item" "$(htmlsafe ${values[$n]})"
+ ;;
+ esac; fi
done
}
@@ -94,7 +103,10 @@ if [ "$PROFILE" = circus ]; then
cname="$(sed -rn 's:^SUMMARY\:(.*)$:\1:p' "$_DATA/ical/$each")"
printf ' %s' "$each" "$(htmlsafe $cname)"
done
- printf ''
+ printf ''
+ list_items CATEGORIES
+ printf ''
+
elif [ "$PROFILE" = medical ]; then
list_items ADR
list_items URL