move 'Connect' button to local chanview page, remove from remote profile pages - still requires some theming love

This commit is contained in:
friendica 2012-12-06 19:44:13 -08:00
parent 8f864ebd19
commit 2a7a5b2d01
4 changed files with 26 additions and 18 deletions

View file

@ -1334,12 +1334,6 @@ if(! function_exists('profile_sidebar')) {
}
}
if(get_my_url() && $profile['unkmail'])
$wallmessage = t('Message');
else
$wallmessage = false;
// show edit profile to yourself
if($is_owner) {

View file

@ -2,9 +2,22 @@
function vcard_from_xchan($xchan) {
$connect = false;
if(local_user()) {
$r = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
dbesc($xchan['xchan_hash']),
intval(local_user())
);
if(! $r)
$connect = t('Connect');
}
return replace_macros(get_markup_template('xchan_vcard.tpl'),array(
'$name' => $xchan['xchan_name'],
'$photo' => $xchan['xchan_photo_l']
'$photo' => $xchan['xchan_photo_l'],
'$url' => $xchan['xchan_addr'],
'$connect' => $connect
));
}

View file

@ -47,16 +47,6 @@
{{ if $homepage }}<dl class="homepage"><dt class="homepage-label">$homepage</dt><dd class="homepage-url"><a href="$profile.homepage" >$profile.homepage</a></dd></dl>{{ endif }}
<div id="profile-extra-links">
<ul>
{{ if $connect }}
<li><a id="dfrn-request-link" href="dfrn_request/$profile.nickname">$connect</a></li>
{{ endif }}
{{ if $wallmessage }}
<li><a id="wallmessage-link" href="wallmessage/$profile.nickname">$wallmessage</a></li>
{{ endif }}
</ul>
</div>
</div>
$contact_block

View file

@ -2,3 +2,14 @@
<div class="fn">$name</div>
<div id="profile-photo-wrapper"><img class="vcard-photo photo" src="$photo" alt="name" /></div>
</div>
<div id="profile-extra-links">
<ul>
{{ if $connect }}
<li><a id="follow-link" href="follow?f=&url=$follow">$connect</a></li>
{{ endif }}
</ul>
</div>