]> git.plutz.net Git - lobster/blobdiff - therapies/page.sh
redirect default path / to /cards/
[lobster] / therapies / page.sh
index 4c236c4c161f54f71c76eafeee201cb251bdb9eb..2f0136ba25f9cfa8f8641fbe7a009965e5d2a049 100755 (executable)
@@ -93,7 +93,7 @@ cat <<EOF
 [h1 $(l10n therapy)]
 
 [div .patient
-  [h2 . [a "/cards/#{id%.*}.vcf" &#x2b05; $(VCF FN |HTML)]]
+  [h2 . [a "/cards/#${id%.*}.vcf" &#x2b05; $(VCF FN |HTML)]]
 ]
 
 [div .therapies
@@ -108,14 +108,15 @@ cat <<EOF
                 | 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