From 2aad62190fd2c0d85e636d01b7e6607a2510906b Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 22 Oct 2015 22:48:49 +0200 Subject: [PATCH] template rework: use viewcontact_template.tpl also for directory --- mod/directory.php | 8 ++++---- view/templates/contact_template.tpl | 2 ++ view/templates/directory_header.tpl | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mod/directory.php b/mod/directory.php index 46c4f38ad3..8ed4c22007 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -155,9 +155,9 @@ function directory_content(&$a) { $entry = array( 'id' => $rr['id'], - 'profile_link' => $profile_link, - 'photo' => proxy_url($a->get_cached_avatar_image($rr[$photo]), false, PROXY_SIZE_THUMB), - 'alt_text' => $rr['name'], + 'url' => $profile_link, + 'thumb' => proxy_url($a->get_cached_avatar_image($rr[$photo]), false, PROXY_SIZE_THUMB), + 'img_hover' => $rr['name'], 'name' => $rr['name'], 'details' => $pdesc . $details, 'page_type' => $page_type, @@ -192,7 +192,7 @@ function directory_content(&$a) { '$globaldir' => t('Global Directory'), '$gdirpath' => $gdirpath, '$desc' => t('Find on this site'), - '$entries' => $entries, + '$contacts' => $entries, '$finding' => t('Finding:'), '$findterm' => (strlen($search) ? $search : ""), '$title' => t('Site Directory'), diff --git a/view/templates/contact_template.tpl b/view/templates/contact_template.tpl index 4e8c04297d..39502c91af 100644 --- a/view/templates/contact_template.tpl +++ b/view/templates/contact_template.tpl @@ -1,3 +1,5 @@ +{{* todo: better layout and implement $contact.details and other variables *}} +
diff --git a/view/templates/directory_header.tpl b/view/templates/directory_header.tpl index eda887a898..46f17de40e 100644 --- a/view/templates/directory_header.tpl +++ b/view/templates/directory_header.tpl @@ -22,8 +22,8 @@
-{{foreach $entries as $entry}} - {{include file="directory_item.tpl"}} +{{foreach $contacts as $contact}} + {{include file="contact_template.tpl"}} {{/foreach}}