mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-14 01:48:35 +01:00
Add ical export to edit 'Actions' selectbox, and list context menu
This commit is contained in:
parent
62ff285d1e
commit
26513d715f
@ -1085,6 +1085,12 @@ class infolog_ui
|
|||||||
$this->prefs['document_dir'], ++$group, 'Insert in document', 'document_',
|
$this->prefs['document_dir'], ++$group, 'Insert in document', 'document_',
|
||||||
$this->prefs['default_document']
|
$this->prefs['default_document']
|
||||||
);
|
);
|
||||||
|
$actions['ical'] = array(
|
||||||
|
'icon' => 'calendar/navbar',
|
||||||
|
'caption' => 'Export iCal',
|
||||||
|
'group' => $group,
|
||||||
|
'allowOnMultiple' => true,
|
||||||
|
);
|
||||||
|
|
||||||
$actions['delete'] = array(
|
$actions['delete'] = array(
|
||||||
'caption' => 'Delete',
|
'caption' => 'Delete',
|
||||||
@ -1207,6 +1213,17 @@ class infolog_ui
|
|||||||
|
|
||||||
case 'view':
|
case 'view':
|
||||||
return $this->index(array(),'sp',$checked,0);
|
return $this->index(array(),'sp',$checked,0);
|
||||||
|
case 'ical':
|
||||||
|
$boical = new infolog_ical();
|
||||||
|
$result = '';
|
||||||
|
foreach($checked as $id)
|
||||||
|
{
|
||||||
|
$result .= $boical->exportVTODO($id,'2.0','PUBLISH',false);
|
||||||
|
}
|
||||||
|
ExecMethod2('phpgwapi.browser.content_header','todo.ical','text/calendar');
|
||||||
|
echo $result;
|
||||||
|
common::egw_exit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actions that need to loop
|
// Actions that need to loop
|
||||||
@ -1714,7 +1731,7 @@ class infolog_ui
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
// new call via GET or some actions handled here, as they can happen both ways ($_GET[action] or button/action in GUI)
|
// new call via GET or some actions handled here, as they can happen both ways ($_GET[action] or button/action in GUI)
|
||||||
if (!$submit || in_array($action,array('sp','copy','schedule')))
|
if (!$submit || in_array($action,array('sp','copy','schedule','ical')))
|
||||||
{
|
{
|
||||||
switch ($action)
|
switch ($action)
|
||||||
{
|
{
|
||||||
@ -1725,7 +1742,12 @@ class infolog_ui
|
|||||||
'link_id' => $info_id,
|
'link_id' => $info_id,
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
|
case 'ical':
|
||||||
|
$boical = new infolog_ical();
|
||||||
|
$result = $boical->exportVTODO($content,'2.0','PUBLISH',false);
|
||||||
|
ExecMethod2('phpgwapi.browser.content_header','todo.ical','text/calendar');
|
||||||
|
echo $result;
|
||||||
|
common::egw_exit();
|
||||||
case 'sp':
|
case 'sp':
|
||||||
case 'copy':
|
case 'copy':
|
||||||
$info_id = 0;
|
$info_id = 0;
|
||||||
@ -1944,6 +1966,7 @@ class infolog_ui
|
|||||||
'copy' => array('label' => 'Copy', 'title' => 'Copy this Infolog'),
|
'copy' => array('label' => 'Copy', 'title' => 'Copy this Infolog'),
|
||||||
'sp' => 'Sub-entry',
|
'sp' => 'Sub-entry',
|
||||||
'print' => array('label' => 'Print', 'title' => 'Print this Infolog'),
|
'print' => array('label' => 'Print', 'title' => 'Print this Infolog'),
|
||||||
|
'ical' => array('label' => 'Export iCal', 'title' => 'Export iCal'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if ($GLOBALS['egw_info']['user']['apps']['calendar'])
|
if ($GLOBALS['egw_info']['user']['apps']['calendar'])
|
||||||
|
Loading…
Reference in New Issue
Block a user