From 9e70b989932e52846586a2b9043124a826cd6341 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 9 Jan 2020 04:03:56 +0100 Subject: [PATCH] button for new therapy --- cards/cards.css | 10 ++++++++++ cards/widgets.sh | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cards/cards.css b/cards/cards.css index 6349f8a..c227c60 100644 --- a/cards/cards.css +++ b/cards/cards.css @@ -255,6 +255,16 @@ .card .section.prescriptions { width: 40ex;} +.card .section.therapies a.therapy { + display: inline-block; + padding: .25em .5em; + margin-bottom: .25em; + color: #000; + text-decoration: none; + background-color: #DDF; + border: 1px solid black; +} + form.card input.delete { display: none; } form.card input.delete + label { display: inline-block; diff --git a/cards/widgets.sh b/cards/widgets.sh index ac04d9f..c0ecfb0 100755 --- a/cards/widgets.sh +++ b/cards/widgets.sh @@ -143,9 +143,10 @@ card_item(){ | sort \ | sed -E ':X;N;$!bX; s;^[\n ]+;;; s;[\n ]+$;;; s;(\n.*\n|\n); - ;;' )" - printf '[a .item .therapy href="/therapies/%s" . %s %s]' \ - "${tpy%.*}/${tpy#*.}" "$(l10n therapy)" "$(HTML "${tpydates:--}")" - done |sort -r + 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')" -- 2.39.2