]> git.mxchange.org Git - friendica.git/commitdiff
don't provide 'show more' on remote friends in common unless there are actually more
authorfriendica <info@friendica.com>
Wed, 9 May 2012 00:40:56 +0000 (17:40 -0700)
committerfriendica <info@friendica.com>
Wed, 9 May 2012 00:40:56 +0000 (17:40 -0700)
include/contact_widgets.php
view/remote_friends_common.tpl

index 42d3afdee7cd375e6f9e546a0349595d9533dd13..ce1cdbad55e003b647a0ca75c83e2b8e11a337ef 100644 (file)
@@ -183,7 +183,8 @@ function common_friends_visitor_widget($profile_uid) {
                '$desc' =>  sprintf( tt("%d contact in common", "%d contacts in common", $t), $t),
                '$base' => $a->get_baseurl(),
                '$uid' => $profile_uid,
-               '$cid' => $cid,
+               '$cid' => (($cid) ? $cid : '0'),
+               '$linkmore' => (($t > 5) ? 'true' : ''),
                '$more' => t('show more'),
                '$items' => $r
        )); 
index fa66c4731a2cfc5702d4fee7893f0ded77ee8699..9e0562878ec709199b726fb25f8a20def34f9525 100644 (file)
@@ -1,5 +1,5 @@
 <div id="remote-friends-in-common" class="bigwidget">
-       <div id="rfic-desc">$desc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="$base/common/rem/$uid/$cid">$more</a></div>
+       <div id="rfic-desc">$desc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ if $linkmore }}<a href="$base/common/rem/$uid/$cid">$more</a>{{ endif }}</div>
        {{ if $items }}
        {{ for $items as $item }}
        <div class="profile-match-wrapper">