forked from extern/egroupware
Alarms:
- fix for bug in alarms 'you dont have permission to ...' - some UI-improvements and translations - fixed some TZ-probs
This commit is contained in:
parent
6550ed8594
commit
caedcb369a
@ -43,7 +43,7 @@
|
||||
}
|
||||
$this->bo = CreateObject('calendar.bocalendar',1);
|
||||
$this->so = CreateObject('calendar.socalendar',1);
|
||||
$this->tz_offset = $this->bo->datetime->tz_offset;
|
||||
$this->tz_offset = $GLOBALS['phpgw']->datetime->tz_offset;
|
||||
|
||||
if($this->debug)
|
||||
{
|
||||
|
@ -40,7 +40,6 @@
|
||||
$this->theme = $GLOBALS['phpgw_info']['theme'];
|
||||
|
||||
$this->bo = CreateObject('calendar.boalarm');
|
||||
$this->tz_offset = $this->bo->tz_offset;
|
||||
|
||||
if($this->debug)
|
||||
{
|
||||
@ -53,18 +52,14 @@
|
||||
|
||||
function prep_page()
|
||||
{
|
||||
$this->event = $this->bo->read_entry($this->bo->cal_id);
|
||||
/*
|
||||
$can_edit = $this->bo->bo->check_perms(PHPGW_ACL_EDIT,$this->event);
|
||||
|
||||
if(!$can_edit)
|
||||
if ($this->bo->cal_id <= 0 ||
|
||||
!$this->event = $this->bo->read_entry($this->bo->cal_id))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',Array(
|
||||
'menuaction' => 'calendar.uicalendar.view',
|
||||
'cal_id' => $this->bo->cal_id
|
||||
'menuaction' => 'calendar.uicalendar.index'
|
||||
));
|
||||
}
|
||||
*/
|
||||
|
||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Alarm Management');
|
||||
@ -142,16 +137,12 @@
|
||||
|
||||
$var = Array(
|
||||
'tr_color' => $this->theme['th_bg'],
|
||||
'action_url' => $GLOBALS['phpgw']->link('/index.php',Array('menuaction'=>'calendar.uialarm.manager')),
|
||||
'hidden_vars' => $this->html->input_hidden('cal_id',$this->bo->cal_id),
|
||||
'lang_select' => lang('Select'),
|
||||
'lang_time' => lang('Time'),
|
||||
'lang_text' => lang('Text'),
|
||||
'lang_owner' => lang('Owner'),
|
||||
'lang_enabled' => lang('enabled'),
|
||||
'lang_disabled' => lang('disabled'),
|
||||
'lang_enabled' => lang('enabled'),
|
||||
'lang_disabled' => lang('disabled')
|
||||
);
|
||||
if($this->event['alarm'])
|
||||
{
|
||||
@ -164,9 +155,9 @@
|
||||
continue;
|
||||
}
|
||||
$var = Array(
|
||||
'field' => $GLOBALS['phpgw']->common->show_date($alarm['time']),
|
||||
'field' => $GLOBALS['phpgw']->common->show_date($alarm['time']-$this->bo->tz_offset),
|
||||
//'data' => $alarm['text'],
|
||||
'data' => 'Email Notification',
|
||||
'data' => lang('Email Notification'),
|
||||
'owner' => $GLOBALS['phpgw']->common->grab_owner_name($alarm['owner']),
|
||||
'enabled' => ($alarm['enabled']?'<img src="'.$GLOBALS['phpgw']->common->image('calendar','enabled.gif').'" width="13" height="13" title="'.lang('enabled').'">':
|
||||
'<img src="'.$GLOBALS['phpgw']->common->image('calendar','disabled.gif').'" width="13" height="13" title="'.lang('disabled').'">'),
|
||||
@ -189,14 +180,19 @@
|
||||
if (isset($this->event['participants'][intval($GLOBALS['phpgw_info']['user']['account_id'])]))
|
||||
{
|
||||
$this->template->set_var(Array(
|
||||
'input_text' => lang('Email reminder'),
|
||||
'input_days' => $this->html->select('time[days]',$_POST['time']['days'],range(0,31),True).' '.lang('days'),
|
||||
'input_hours' => $this->html->select('time[hours]',$_POST['time']['hours'],range(0,24),True).' '.lang('hours'),
|
||||
'input_minutes' => $this->html->select('time[mins]',$_POST['time']['mins'],range(0,60),True).' '.lang('minutes').' '.lang('before the event'),
|
||||
'input_owner' => $this->html->select('owner',$GLOBALS['phpgw_info']['user']['account_id'],$this->bo->participants($this->event,True),True),
|
||||
'input_add' => $this->html->submit_button('add','Add Alarm')
|
||||
'input_add' => $this->html->submit_button('add','Add Alarm'),
|
||||
));
|
||||
}
|
||||
$this->template->set_var(Array(
|
||||
'action_url' => $GLOBALS['phpgw']->link('/index.php',Array('menuaction'=>'calendar.uialarm.manager')),
|
||||
'hidden_vars' => $this->html->input_hidden('cal_id',$this->bo->cal_id),
|
||||
'lang_enable' => lang('Enable'),
|
||||
'lang_disable' => lang('Disable')
|
||||
));
|
||||
//echo "<p>alarm_management='".htmlspecialchars($this->template->get_var('alarm_management'))."'</p>\n";
|
||||
$this->template->pfp('out','alarm_management');
|
||||
}
|
||||
|
@ -3214,8 +3214,8 @@
|
||||
{
|
||||
$icon = '<img src="'.$GLOBALS['phpgw']->common->image('calendar',($alarm['enabled']?'enabled':'disabled')).'" width="13" height="13">';
|
||||
$var = Array(
|
||||
'field' => $icon.$GLOBALS['phpgw']->common->show_date($alarm['time']),
|
||||
'data' => 'Email Notification'
|
||||
'field' => $icon.$GLOBALS['phpgw']->common->show_date($alarm['time']-$GLOBALS['phpgw']->datetime->tz_offset),
|
||||
'data' => lang('Email Notification for %1',$GLOBALS['phpgw']->common->grab_owner_name($alarm['owner']))
|
||||
);
|
||||
$this->output_template_array($p,'row','list',$var);
|
||||
}
|
||||
|
@ -69,6 +69,8 @@ delete series calendar de Serie l
|
||||
delete single calendar de Einzelevent löschen
|
||||
deleted calendar de Abgesagt
|
||||
description calendar de Beschreibung
|
||||
disable calendar de Ausschalten
|
||||
disabled calendar de ausgeschaltet
|
||||
display interval in day view calendar de Intervall der Tagesansicht
|
||||
display mini calendars when printing calendar de zeige einen kleinen Kalender beim drucken
|
||||
display status of events calendar de Status von Terminen anzeigen
|
||||
@ -83,6 +85,10 @@ download calendar de Herunterladen
|
||||
duration calendar de Dauer
|
||||
edit series calendar de Serie bearbeiten
|
||||
edit single calendar de Einzel bearbeiten
|
||||
email notification calendar de Benachrichtigung per Email
|
||||
email notification for %1 calendar de Benachrichtigung per Email für %1
|
||||
enable calendar de Einschalten
|
||||
enabled calendar de eingeschaltet
|
||||
end date/time calendar de Enddatum/-zeit
|
||||
enddate calendar de Enddatum
|
||||
ends calendar de endet
|
||||
|
@ -66,6 +66,8 @@ delete series calendar en Delete Series
|
||||
delete single calendar en Delete Single
|
||||
deleted calendar en Deleted
|
||||
description calendar en DESCRIPTION
|
||||
disable calendar en Disable
|
||||
disabled calendar en disabled
|
||||
display interval in day view calendar en Display interval in Day View
|
||||
display mini calendars when printing calendar en Display mini calendars when printing
|
||||
display status of events calendar en Display Status of Events
|
||||
@ -77,6 +79,10 @@ download calendar en Download
|
||||
duration calendar en Duration
|
||||
edit series calendar en Edit Series
|
||||
edit single calendar en Edit Single
|
||||
email notification calendar en Email Notification
|
||||
email notification for %1 calendar en Email Notification for %1
|
||||
enable calendar en Enable
|
||||
enabled calendar en enabled
|
||||
end date/time calendar en End Date/Time
|
||||
enddate calendar en Enddate
|
||||
ends calendar en ends
|
||||
|
@ -2,18 +2,12 @@
|
||||
<!-- BEGIN alarm_management -->
|
||||
<form action="{action_url}" method="post" name="alarmform">
|
||||
{hidden_vars}
|
||||
<center>
|
||||
<table border="0" width="90%">
|
||||
<table border="0" width="90%" align="center">
|
||||
{rows}
|
||||
<tr><td colspan="6">
|
||||
<br> {input_days} {input_hours} {input_minutes} {input_owner} {input_add}<br>
|
||||
</td></tr>
|
||||
</table>
|
||||
</center>
|
||||
<p>
|
||||
<center>
|
||||
<b>{input_text}</b><p>
|
||||
{input_days} {input_hours} {input_minutes} {input_owner}
|
||||
<p>
|
||||
{input_add}
|
||||
</center>
|
||||
</form>
|
||||
<!-- END alarm_management -->
|
||||
<!-- BEGIN alarm_headers -->
|
||||
|
Loading…
Reference in New Issue
Block a user