From 2c1aca7ffe628ab2a455fc7abf730b6d01d288ea Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 5 Sep 2011 11:16:08 +0200 Subject: [PATCH] fix aside contact block, add edit profiles icon --- boot.php | 9 +++++++++ view/contact_block.tpl | 10 ++++++---- view/profile_vcard.tpl | 6 +++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/boot.php b/boot.php index d7c00428fd..9826b3d8df 100644 --- a/boot.php +++ b/boot.php @@ -857,6 +857,14 @@ function profile_sidebar($profile, $block = 0) { if((remote_user()) && ($_SESSION['visitor_visiting'] == $profile['uid'])) $connect = False; + + // show edit to yourself + if ($profile['uid'] == local_user()) { + $profile['edit'] = array($a->get_baseurl(). 'profiles', t('Profiles'),"", t('Manage/edit profiles')); + } + + + if((x($profile,'address') == 1) || (x($profile,'locality') == 1) @@ -890,6 +898,7 @@ function profile_sidebar($profile, $block = 0) { $contact_block = contact_block(); } + $tpl = get_markup_template('profile_vcard.tpl'); $o .= replace_macros($tpl, array( diff --git a/view/contact_block.tpl b/view/contact_block.tpl index 00b97a6d88..eb46c6c43c 100644 --- a/view/contact_block.tpl +++ b/view/contact_block.tpl @@ -1,9 +1,11 @@ -

$contacts

+
+

$contacts

{{ if $micropro }} -
+ $viewcontacts +
{{ for $micropro as $m }} $m {{ endfor }} -
- +
{{ endif }} +
diff --git a/view/profile_vcard.tpl b/view/profile_vcard.tpl index 88111b0f14..08e2e2e3a0 100644 --- a/view/profile_vcard.tpl +++ b/view/profile_vcard.tpl @@ -1,6 +1,10 @@
-
$profile.name
+
+
$profile.name
+ {{ if $profile.edit }}$profile.edit.1{{ endif }} +
+ {{ if $pdesc }}
$profile.pdesc
{{ endif }}
$profile.name