X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Forder.php;h=95d96bb859e0db9a908779aafd3b5fe9aae8a6a8;hb=46a6490756496e873962e54db2ad1b68921cd3c8;hp=38a235aa28cf91e5636f49282ddd3a2ac9426454;hpb=6bd4ad3daf2cc870d96a3fed9ea9caf6798d2b78;p=readifood.git diff --git a/lib/order.php b/lib/order.php index 38a235a..95d96bb 100644 --- a/lib/order.php +++ b/lib/order.php @@ -239,7 +239,10 @@ foreach ($contacts as $contact) { option("requester_id", $contact->getId(), $contact->getDisplayname(), $order->getRequesterId()); } - echo "\n"; + echo ""; + $contact = get_contact_by_id($order->getRequesterId(), false); + if ($contact) echo " " . get_small_link($contact->getDisplayname(), $contact->getURL()); + echo "\n"; echo "\n"; /* Beneficiary. */ @@ -257,7 +260,10 @@ option("beneficiary_id", $contact->getId(), $contact->getDisplayname(), $order->getBeneficiaryId()); } } - echo "\n"; + echo ""; + $contact = get_contact_by_id($order->getBeneficiaryId(), false); + if ($contact) echo " " . get_small_link($contact->getDisplayname(), $contact->getURL()); + echo "\n"; echo "\n"; /* Hub. */ @@ -269,7 +275,10 @@ foreach ($hubs as $hub) { option("hub_id", $hub->getId(), $hub->getDisplayname(), $order->getHubId()); } - echo "\n"; + echo ""; + $hub = get_hub_by_id($order->getHubId(), false); + if ($hub) echo " " . get_small_link($hub->getDisplayname(), $hub->getURL()); + echo "\n"; echo "\n"; /* Parcel type. */ @@ -305,7 +314,10 @@ foreach ($contacts as $contact) { option("driver_id", $contact->getId(), $contact->getDisplayname(), $driver_id); } - echo "\n"; + echo ""; + $contact = get_contact_by_id($driver_id, false); + if ($contact) echo " " . get_small_link($contact->getDisplayname(), $contact->getURL()); + echo "\n"; } else echo " No drivers!\n"; echo "\n"; @@ -520,6 +532,7 @@ if (! count($order_states)) return; echo "

Order history

\n"; + echo "

\n"; foreach ($order_states as $order_state) { $date = $order_state->getUpdated(); @@ -540,10 +553,11 @@ } } #$state = $states[$order_state->getState()]; - echo "

$username changed order to state $state"; + echo "$username changed order to state $state"; if ($driver) echo " for driver " . $driver->getDisplayname(); - echo " on $date.

\n"; + echo " on $date.
\n"; } + echo "

\n"; } function show_order(&$id = null) {