X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=templates%2Fview_client.sh;h=0fe5e983c9ee7b11814c4a239ac19b49dfc9426d;hb=0dc31a9e7992c227b680180d3ceee031ac293169;hp=c83fac9fd18f966cc396eae2422e8a1500a99237;hpb=9b13f7013dd882029ab3cf106d659a48243d910d;p=lobster
diff --git a/templates/view_client.sh b/templates/view_client.sh
index c83fac9..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 '