diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-12-06 22:33:20 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-12-07 20:40:59 +0100 |
commit | 1220edd4dfdc76b80ee41a4ddc74756d572b009a (patch) | |
tree | 5e67a03bd34827cf64c65c1ca8adbe99822cb406 /apps | |
parent | 36abf22a488b87096897a8748bbd2917321061c4 (diff) | |
download | nextcloud-server-1220edd4dfdc76b80ee41a4ddc74756d572b009a.tar.gz nextcloud-server-1220edd4dfdc76b80ee41a4ddc74756d572b009a.zip |
Contacts: Add direct link to details of a contact
Diffstat (limited to 'apps')
-rw-r--r-- | apps/contacts/index.php | 4 | ||||
-rw-r--r-- | 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'); </ul> </div> <div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>"> - <?php echo $this->inc("part.addcardform"); ?> + <?php + if ($_['id']){ + echo $this->inc("part.details"); + } + else{ + echo $this->inc("part.addcardform"); + } + ?> </div> |