]> git.plutz.net Git - lobster/commitdiff
button for new therapy
authorPaul Hänsch <paul@plutz.net>
Thu, 9 Jan 2020 03:03:56 +0000 (04:03 +0100)
committerPaul Hänsch <paul@plutz.net>
Thu, 9 Jan 2020 03:03:56 +0000 (04:03 +0100)
cards/cards.css
cards/widgets.sh

index 6349f8afe55d002923ada6ac3f9d145c6d325004..c227c601e3bda5e51cda9a2f789b8c489867a6f7 100644 (file)
 
 .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;
index ac04d9f74066638940ad93fbe2f8f5509f78ee87..c0ecfb09e5bf78019189325443c320382ab57bca 100755 (executable)
@@ -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')"