X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fprescriptions.html.sh;h=a662c74b229346376b8155acd737a66739762e0e;hp=9a0dd480912145e0cf6e5f7f79b77c52c3fc2187;hb=33a8e0e8967077bb2aa63b4bea706dc61d3e42d8;hpb=18ecf2c0b034e25c418a83ecb1adefb9f3f04cd8 diff --git a/templates/prescriptions.html.sh b/templates/prescriptions.html.sh index 9a0dd48..a662c74 100755 --- a/templates/prescriptions.html.sh +++ b/templates/prescriptions.html.sh @@ -15,17 +15,15 @@ # You should have received a copy of the GNU Affero General Public License # along with Confetti. If not, see . -edit="${_GET[edit]}" client="${_GET[client]}" -[ -z "$client" ] && client="${edit%.*.mpx}.vcf" +edit="${_GET[edit]}" +[ -n "$edit" ] && client="${edit%.*.mpx}.vcf" cat <$(view_card "$client") -

$(l10n prescriptions_current)

- -${edit:+$(edit_prescription "$edit")} +
@@ -34,13 +32,17 @@ ${edit:+$(edit_prescription "$edit")}
+$(list_prescriptions "$client" |grep -q "$edit" || edit_prescription "$edit") + $(list_prescriptions "$client" \ |while read pre; do - view_prescription "$pre" + [ "$pre" = "$edit" ] \ + && edit_prescription "$pre" \ + || view_prescription "$pre" done ) -

$(l10n prescriptions_past)

+ EOF