(fix) enhance display of all-day invitations (fixes #4145)
Conflicts: SoObjects/Appointments/SOGoAptMailNotification.mpull/236/head
parent
0af81b0831
commit
d87dc6cdf2
|
@ -18,6 +18,8 @@ vtodo_class2 = "(Confidential task)";
|
||||||
"calendar_label" = "Calendar";
|
"calendar_label" = "Calendar";
|
||||||
"startDate_label" = "Start";
|
"startDate_label" = "Start";
|
||||||
"endDate_label" = "End";
|
"endDate_label" = "End";
|
||||||
|
"time_label" = "Time";
|
||||||
|
"to_label" = "to";
|
||||||
"due_label" = "Due Date";
|
"due_label" = "Due Date";
|
||||||
"location_label" = "Location";
|
"location_label" = "Location";
|
||||||
"summary_label" = "Summary";
|
"summary_label" = "Summary";
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#import <Foundation/NSTimeZone.h>
|
#import <Foundation/NSTimeZone.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||||
#import <NGExtensions/NSObject+Logs.h>
|
#import <NGExtensions/NSObject+Logs.h>
|
||||||
#import <NGCards/iCalEvent.h>
|
#import <NGCards/iCalEvent.h>
|
||||||
|
|
||||||
|
@ -182,6 +184,19 @@
|
||||||
return sentByText;
|
return sentByText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSTimeInterval) duration
|
||||||
|
{
|
||||||
|
return [[self newEndDate] timeIntervalSinceDate:[self newStartDate]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL) isEndDateOnSameDay
|
||||||
|
{
|
||||||
|
if ([[self apt] isAllDay])
|
||||||
|
return ([self duration] <= 86400);
|
||||||
|
|
||||||
|
return [[self newStartDate] isDateOnSameDay: [self newEndDate]];
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *) formattedAptStartDate
|
- (NSString *) formattedAptStartDate
|
||||||
{
|
{
|
||||||
NSString *s;
|
NSString *s;
|
||||||
|
|
|
@ -787,7 +787,7 @@
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// We never send IMIP inivitaton/deletion/update when the "initiator" is an EAS client.
|
// We never send IMIP inivitaton/deletion/update when the "initiator" is an EAS client.
|
||||||
//That is because Outlook, iOS and Android will always issue a SendMail command
|
// That is because Outlook, iOS and Android will always issue a SendMail command
|
||||||
// with the meeting details (ie., IMIP message with METHOD:REQUEST) so there's
|
// with the meeting details (ie., IMIP message with METHOD:REQUEST) so there's
|
||||||
// no need to send it twice. Moreover, Outlook users can also choose to NOT send
|
// no need to send it twice. Moreover, Outlook users can also choose to NOT send
|
||||||
// the IMIP messsage at all, so SOGo won't send one without user's consent
|
// the IMIP messsage at all, so SOGo won't send one without user's consent
|
||||||
|
|
|
@ -238,21 +238,19 @@
|
||||||
return [[self dateFormatter] formattedTime: [self endCalendarDate]];
|
return [[self dateFormatter] formattedTime: [self endCalendarDate]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) isEndDateOnSameDay
|
|
||||||
{
|
|
||||||
NSCalendarDate *aDate;
|
|
||||||
if ([[self inEvent] isAllDay])
|
|
||||||
aDate = [[self endCalendarDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-1];
|
|
||||||
else
|
|
||||||
aDate = [self endCalendarDate];
|
|
||||||
return [[self startCalendarDate] isDateOnSameDay: aDate];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSTimeInterval) duration
|
- (NSTimeInterval) duration
|
||||||
{
|
{
|
||||||
return [[self endCalendarDate] timeIntervalSinceDate:[self startCalendarDate]];
|
return [[self endCalendarDate] timeIntervalSinceDate:[self startCalendarDate]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL) isEndDateOnSameDay
|
||||||
|
{
|
||||||
|
if ([[self inEvent] isAllDay])
|
||||||
|
return [self duration] <= 86400;
|
||||||
|
|
||||||
|
return [[self startCalendarDate] isDateOnSameDay: [self endCalendarDate]];
|
||||||
|
}
|
||||||
|
|
||||||
/* calendar folder support */
|
/* calendar folder support */
|
||||||
|
|
||||||
- (SOGoAppointmentFolder *) calendarFolder
|
- (SOGoAppointmentFolder *) calendarFolder
|
||||||
|
|
|
@ -24,10 +24,19 @@ th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; fon
|
||||||
><tr>
|
><tr>
|
||||||
<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="location" const:escapeHTML="NO"/></td>
|
<td><var:string value="location" const:escapeHTML="NO"/></td>
|
||||||
</tr
|
</tr></var:if>
|
||||||
></var:if>
|
|
||||||
|
<var:if condition="apt.isAllDay">
|
||||||
<tr>
|
<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="time_label" const:escapeHTML="NO"/></th>
|
||||||
|
<td><var:string value="formattedAptStartDate"
|
||||||
|
const:escapeHTML="NO"/><var:if condition="isEndDateOnSameDay" const:negate="YES"> <var:string label:value="to_label" const:escapeHTML="NO"/> <var:string value="formattedAptEndDate" const:escapeHTML="NO"/>
|
||||||
|
</var:if></td>
|
||||||
|
</tr>
|
||||||
|
</var:if>
|
||||||
|
<var:if condition="apt.isAllDay" const:negate="YES">
|
||||||
|
<tr>
|
||||||
|
<th align="right" style="font-weight: bold;"><var:string label:value="startDate_label" const:escapeHTML="NO"/></th>
|
||||||
<td><var:string value="formattedAptStartDate" const:escapeHTML="NO"
|
<td><var:string value="formattedAptStartDate" const:escapeHTML="NO"
|
||||||
/><var:if condition="formattedAptStartTime.length"> - <var:string value="formattedAptStartTime" const:escapeHTML="NO"/> <var:string value="viewTZ" const:escapeHTML="NO"/>
|
/><var:if condition="formattedAptStartTime.length"> - <var:string value="formattedAptStartTime" const:escapeHTML="NO"/> <var:string value="viewTZ" const:escapeHTML="NO"/>
|
||||||
</var:if></td>
|
</var:if></td>
|
||||||
|
@ -37,7 +46,8 @@ th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; fon
|
||||||
<td><var:string value="formattedAptEndDate" const:escapeHTML="NO"
|
<td><var:string value="formattedAptEndDate" const:escapeHTML="NO"
|
||||||
/><var:if condition="formattedAptEndTime.length"> - <var:string value="formattedAptEndTime" const:escapeHTML="NO"/> <var:string value="viewTZ" const:escapeHTML="NO"/>
|
/><var:if condition="formattedAptEndTime.length"> - <var:string value="formattedAptEndTime" const:escapeHTML="NO"/> <var:string value="viewTZ" const:escapeHTML="NO"/>
|
||||||
</var:if></td>
|
</var:if></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</var:if>
|
||||||
<var:if condition="apt.comment.length"
|
<var:if condition="apt.comment.length"
|
||||||
><tr>
|
><tr>
|
||||||
<th align="right" style="font-weight: bold;"><var:string label:value="comment_label" const:escapeHTML="NO"/></th>
|
<th align="right" style="font-weight: bold;"><var:string label:value="comment_label" const:escapeHTML="NO"/></th>
|
||||||
|
|
Loading…
Reference in New Issue