From 1220edd4dfdc76b80ee41a4ddc74756d572b009a Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Tue, 6 Dec 2011 22:33:20 +0100 Subject: [PATCH] Contacts: Add direct link to details of a contact --- apps/contacts/index.php | 4 ++-- apps/contacts/templates/index.php | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/contacts/index.php b/apps/contacts/index.php index e5098bb7a8b..de7b56dd1ae 100644 --- a/apps/contacts/index.php +++ b/apps/contacts/index.php @@ -66,9 +66,9 @@ foreach( $openaddressbooks as $addressbook ){ } usort($contacts,'contacts_namesort'); -$details = array(); -if( !is_null($id) || count($contacts)){ +$details = array(); +if( !is_null($id)/* || count($contacts)*/){ if(is_null($id)) $id = $contacts[0]['id']; $vcard = OC_Contacts_App::getContactVCard($id); $details = OC_Contacts_VCard::structureContact($vcard); diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php index 630dca41b2e..649c4807dd5 100644 --- a/apps/contacts/templates/index.php +++ b/apps/contacts/templates/index.php @@ -15,5 +15,12 @@ OC_Util::addStyle('contacts','formtastic');
- inc("part.addcardform"); ?> + inc("part.details"); + } + else{ + echo $this->inc("part.addcardform"); + } + ?>
-- 2.39.5