From: Paul Hänsch Date: Thu, 9 Jan 2020 03:06:14 +0000 (+0100) Subject: function and ui for adding new therapy X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=6a48f4094cf2b0757c9fb5913739dc43e3f589b9;p=lobster function and ui for adding new therapy --- diff --git a/therapies/index.cgi b/therapies/index.cgi index 62b621d..f142d21 100755 --- a/therapies/index.cgi +++ b/therapies/index.cgi @@ -30,12 +30,21 @@ case "$_PATH" in 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ÄÖÜÉ;; ' diff --git a/therapies/page.sh b/therapies/page.sh index 4c236c4..2f0136b 100755 --- a/therapies/page.sh +++ b/therapies/page.sh @@ -93,7 +93,7 @@ cat < 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 {