jQuery 3.6.1.
[readifood.git] / lib / delivery.php
index 9cdd338..574094a 100644 (file)
     }
 
     if ($count > 1) {
-      echo "<div class=\"sortable\">\n";
+      echo "<h4>$count orders</h4>";
       echo "<p class=\"noprint\">Drag delivery details to reorder the schedule.</p>\n";
+      echo "<div class=\"sortable\">\n";
     }
+          else echo "<h4>1 order</h4>";
 
     foreach ($orders as $order) {
       $contact = get_contact_by_id($order->getBeneficiaryId());
       if (! $contact) continue;
 
-      echo "<span>\n";
+      echo "<div class=\"delivery\">";
 
       $phones = array();
       $area = get_contact_area($contact);
       }
       $area = get_address_area($address);
 
-      echo " in " . htmlspecialchars($area->getName()) . " at:<br>";
+      echo " in " . htmlspecialchars($area->getName()) . " at:";
       $city = get_area_city($area);
-      echo "\n<br>" . htmlspecialchars($address->getLine());
-      echo "\n<br>" . htmlspecialchars($city->getName());
-      echo "\n<br>" . htmlspecialchars($address->getPostcode());
-      if (count($phones)) echo "\n<br><br>Telephone <strong>" . implode(" or ", $phones) . "</strong>";
+      echo "\n" . htmlspecialchars($address->getLine());
+      echo ",\n" . htmlspecialchars($address->getPostcode());
+      if (count($phones)) echo ";\nTelephone <strong>" . implode(" or ", $phones) . "</strong>";
       echo "</p>\n";
 
       $notes = $order->getNotes();
       }
 
       echo "<hr>\n";
-      echo "</span>\n\n";
+      echo "</div>\n\n";
     }
 
     if ($count > 1) echo "</div>\n";