]> source.dussan.org Git - nextcloud-server.git/commitdiff
Contacts: Add direct link to details of a contact
authorBart Visscher <bartv@thisnet.nl>
Tue, 6 Dec 2011 21:33:20 +0000 (22:33 +0100)
committerBart Visscher <bartv@thisnet.nl>
Wed, 7 Dec 2011 19:40:59 +0000 (20:40 +0100)
apps/contacts/index.php
apps/contacts/templates/index.php

index e5098bb7a8bc4f3c8cc2e5275663667e742ce50b..de7b56dd1aea8a05446b0767174a8b9465370a03 100644 (file)
@@ -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);
index 630dca41b2e91eb126f19f59bd82ac61316dac77..649c4807dd5f71587022f9b990b25bb18bfd7076 100644 (file)
@@ -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>