while read cardfile; do
cachefile="${_DATA}/cache/${cardfile##*/}.cache"
- # if [ -s "$cachefile" -a "$cachefile" -nt "$cardfile" \
- # -a "$cachefile" -nt "${_EXEC}/cards" ]; then
if [ -s "$cachefile" -a "$cachefile" -nt "$cardfile" ]; then
cat "$cachefile"
else
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 \
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')"