1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Contacts: Add direct link to details of a contact

This commit is contained in:
Bart Visscher 2011-12-06 22:33:20 +01:00
parent 44f54485ac
commit e91bb2d46e
2 changed files with 10 additions and 3 deletions

View 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);

View 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>