]> git.plutz.net Git - confetti/blobdiff - templates/prescriptions.html.sh
reduced latency, sticky note in therapy view
[confetti] / templates / prescriptions.html.sh
index a3db3a7d879157a24982c309ca357f5f2d58a76e..c4ef19addc060da015f8db7c6954aaebd23a38f1 100755 (executable)
@@ -25,22 +25,23 @@ cat <<EOF
 
 <!--h1>$(l10n prescriptions_current)</h1-->
 
-${edit:+$(edit_prescription "$edit")}
 <div class="newprescription">
   <form action="?action=new_prescription" method="POST">
     <input type="hidden" name="client" value="$client">
     <button type="submit">$(l10n newprescription)</button>
   </form>
 </div>
+EOF
 
-$(list_prescriptions "$client" \
-  |while read pre; do 
-    [ "$pre" = "$edit" ] || view_prescription "$pre"
-  done
-)
+list_prescriptions "$client" |grep -q "$edit" || edit_prescription "$edit"
 
-<!--h1>$(l10n prescriptions_past)</h1-->
+list_prescriptions "$client" \
+|while read pre; do 
+  [ "$pre" = "$edit" ] \
+  && edit_prescription "$pre" \
+  || view_prescription "$pre"
+done
 
-EOF
+#<!--h1>$(l10n prescriptions_past)</h1-->
 
 # vi:set filetype=html: