Contacts: Add direct link to details of a contact
This commit is contained in:
parent
36abf22a48
commit
1220edd4df
|
@ -66,9 +66,9 @@ foreach( $openaddressbooks as $addressbook ){
|
||||||
}
|
}
|
||||||
|
|
||||||
usort($contacts,'contacts_namesort');
|
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'];
|
if(is_null($id)) $id = $contacts[0]['id'];
|
||||||
$vcard = OC_Contacts_App::getContactVCard($id);
|
$vcard = OC_Contacts_App::getContactVCard($id);
|
||||||
$details = OC_Contacts_VCard::structureContact($vcard);
|
$details = OC_Contacts_VCard::structureContact($vcard);
|
||||||
|
|
|
@ -15,5 +15,12 @@ OC_Util::addStyle('contacts','formtastic');
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>">
|
<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>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue