parent
462b9ad99f
commit
3388c18466
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2006-2020 Inverse inc.
|
Copyright (C) 2006-2021 Inverse inc.
|
||||||
Copyright (C) 2000-2005 SKYRIX Software AG
|
Copyright (C) 2000-2005 SKYRIX Software AG
|
||||||
|
|
||||||
This file is part of SOGo.
|
This file is part of SOGo.
|
||||||
|
@ -106,7 +106,8 @@
|
||||||
if (!oldStartDate)
|
if (!oldStartDate)
|
||||||
{
|
{
|
||||||
ASSIGN (oldStartDate, [[self previousApt] startDate]);
|
ASSIGN (oldStartDate, [[self previousApt] startDate]);
|
||||||
if (![(iCalEvent*)[self previousApt] isAllDay])
|
if ([[self previousApt] isKindOfClass: [iCalToDo class]] ||
|
||||||
|
![(iCalEvent*)[self previousApt] isAllDay])
|
||||||
[oldStartDate setTimeZone: viewTZ];
|
[oldStartDate setTimeZone: viewTZ];
|
||||||
}
|
}
|
||||||
return oldStartDate;
|
return oldStartDate;
|
||||||
|
@ -117,7 +118,8 @@
|
||||||
if (!newStartDate)
|
if (!newStartDate)
|
||||||
{
|
{
|
||||||
ASSIGN (newStartDate, [[self apt] startDate]);
|
ASSIGN (newStartDate, [[self apt] startDate]);
|
||||||
if (![(iCalEvent*)[self apt] isAllDay])
|
if ([[self apt] isKindOfClass: [iCalToDo class]] ||
|
||||||
|
![(iCalEvent*)[self apt] isAllDay])
|
||||||
[newStartDate setTimeZone: viewTZ];
|
[newStartDate setTimeZone: viewTZ];
|
||||||
}
|
}
|
||||||
return newStartDate;
|
return newStartDate;
|
||||||
|
@ -134,12 +136,15 @@
|
||||||
endDate = [(iCalEvent*)[self previousApt] endDate];
|
endDate = [(iCalEvent*)[self previousApt] endDate];
|
||||||
if ([(iCalEvent*)[self previousApt] isAllDay])
|
if ([(iCalEvent*)[self previousApt] isAllDay])
|
||||||
endDate = [endDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-1];
|
endDate = [endDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-1];
|
||||||
|
else
|
||||||
|
[endDate setTimeZone: viewTZ];
|
||||||
ASSIGN (oldEndDate, endDate);
|
ASSIGN (oldEndDate, endDate);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ASSIGN (oldEndDate, [(iCalToDo*)[self previousApt] due]);
|
{
|
||||||
if (![(iCalEvent*)[self previousApt] isAllDay])
|
ASSIGN (oldEndDate, [(iCalToDo*)[self previousApt] due]);
|
||||||
[oldEndDate setTimeZone: viewTZ];
|
[oldEndDate setTimeZone: viewTZ];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return oldEndDate;
|
return oldEndDate;
|
||||||
}
|
}
|
||||||
|
@ -155,12 +160,15 @@
|
||||||
endDate = [(iCalEvent*)[self apt] endDate];
|
endDate = [(iCalEvent*)[self apt] endDate];
|
||||||
if ([(iCalEvent*)[self apt] isAllDay])
|
if ([(iCalEvent*)[self apt] isAllDay])
|
||||||
endDate = [endDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-1];
|
endDate = [endDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-1];
|
||||||
|
else
|
||||||
|
[endDate setTimeZone: viewTZ];
|
||||||
ASSIGN (newEndDate, endDate);
|
ASSIGN (newEndDate, endDate);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ASSIGN (newEndDate, [(iCalToDo*)[self apt] due]);
|
{
|
||||||
if (![(iCalEvent*)[self apt] isAllDay])
|
ASSIGN (newEndDate, [(iCalToDo*)[self apt] due]);
|
||||||
[newEndDate setTimeZone: viewTZ];
|
[newEndDate setTimeZone: viewTZ];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return newEndDate;
|
return newEndDate;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
- (NSString *) aptSummary;
|
- (NSString *) aptSummary;
|
||||||
- (NSString *) aptStartDate;
|
- (NSString *) aptStartDate;
|
||||||
|
- (NSString *) aptEndDate;
|
||||||
- (NSString *) calendarName;
|
- (NSString *) calendarName;
|
||||||
- (iCalPerson *) organizer;
|
- (iCalPerson *) organizer;
|
||||||
|
|
||||||
|
|
|
@ -56,10 +56,17 @@ static NSCharacterSet *wsSet = nil;
|
||||||
|
|
||||||
- (void) setupValues
|
- (void) setupValues
|
||||||
{
|
{
|
||||||
|
NSString *formattedDate;
|
||||||
|
|
||||||
[super setupValues];
|
[super setupValues];
|
||||||
|
|
||||||
[values setObject: [self aptStartDate]
|
formattedDate = [self aptStartDate];
|
||||||
forKey: @"StartDate"];
|
if (![formattedDate length])
|
||||||
|
// Task with a due date
|
||||||
|
formattedDate = [self aptEndDate];
|
||||||
|
if ([formattedDate length])
|
||||||
|
[values setObject: formattedDate
|
||||||
|
forKey: @"StartDate"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) getBody
|
- (NSString *) getBody
|
||||||
|
@ -112,7 +119,7 @@ static NSCharacterSet *wsSet = nil;
|
||||||
[self setupValues];
|
[self setupValues];
|
||||||
|
|
||||||
s = [self labelForKey: @"Reminder: \"%{Summary}\" - %{StartDate}"
|
s = [self labelForKey: @"Reminder: \"%{Summary}\" - %{StartDate}"
|
||||||
inContext: context];
|
inContext: context];
|
||||||
|
|
||||||
return [values keysWithFormat: s];
|
return [values keysWithFormat: s];
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,6 @@
|
||||||
WOContext *localContext;
|
WOContext *localContext;
|
||||||
WOApplication *app;
|
WOApplication *app;
|
||||||
SOGoAptMailReminder *p;
|
SOGoAptMailReminder *p;
|
||||||
NSString *pageName;
|
|
||||||
WOResourceManager *rm;
|
WOResourceManager *rm;
|
||||||
|
|
||||||
SOGoAppointmentFolders *folders;
|
SOGoAppointmentFolders *folders;
|
||||||
|
@ -188,9 +187,7 @@
|
||||||
folders = [userFolder privateCalendars: @"Calendar"
|
folders = [userFolder privateCalendars: @"Calendar"
|
||||||
inContext: localContext];
|
inContext: localContext];
|
||||||
|
|
||||||
pageName = [NSString stringWithFormat: @"SOGoAptMail%@", @"Reminder"];
|
p = [app pageWithName: @"SOGoAptMailReminder" inContext: localContext];
|
||||||
|
|
||||||
p = [app pageWithName: pageName inContext: localContext];
|
|
||||||
|
|
||||||
parts = [containerPath componentsSeparatedByString: @"/"];
|
parts = [containerPath componentsSeparatedByString: @"/"];
|
||||||
if ([parts count] > 4)
|
if ([parts count] > 4)
|
||||||
|
|
|
@ -29,10 +29,11 @@ th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; fon
|
||||||
<th align="right" style="font-weight: bold;"><var:string label:value="location_label" const:escapeHTML="NO"/></th>
|
<th align="right" style="font-weight: bold;"><var:string label:value="location_label" const:escapeHTML="NO"/></th>
|
||||||
<td><var:string value="apt.location" const:escapeHTML="NO"/></td>
|
<td><var:string value="apt.location" const:escapeHTML="NO"/></td>
|
||||||
</tr></var:if>
|
</tr></var:if>
|
||||||
<tr>
|
<var:if condition="aptStartDate.length"
|
||||||
|
><tr>
|
||||||
<th align="right" style="font-weight: bold;"><var:string label:value="startDate_label" const:escapeHTML="NO"/></th>
|
<th align="right" style="font-weight: bold;"><var:string label:value="startDate_label" const:escapeHTML="NO"/></th>
|
||||||
<td><var:string value="aptStartDate" const:escapeHTML="NO"/></td>
|
<td><var:string value="aptStartDate" const:escapeHTML="NO"/></td>
|
||||||
</tr>
|
</tr></var:if>
|
||||||
<var:if condition="aptEndDate"
|
<var:if condition="aptEndDate"
|
||||||
><tr>
|
><tr>
|
||||||
<th align="right" style="font-weight: bold;"><var:string label:value="endDate_label" const:escapeHTML="NO"/></th>
|
<th align="right" style="font-weight: bold;"><var:string label:value="endDate_label" const:escapeHTML="NO"/></th>
|
||||||
|
|
Loading…
Reference in New Issue