[frio] Improve Group Editing (#5349)

* Improve group-editing and edit-navigation.

Use icons next to groups and header for navigation to editing groups and adding new groups.
Also use icon from group-sidebar for editing groups.

* Unify look&feel of contact search bars.

* Remove nogroup page and replace with /group/none.

* Make sure proper items are selected in aside.

* Use icon instead of link for 'View Contacs' on profile page.

* Fix none-working /group/none.

* Fix highlighting for everyone in group aside.
This commit is contained in:
Andreas Neustifter 2018-07-10 00:36:50 +02:00 committed by Hypolite Petovan
parent 09b7e217c7
commit 32ef5623ab
16 changed files with 180 additions and 177 deletions

View file

@ -696,49 +696,20 @@ class Contact extends BaseObject
*
* @return array
*/
public static function getUngroupedList($uid, $start = 0, $count = 0)
public static function getUngroupedList($uid)
{
if (!$count) {
$r = q(
"SELECT COUNT(*) AS `total`
FROM `contact`
WHERE `uid` = %d
AND NOT `self`
AND NOT `blocked`
AND NOT `pending`
AND `id` NOT IN (
SELECT DISTINCT(`contact-id`)
FROM `group_member`
WHERE `uid` = %d
)",
intval($uid),
intval($uid)
);
return $r;
}
$r = q(
"SELECT *
FROM `contact`
WHERE `uid` = %d
AND NOT `self`
AND NOT `blocked`
AND NOT `pending`
AND `id` NOT IN (
SELECT DISTINCT(`contact-id`)
FROM `group_member`
INNER JOIN `group` ON `group`.`id` = `group_member`.`gid`
WHERE `group`.`uid` = %d
)
LIMIT %d, %d",
intval($uid),
intval($uid),
intval($start),
intval($count)
);
return $r;
return q("SELECT *
FROM `contact`
WHERE `uid` = %d
AND NOT `self`
AND NOT `blocked`
AND NOT `pending`
AND `id` NOT IN (
SELECT DISTINCT(`contact-id`)
FROM `group_member`
INNER JOIN `group` ON `group`.`id` = `group_member`.`gid`
WHERE `group`.`uid` = %d
)", intval($uid), intval($uid));
}
/**