X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Ffunctions.php;h=73ea46443743007dd483b8a2d5d80bc6dd888516;hb=47051a8cfc285b2324230d620c7ddb41cd61c00c;hp=2b35663b66097a8c6613d996943c333abed052e0;hpb=7840fb6e5f99fcc6c9b25e05c6f40d73137f6d79;p=readifood.git diff --git a/lib/functions.php b/lib/functions.php index 2b35663..73ea464 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -277,7 +277,10 @@ } function get_order_summary($order) { - $ret = "Order " . $order->getStrongLink($order->getId()) . ": " . get_order_displayname($order); + $ret = "Order "; + $order_state = get_order_state($order); + if ($order_state) $ret = "" . ucfirst(get_order_state_string($order_state)) . " order "; + $ret .= $order->getStrongLink($order->getId()) . ": " . get_order_displayname($order); if (check_admin(1)) $ret .= " " . $order->getDeleteLink(); @@ -314,6 +317,13 @@ return $q->findOneById($address->getAreaId()); } + function get_address_map_link($address) { + $postcode = trim($address->getPostcode()); + if ($postcode) { + return " " . get_small_link("Map", "http://maps.google.co.uk/maps?q=" . urlencode($postcode)); + } + } + function get_contact_address($contact) { $q = new AddressQuery; return $q->findOneById($contact->getAddressId());