X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Fcontact.php;h=3dd0fc3f5b1501151fcac5b73459e4f0b6c7c70f;hb=7910a9551304a4789ba1fde0c85eeaf5bb21003b;hp=ccfcd48a349afcbb0f5c21488bb18985669808f3;hpb=b0b9828b27e140f88fb0b7867388376b329959cc;p=readifood.git
diff --git a/lib/contact.php b/lib/contact.php
index ccfcd48..3dd0fc3 100644
--- a/lib/contact.php
+++ b/lib/contact.php
@@ -44,8 +44,9 @@
exit;
}
- function show_contact_summary(&$contact) {
- echo "
\nContact " . $contact->getLink();
+ function show_contact_summary(&$contact, $editing = false) {
+ if ($editing) echo "
Contact: " . htmlspecialchars($contact->getDisplayname()) . "";
+ else echo "
\nContact " . $contact->getStrongLink();
$role = $contact->getRole();
$role_string = get_contact_role_string($contact);
if ($role_string) echo " $role_string";
@@ -57,6 +58,8 @@
}
$area = get_contact_area($contact);
echo " in " . $area->getLink();
+ $city = get_contact_city($contact);
+ echo ", " . $city->getLink(get_city_displayname($city));
}
function show_contacts($offset, $per_page, $address_ids) {
@@ -167,17 +170,11 @@
}
function show_contact_role_form($role) {
- global $roles;
-
- for ($i = 0; $i < count($roles); $i++) {
- echo " $roles[$i]\n";
- }
+ return show_role_form($role, $GLOBALS['contact_roles']);
}
function show_contact_form($contact = null) {
- global $roles;
+ global $contact_roles;
if (! $contact) $contact = new Contact;
@@ -253,6 +250,12 @@
}
echo " \n";
echo "\n";
+
+ /* Notes. */
+ echo "