git://git.iain.cx/iain
/
readifood.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into uat
[readifood.git]
/
lib
/
functions.php
diff --git
a/lib/functions.php
b/lib/functions.php
index
2b35663
..
73ea464
100644
(file)
--- a/
lib/functions.php
+++ b/
lib/functions.php
@@
-277,7
+277,10
@@
}
function get_order_summary($order) {
}
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 = "<strong>" . ucfirst(get_order_state_string($order_state)) . "</strong> order ";
+ $ret .= $order->getStrongLink($order->getId()) . ": " . get_order_displayname($order);
if (check_admin(1)) $ret .= " " . $order->getDeleteLink();
if (check_admin(1)) $ret .= " " . $order->getDeleteLink();
@@
-314,6
+317,13
@@
return $q->findOneById($address->getAreaId());
}
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());
function get_contact_address($contact) {
$q = new AddressQuery;
return $q->findOneById($contact->getAddressId());