mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-01 12:23:50 +01:00
"implemented new status filter for planner by user (wasnt implemented when status filter were added)"
This commit is contained in:
parent
17e5f174b0
commit
eef0fdedb6
@ -1504,14 +1504,37 @@ class calendar_uiviews extends calendar_ui
|
|||||||
}
|
}
|
||||||
if (!is_array($events)) $events = array();
|
if (!is_array($events)) $events = array();
|
||||||
|
|
||||||
|
if ($by_cat === 'user') // planner by user
|
||||||
|
{
|
||||||
|
// convert filter to allowed status
|
||||||
|
switch($this->filter)
|
||||||
|
{
|
||||||
|
case 'unknown':
|
||||||
|
$status_to_show = array('U','G'); break;
|
||||||
|
case 'accepted':
|
||||||
|
$status_to_show = array('A'); break;
|
||||||
|
case 'tentative':
|
||||||
|
$status_to_show = array('T'); break;
|
||||||
|
case 'rejected':
|
||||||
|
$status_to_show = array('R'); break;
|
||||||
|
case 'delegated':
|
||||||
|
$status_to_show = array('D'); break;
|
||||||
|
case 'all':
|
||||||
|
$status_to_show = array('U','A','T','D','G','R'); break;
|
||||||
|
default:
|
||||||
|
$status_to_show = array('U','A','T','D','G'); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
foreach($events as $key => $event)
|
foreach($events as $key => $event)
|
||||||
{
|
{
|
||||||
if ($by_cat === false) // planner by user
|
if ($by_cat === false) // planner by user
|
||||||
{
|
{
|
||||||
foreach($event['participants'] as $sort => $status)
|
foreach($event['participants'] as $sort => $status)
|
||||||
{
|
{
|
||||||
// only show if participant has not rejected or user wants to see rejections
|
calendar_so::split_status($status,$nul,$nul);
|
||||||
if (isset($sort2label[$sort]) && ($status != 'R' || $this->bo->cal_prefs['show_rejected']))
|
// only show if participant with status visible with current filter
|
||||||
|
if (isset($sort2label[$sort]) && (in_array($status,$status_to_show) ||
|
||||||
|
$this->filter == 'owner' && $event['owner'] == $sort)) // owner too additionally uses owner
|
||||||
{
|
{
|
||||||
$rows[$sort][] =& $events[$key];
|
$rows[$sort][] =& $events[$key];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user