X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fprescriptions.html.sh;h=c4ef19addc060da015f8db7c6954aaebd23a38f1;hp=a3db3a7d879157a24982c309ca357f5f2d58a76e;hb=1c7bba82f5b6bc81fdedb9e4907019462982a749;hpb=afdc06688cc51a168011da48adbafcba238d3ae1 diff --git a/templates/prescriptions.html.sh b/templates/prescriptions.html.sh index a3db3a7..c4ef19a 100755 --- a/templates/prescriptions.html.sh +++ b/templates/prescriptions.html.sh @@ -25,22 +25,23 @@ cat <$(l10n prescriptions_current) -${edit:+$(edit_prescription "$edit")}
+EOF -$(list_prescriptions "$client" \ - |while read pre; do - [ "$pre" = "$edit" ] || view_prescription "$pre" - done -) +list_prescriptions "$client" |grep -q "$edit" || edit_prescription "$edit" - +list_prescriptions "$client" \ +|while read pre; do + [ "$pre" = "$edit" ] \ + && edit_prescription "$pre" \ + || view_prescription "$pre" +done -EOF +# # vi:set filetype=html: