mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-16 06:31:21 +00:00
add all custom attributes of type date to calendar
This commit is contained in:
parent
8f6402c51f
commit
649fcbbc8b
|
@ -196,7 +196,30 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'attrdate':
|
||||||
|
if(mktime(23,59,59, $end[1], $end[2], $end[0]) > time()) {
|
||||||
|
$attrdefs = $dms->getAllAttributeDefinitions(\SeedDMS_Core_AttributeDefinition::objtype_document);
|
||||||
|
foreach($attrdefs as $attrdef) {
|
||||||
|
if($attrdef->getType() == \SeedDMS_Core_AttributeDefinition::type_date) {
|
||||||
|
$documents = $attrdef->getObjects($this->params['start'], 0, O_GTEQ);
|
||||||
|
foreach ($documents['docs'] as $document){
|
||||||
|
$arr[] = array(
|
||||||
|
'start'=>$document->getAttribute($attrdef)->getValue(),
|
||||||
|
'allDay'=>true,
|
||||||
|
'color'=>'#4455ff',
|
||||||
|
'title'=>$document->getName()."\n".$attrdef->getName(),
|
||||||
|
'documentid'=> $document->getID(),
|
||||||
|
'eventtype'=> $eventtype,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'action':
|
case 'action':
|
||||||
|
/* These are all operations which added a new version, an attachment
|
||||||
|
* or any kind of status change
|
||||||
|
*/
|
||||||
if($this->params['start']) {
|
if($this->params['start']) {
|
||||||
$from = makeTsFromLongDate($this->params['start'].' 00:00:00');
|
$from = makeTsFromLongDate($this->params['start'].' 00:00:00');
|
||||||
} else {
|
} else {
|
||||||
|
@ -325,6 +348,10 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
|
||||||
url: 'out.Calendar.php?action=events&eventtype=action',
|
url: 'out.Calendar.php?action=events&eventtype=action',
|
||||||
editable: false
|
editable: false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
url: 'out.Calendar.php?action=events&eventtype=attrdate',
|
||||||
|
editable: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
url: 'out.Calendar.php?action=events&eventtype=expires',
|
url: 'out.Calendar.php?action=events&eventtype=expires',
|
||||||
editable: true
|
editable: true
|
||||||
|
|
Loading…
Reference in New Issue
Block a user