add expired docs in the future

This commit is contained in:
Uwe Steinmann 2022-04-07 18:18:09 +02:00
parent f1e200ad83
commit 1a9825f999

View File

@ -175,6 +175,20 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
$arr[] = array('start'=>date('Y-m-d', $event["start"]), 'end'=>date('Y-m-d', $event["stop"]), 'title'=>$event["name"].($event['comment'] ? "\n".$event['comment'] : ''), 'eventid'=>$event["id"]);
}
break;
case 'expires':
if(mktime(23,59,59, $end[1], $end[2], $end[0]) > time()) {
$documents = $dms->getDocumentsExpired($this->params['end']);
foreach ($documents as $document){
$arr[] = array(
'start'=>date('Y-m-d', $document->getExpires()),
'allDay'=>true,
'color'=>'#ff4455',
'title'=>$document->getName()."\nexpires",
'documentid'=> $document->getID(),
);
}
}
break;
case 'action':
if($this->params['start']) {
$from = makeTsFromLongDate($this->params['start'].' 00:00:00');
@ -293,6 +307,10 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
{
url: 'out.Calendar.php?action=events&eventtype=action',
editable: false
},
{
url: 'out.Calendar.php?action=events&eventtype=expires',
editable: false
}
],
eventClick: function(event, element) {