mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 03:13:40 +01:00
Calendar: Add icon for notification action, use REQUEST method (reconfirm event) for immediate notifications
This commit is contained in:
parent
c42795cc9e
commit
1687f199e5
@ -25,6 +25,7 @@ define('MSG_ACCEPTED',5);
|
||||
define('MSG_ALARM',6);
|
||||
define('MSG_DISINVITE',7);
|
||||
define('MSG_DELEGATED',8);
|
||||
define('MSG_REQUEST',9);
|
||||
|
||||
/**
|
||||
* Class to access AND manipulate all calendar data (business object)
|
||||
@ -810,6 +811,9 @@ class calendar_boupdate extends calendar_bo
|
||||
$action = 'Alarm';
|
||||
$pref = 'Alarm';
|
||||
break;
|
||||
case MSG_REQUEST:
|
||||
$method = 'REQUEST';
|
||||
break;
|
||||
default:
|
||||
$method = 'PUBLISH';
|
||||
}
|
||||
|
@ -3482,12 +3482,18 @@ class calendar_uiforms extends calendar_ui
|
||||
return $this->process_edit($event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Immediately send notification to selected users
|
||||
*
|
||||
* @param array $content
|
||||
* @throws Api\Exception\AssertionFailed
|
||||
*/
|
||||
public function notify($content=array())
|
||||
{
|
||||
if(is_array($content) && $content['button'])
|
||||
{
|
||||
$participants = array_filter($content['participants']['notify']);
|
||||
$this->bo->_send_update(MSG_ALARM,$participants,$content,null,0,null,true);
|
||||
$this->bo->send_update(MSG_REQUEST,$participants,$content,null,0,null,true);
|
||||
Framework::window_close();
|
||||
}
|
||||
|
||||
@ -3505,8 +3511,6 @@ class calendar_uiforms extends calendar_ui
|
||||
);
|
||||
$readonlys = [];
|
||||
|
||||
|
||||
|
||||
$etpl = new Etemplate('calendar.notify_dialog');
|
||||
$preserve = $content;
|
||||
|
||||
|
@ -963,15 +963,6 @@ class calendar_uilist extends calendar_ui
|
||||
'hint' => 'Do not notify of these changes',
|
||||
'group' => $group,
|
||||
),
|
||||
'notifications' => array(
|
||||
'caption' => 'Send notifications',
|
||||
'hint' => 'Send notifications to users right now',
|
||||
'url' => 'calendar.calendar_uiforms.notify&id=$app_id',
|
||||
'popup' => Link::get_registry('calendar', 'view_popup'),
|
||||
'allowOnMultiple' => false,
|
||||
'group' => $group,
|
||||
'disableClass' => 'rowNoView',
|
||||
)
|
||||
);
|
||||
$status = array_map('lang',$this->bo->verbose_status);
|
||||
unset($status['G']);
|
||||
@ -1051,6 +1042,16 @@ class calendar_uilist extends calendar_ui
|
||||
);
|
||||
}
|
||||
|
||||
$actions['notifications'] = array(
|
||||
'caption' => 'Send notifications',
|
||||
'hint' => 'Send notifications to users right now',
|
||||
'icon' => 'notifications/navbar',
|
||||
'url' => 'calendar.calendar_uiforms.notify&id=$app_id',
|
||||
'popup' => Link::get_registry('calendar', 'view_popup'),
|
||||
'allowOnMultiple' => false,
|
||||
'group' => $group,
|
||||
'disableClass' => 'rowNoView',
|
||||
);
|
||||
if ($GLOBALS['egw_info']['user']['apps']['timesheet'])
|
||||
{
|
||||
$actions['timesheet'] = array( // interactive add for a single event
|
||||
|
Loading…
Reference in New Issue
Block a user