Merge pull request #2567 from rabuzarus/0606-photo-menu

photo_menu: now the photo_menu does have at all places the same struc…
This commit is contained in:
Michael Vogel 2016-06-06 21:28:25 +02:00
commit db44ea0482
6 changed files with 22 additions and 10 deletions

View file

@ -61,8 +61,10 @@ function allfriends_content(&$a) {
}
else {
$connlnk = $a->get_baseurl() . '/follow/?url=' . $rr['url'];
$photo_menu = array(array(t("View Profile"), zrl($rr['url'])));
$photo_menu[] = array(t("Connect/Follow"), $connlnk);
$photo_menu = array(
'profile' => array(t("View Profile"), zrl($rr['url'])),
'follow' => array(t("Connect/Follow"), $connlnk)
);
}
$entry = array(

View file

@ -159,7 +159,9 @@ function directory_content(&$a) {
$location_e = $location;
}
$photo_menu = array(array(t("View Profile"), zrl($profile_link)));
$photo_menu = array(
'profile' => array(t("View Profile"), zrl($profile_link))
);
$entry = array(
'id' => $rr['id'],

View file

@ -196,8 +196,10 @@ function dirfind_content(&$a, $prefix = "") {
} else {
$connlnk = $a->get_baseurl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
$conntxt = t('Connect');
$photo_menu = array(array(t("View Profile"), zrl($jj->url)));
$photo_menu[] = array(t("Connect/Follow"), $connlnk);
$photo_menu = array(
'profile' => array(t("View Profile"), zrl($jj->url)),
'follow' => array(t("Connect/Follow"), $connlnk)
);
}
$jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);

View file

@ -67,8 +67,10 @@ function match_content(&$a) {
if (!count($match)) {
$jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
$connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
$photo_menu = array(array(t("View Profile"), zrl($jj->url)));
$photo_menu[] = array(t("Connect/Follow"), $connlnk);
$photo_menu = array(
'profile' => array(t("View Profile"), zrl($jj->url)),
'follow' => array(t("Connect/Follow"), $connlnk)
);
$contact_details = get_contact_details_by_url($jj->url, local_user());

View file

@ -78,9 +78,12 @@ function suggest_content(&$a) {
$connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
$ignlnk = $a->get_baseurl() . '/suggest?ignore=' . $rr['id'];
$photo_menu = array(array(t("View Profile"), zrl($rr["url"])));
$photo_menu[] = array(t("Connect/Follow"), $connlnk);
$photo_menu[] = array(t('Ignore/Hide'), $ignlnk);
$photo_menu = array(
'profile' => array(t("View Profile"), zrl($rr["url"])),
'follow' => array(t("Connect/Follow"), $connlnk),
'hide' => array(t('Ignore/Hide'), $ignlnk)
);
$contact_details = get_contact_details_by_url($rr["url"], local_user(), $rr);
$entry = array(

View file

@ -54,6 +54,7 @@
{{if $contact.photo_menu.edit}}<a class="contact-action-link" href="{{$contact.photo_menu.edit.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.edit.0}}"><i class="fa fa-pencil" aria-hidden="true"></i></a>{{/if}}
{{if $contact.photo_menu.drop}}<a class="contact-action-link" href="{{$contact.photo_menu.drop.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.drop.0}}"><i class="fa fa-user-times" aria-hidden="true"></i></a>{{/if}}
{{if $contact.photo_menu.follow}}<a class="contact-action-link" href="{{$contact.photo_menu.follow.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.follow.0}}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{{/if}}
{{if $contact.photo_menu.hide}}<a class="contact-action-link" href="{{$contact.photo_menu.hide.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.hide.0}}"><i class="fa fa-times" aria-hidden="true"></i></a>{{/if}}
</div>
{{* The contact description (e.g. Name, Network, kind of connection and so on *}}