fi
return 0
;;
+ /therapies/*/new)
+ card="${_PATH#/therapies/}"
+ card="${card%/new}"
+ uid="$(timeid)$(randomid)"
+ if [ -f "${_DATA}/vcard/${card}.vcf" ]; then
+ touch "${_DATA}/therapies/${card}.${uid}.tpy"
+ rm -f "${_DATA}/cache/${card}.vcf.cache"
+ REDIRECT "/therapies/${card}/${uid}"
+ fi
+ return 0
+ ;;
esac
. $_EXEC/pdiread.sh
. $_EXEC/therapies/l10n.sh
-# . $_EXEC/cards/widgets.sh
-# . $_EXEC/cards/list.sh
# unescape() { [ $# = 0 ] && sed -E 's;\\(.);\1;g' || printf %s "$*" |sed -E 's;\\(.);\1;g'; }
# upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; '
[h1 $(l10n therapy)]
[div .patient
- [h2 . [a "/cards/#{id%.*}.vcf" ⬅ $(VCF FN |HTML)]]
+ [h2 . [a "/cards/#${id%.*}.vcf" ⬅ $(VCF FN |HTML)]]
]
[div .therapies
| sed -E ':X;N;$!bX; s;^[\n ]+;;; s;[\n ]+$;;; s;(\n.*\n|\n); - ;;'
)"
if [ "${tpy%.*}.${tpy#*.}" = "${id}" ]; then
- printf '[a .item .therapy .current href="/therapies/%s" . %s]' \
+ printf '[a .item .therapy .current href="/therapies/%s" . %s] ' \
"${tpy%.*}/${tpy#*.}" "$(HTML "${tpydates:--}")"
else
- printf '[a .item .therapy href="/therapies/%s" . %s]' \
+ printf '[a .item .therapy href="/therapies/%s" . %s] ' \
"${tpy%.*}/${tpy#*.}" "$(HTML "${tpydates:--}")"
fi
- done |sort -r
+ done |sort -n
)
+ [a .item .therapy href="/therapies/${id%%.*}/new" . +]
]
EOF
div.therapies > a {
display: inline-block;
+ text-decoration: none;
border: 1px solid black;
- margin: .5em .5em 0 0; padding: .25em .5em;
+ margin-top: .5em; padding: .25em .5em;
background-color: #DDF;
color: #000;
}
div.therapies > a.current {
- background-color: #CCF;
+ background-color: #AAF;
}
div.prescription {