Use a single function to create the template data for contacts
This commit is contained in:
parent
c260471de1
commit
91b0f2c486
6 changed files with 34 additions and 152 deletions
|
@ -93,21 +93,7 @@ function suggest_content(App $a)
|
|||
$entries = [];
|
||||
|
||||
foreach ($contacts as $contact) {
|
||||
$entry = [
|
||||
'url' => Contact::magicLink($contact['url']),
|
||||
'itemurl' => $contact['addr'] ?: $contact['url'],
|
||||
'name' => $contact['name'],
|
||||
'thumb' => Contact::getThumb($contact),
|
||||
'img_hover' => $contact['url'],
|
||||
'details' => $contact['location'],
|
||||
'tags' => $contact['keywords'],
|
||||
'about' => $contact['about'],
|
||||
'account_type' => Contact::getAccountType($contact),
|
||||
'network' => ContactSelector::networkToName($contact['network'], $contact['url']),
|
||||
'photo_menu' => Contact::photoMenu($contact),
|
||||
'id' => ++$id,
|
||||
];
|
||||
$entries[] = $entry;
|
||||
$entries[] = Contact::getTemplateData($contact, ++$id);
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue