X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=cards%2Fwidgets.sh;h=8be5cdec305c2f20679d34414f0c98135cc0b607;hb=e02d0ff1d16d508b9d8091e313cf8eecf77a8d35;hp=b0d188cabb06b90c9bc77ae0ca5d436480836e03;hpb=ddb4d16fb5108aa0af5e53322974b0c0f26ac408;p=lobster diff --git a/cards/widgets.sh b/cards/widgets.sh index b0d188c..8be5cde 100755 --- a/cards/widgets.sh +++ b/cards/widgets.sh @@ -137,7 +137,9 @@ card_item(){ printf '[h3 %s]' "$(l10n therapies)" (cd "$_DATA/therapies/"; printf '%s\n' "${client}".*.tpy) \ | while read tpyfile; do - [ "$tpyfile" = "${client}.*.tpy" ] && break + [ "$tpyfile" = "${client}.*.tpy" ] \ + && printf '[a .item .therapy href="/therapies/%s/new" . +]' "${client}" \ + && break tpy="${tpyfile%.tpy}"; tpydates="$(sed -En 's;^session[0-9]+_date:;;p;' "$_DATA/therapies/$tpyfile" \ | sort \ @@ -146,7 +148,6 @@ card_item(){ printf '[a .item .therapy href="/therapies/%s" . %s] ' \ "${tpy%.*}/${tpy#*.}" "$(HTML "${tpydates:--}")" done |sort -n - printf '[a .item .therapy href="/therapies/%s/new" . +]' "${client}" ;; *)[ $cnt -gt 0 ] && printf '[h3 %s]' "$(l10n "$item")" shy="$(printf '\302\255')"