Add copy action to list context menu

This commit is contained in:
Nathan Gray 2012-10-15 22:37:24 +00:00
parent d92a2315cb
commit fbd2f62012
2 changed files with 15 additions and 0 deletions

View File

@ -1125,6 +1125,13 @@ class calendar_uiforms extends calendar_ui
'template' => isset($_GET['template']) ? $_GET['template'] : (isset($_REQUEST['print']) ? 'calendar.print' : 'calendar.edit'),
);
$cal_id = (int) $_GET['cal_id'];
if($_GET['action'])
{
$event = $this->bo->read($cal_id);
$event['action'] = $_GET['action'];
unset($event['participants']);
return $this->process_edit($event);
}
if (!empty($_GET['ical']) || !empty($_GET['ical_vfs']) && egw_vfs::file_exists($_GET['ical_vfs']))
{
$ical = new calendar_ical();

View File

@ -751,6 +751,14 @@ class calendar_uilist extends calendar_ui
'onExecute' => 'javaScript:cal_open',
'disableClass' => 'rowNoView',
),
'copy' => array(
'caption' => 'Copy',
'group' => $group,
'disableClass' => 'rowNoView',
'url' => 'menuaction=calendar.calendar_uiforms.edit&cal_id=$id&action=copy',
'popup' => egw_link::get_registry('calendar', 'view_popup'),
'allowOnMultiple' => false,
),
'select_all' => array(
'caption' => 'Whole query',
'checkbox' => true,