X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Ftherapy.html.sh;h=84f9cbe81595654dbee001f38898a5649841b737;hp=ce97dfb0ea959f6ae1ddef33dd5e2eea34e92b17;hb=ef6500444e74092cf8ec5dda12b7ce20e3f4234f;hpb=9f7782b085e44a2ecb656674f48be0e2b20fc31c diff --git a/templates/therapy.html.sh b/templates/therapy.html.sh index ce97dfb..84f9cbe 100755 --- a/templates/therapy.html.sh +++ b/templates/therapy.html.sh @@ -64,24 +64,32 @@ t_session(){ unset sigcheck fi -cat < - - -
- - $( for n in {1..50}; do t_session_note $session_n $n; done ) - - -
-EOF + cat <<-EOF + + + +
+ + $(n=1; + while [ -n "${tpy[session${session_n}_note${n}]+x}" ]; do + if [ -n "${tpy[session${session_n}_note${n}]}" ]; then + x=$n + fi + n=$(($n + 1)) + done + for n in $(seq 1 $((${x:-0} + 3)) ); do t_session_note $session_n $n; done + ) + + +
+ EOF } therapy_sessions(){ @@ -92,15 +100,15 @@ therapy_sessions(){ sid=session$n -cat < - - - -EOF + cat <<-EOF +
+ + +
+ EOF } unset c0 c1 c2 c3 c4 c5 c6 c7 @@ -154,9 +162,13 @@ cat < } + + + +
${mpx[indicator_reading]}
-
+ @@ -166,6 +178,10 @@ cat <$(l10n save) + +