always show deleted filter and set deleted status in calendar

see #29778
This commit is contained in:
Ralf Becker 2021-07-07 11:21:45 +02:00
parent 71ceb25157
commit 90f1d9ea37
4 changed files with 12 additions and 17 deletions

View File

@ -323,18 +323,14 @@ class Storage
))); )));
} }
// Add in deleted type, if holding deleted contacts // Always add in deleted type, to show deleted contacts
$config = Api\Config::read('phpgwapi'); $this->content_types[self::DELETED_TYPE] = array(
if($config['history']) 'name' => lang('Deleted'),
{ 'options' => array(
$this->content_types[self::DELETED_TYPE] = array( 'template' => 'addressbook.edit',
'name' => lang('Deleted'), 'icon' => 'deleted.png'
'options' => array( )
'template' => 'addressbook.edit', );
'icon' => 'deleted.png'
)
);
}
} }
/** /**

View File

@ -1913,7 +1913,7 @@ class calendar_boupdate extends calendar_bo
// delete all links to the event // delete all links to the event
Link::unlink(0,'calendar',$cal_id); Link::unlink(0,'calendar',$cal_id);
} }
elseif ($config['calendar_delete_history']) else
{ {
// mark all links to the event as deleted, but keep them // mark all links to the event as deleted, but keep them
Link::unlink(0,'calendar',$cal_id,'','','',true); Link::unlink(0,'calendar',$cal_id,'','','',true);

View File

@ -1960,6 +1960,9 @@ class infolog_bo
$labels = implode(', ', $labels); $labels = implode(', ', $labels);
} }
} }
// always add deleted status
$statis['deleted'] = 'deleted';
return $statis; return $statis;
} }

View File

@ -532,10 +532,6 @@ class infolog_ui
// if filtered by type, show only the stati of the filtered type // if filtered by type, show only the stati of the filtered type
$rows['sel_options']['info_status'] = $this->bo->get_status($query['col_filter']['info_type']); $rows['sel_options']['info_status'] = $this->bo->get_status($query['col_filter']['info_type']);
if ($this->bo->history)
{
$rows['sel_options']['info_status']['deleted'] = 'deleted';
}
// Update actions for selected type / status / etc. // Update actions for selected type / status / etc.
$query['actions'] = $this->get_actions($query); $query['actions'] = $this->get_actions($query);