fix wrong time for past alarms and added nicer working for alarm "at start of the event"

This commit is contained in:
Ralf Becker 2018-08-10 11:31:06 +02:00
parent 73b6ab8128
commit e88450037a
3 changed files with 14 additions and 3 deletions

View File

@ -5,9 +5,8 @@
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2004-16 by RalfBecker-At-outdoor-training.de
* @copyright (c) 2004-18 by RalfBecker-At-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
use EGroupware\Api;
@ -1791,7 +1790,16 @@ class calendar_uiforms extends calendar_ui
if ($days) $label[] = $days.' '.lang('days');
if ($hours) $label[] = $hours.' '.lang('hours');
if ($minutes) $label[] = $minutes.' '.lang('Minutes');
if (!$label)
{
$alarm['offset'] = lang('at start of the event');
}
else
{
$alarm['offset'] = implode(', ',$label) . ' ' . ($after ? lang('after') : lang('before'));
}
// fix alarm time in case of alread run alarms, where the time will be their keep_time / when they will be cleaned up otherwise
$alarm['time'] = $event['start'] - $alarm['offset'];
$content['alarm'][] = $alarm;
$readonlys['alarm[delete_alarm]['.$alarm['id'].']'] = !$this->bo->check_perms(Acl::EDIT,$alarm['all'] ? $event : 0,$alarm['owner']);

View File

@ -58,6 +58,7 @@ apply the action on the whole query, not only the shown events calendar de Befeh
apply the changes calendar de Übernimmt die Änderungen
appointment settings calendar de Einstellungen der Terminverwaltung
as an alternative you can %1download a mysql dump%2 and import it manually into egw_cal_timezones table. calendar de Als Alternative können Sie auch einen %1MySQL Dump herunterladen%2 und diesen von Hand in die Datenbank Tabelle egw_cal_timezones importieren.
at start of the event calendar de am Beginn des Termins
automatically purge old events after admin de Bereinigt bzw. löscht alte Termine automatisch nach
back half a month calendar de einen halben Monat zurück
back one month calendar de einen Monat zurück

View File

@ -58,6 +58,7 @@ apply the action on the whole query, not only the shown events calendar en Apply
apply the changes calendar en Apply the changes
appointment settings calendar en Appointment settings
as an alternative you can %1download a mysql dump%2 and import it manually into egw_cal_timezones table. calendar en As an alternative you can %1download a MySQL dump%2 and import it manually into egw_cal_timezones table.
at start of the event calendar en at start of the event
automatically purge old events after admin en Automatically purge old events after
back half a month calendar en Back half a month
back one month calendar en Back one month
@ -156,6 +157,7 @@ delete this series of recurring events calendar en Delete this series of recurri
deleted calendar en Deleted.
deny resources reservation for private events calendar en Deny resources reservation for private events
directory with documents to insert entries calendar en Directory with documents to insert entries
utilities calendar en Utilities
uninvited calendar en uninvited.
display holidays or birthdays as events in dayview calendar en Display holidays or birthdays as events in dayview
display in header calendar en Display in header