X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;ds=inline;f=lib%2Fcontact.php;h=98340b8ce095b845acfbecc989e9d4c20a649218;hb=d11f3b9f2da834281ab505d371d4b23bae80251a;hp=166fd9784b98ca8a5d84f5c443dcea8fc17b8afc;hpb=8549c1776033e924ea50328bd2434529d85b5669;p=readifood.git
diff --git a/lib/contact.php b/lib/contact.php
index 166fd97..98340b8 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) {
@@ -170,7 +173,7 @@
return show_role_form($role, $GLOBALS['contact_roles']);
}
- function show_contact_form($contact = null) {
+ function show_contact_form($contact = null, $new = false) {
global $contact_roles;
if (! $contact) $contact = new Contact;
@@ -181,6 +184,14 @@
echo "
Add a new contact:
\n"; echo ""; submit("add_contact", "Add"); echo " |