X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fview_client.sh;h=0fe5e983c9ee7b11814c4a239ac19b49dfc9426d;hp=2cb124bb71a88fa6f4f76a1a757b2115beff31ae;hb=0dc31a9e7992c227b680180d3ceee031ac293169;hpb=786c12839c61826d4d06e2a2f62d1a3d8b7ea780
diff --git a/templates/view_client.sh b/templates/view_client.sh
index 2cb124b..0fe5e98 100755
--- a/templates/view_client.sh
+++ b/templates/view_client.sh
@@ -15,75 +15,91 @@
# You should have received a copy of the GNU Affero General Public License
# along with Confetti. If not, see .
-n=$(printf %s "$values[N]" \
- | sed -rn 's:^([^;]*)(\;[^;]*)(\;[^;]*)?(\;[^;]*)?(\;[^;]*)?$:\4 \2 \3 \1 \5:gp' \
- | sed -r 's:,: :;s:\;: :g;s: +: :g;s:^ $::;'
+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 '