mirror of
https://github.com/friendica/friendica
synced 2025-04-23 13:50:11 +00:00
Add group membership filter widget in contact list
This commit is contained in:
parent
ed3ac36621
commit
4da90b9378
2 changed files with 45 additions and 6 deletions
|
@ -326,6 +326,12 @@ class Contact extends BaseModule
|
|||
$follow_widget = '';
|
||||
$networks_widget = '';
|
||||
$rel_widget = '';
|
||||
|
||||
if ($contact['uid'] != 0) {
|
||||
$groups_widget = Model\Group::sidebarWidget('contact', 'group', 'full', 'everyone', $contact_id);
|
||||
} else {
|
||||
$groups_widget = '';
|
||||
}
|
||||
} else {
|
||||
$vcard_widget = '';
|
||||
$findpeople_widget = Widget::findPeople();
|
||||
|
@ -337,12 +343,7 @@ class Contact extends BaseModule
|
|||
|
||||
$networks_widget = Widget::networks($_SERVER['REQUEST_URI'], $nets);
|
||||
$rel_widget = Widget::contactRels($_SERVER['REQUEST_URI'], $rel);
|
||||
}
|
||||
|
||||
if ($contact['uid'] != 0) {
|
||||
$groups_widget = Model\Group::sidebarWidget('contact', 'group', 'full', 'everyone', $contact_id);
|
||||
} else {
|
||||
$groups_widget = null;
|
||||
$groups_widget = Widget::groups($_SERVER['REQUEST_URI'], $group);
|
||||
}
|
||||
|
||||
DI::page()['aside'] .= $vcard_widget . $findpeople_widget . $follow_widget . $groups_widget . $networks_widget . $rel_widget;
|
||||
|
@ -710,6 +711,11 @@ class Contact extends BaseModule
|
|||
break;
|
||||
}
|
||||
|
||||
if ($group) {
|
||||
$sql_extra = " AND EXISTS(SELECT `id` FROM `group_member` WHERE `gid` = ? AND `contact`.`id` = `contact-id`)";
|
||||
$sql_values[] = $group;
|
||||
}
|
||||
|
||||
$sql_extra .= Widget::unavailableNetworks();
|
||||
|
||||
$total = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue