mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-24 14:29:28 +00:00
Monotone-Parent: 9644df847f3d64262029a478a7508355366a0d57
Monotone-Revision: 24aa8e2c1d2f2c9fdab5c5ebabfa870aac732d46 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-12-05T16:11:54 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -255,7 +255,21 @@
|
||||
|
||||
- (BOOL) isEventStoredInCalendar
|
||||
{
|
||||
return ([self storedEventObject] != nil);
|
||||
NSCalendarDate *recurrenceId;
|
||||
NSString *recurrenceTime;
|
||||
BOOL inCalendar;
|
||||
|
||||
recurrenceId = [[self inEvent] recurrenceId];
|
||||
|
||||
if (recurrenceId)
|
||||
{
|
||||
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
|
||||
inCalendar = ([[self storedEventObject] lookupOccurence: recurrenceTime] != nil);
|
||||
}
|
||||
else
|
||||
inCalendar = ([self storedEventObject] != nil);
|
||||
|
||||
return inCalendar;
|
||||
}
|
||||
|
||||
- (iCalEvent *) storedEvent
|
||||
@@ -272,6 +286,7 @@
|
||||
{
|
||||
// Find the specific occurence within the repeating vEvent.
|
||||
NSString *recurrenceTime;
|
||||
iCalPerson *organizer;
|
||||
|
||||
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
|
||||
storedEvent = (iCalEvent*)[[self storedEventObject] lookupOccurence: recurrenceTime];
|
||||
@@ -279,6 +294,14 @@
|
||||
if (storedEvent == nil)
|
||||
// If no occurence found, create one
|
||||
storedEvent = (iCalEvent*)[storedEventObject newOccurenceWithID: recurrenceTime];
|
||||
|
||||
// Add organizer to occurence if not present
|
||||
organizer = [storedEvent organizer];
|
||||
if (organizer == nil || [organizer isVoid])
|
||||
{
|
||||
organizer = [[[storedEvent parent] firstChildWithTag: [storedEventObject componentTag]] organizer];
|
||||
[storedEvent setOrganizer: organizer];
|
||||
}
|
||||
}
|
||||
|
||||
[storedEvent retain];
|
||||
@@ -330,10 +353,10 @@
|
||||
NSString *value;
|
||||
|
||||
organizer = [[self authorativeEvent] organizer];
|
||||
if (organizer)
|
||||
value = [self _personForDisplay: organizer];
|
||||
else
|
||||
if ([organizer isVoid])
|
||||
value = @"[todo: no organizer set, use 'from']";
|
||||
else
|
||||
value = [self _personForDisplay: organizer];
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
<tr>
|
||||
<td valign="top"><var:string label:value="Attendees"/>:</td>
|
||||
<td>
|
||||
<var:foreach list="inEvent.participants" item="attendee">
|
||||
<var:foreach list="authorativeEvent.participants" item="attendee">
|
||||
<a var:href="attendee.email"><var:string value="attendeeForDisplay"/></a>
|
||||
(<var:string label:value="$attendee.partStatWithDefault" />)
|
||||
<br />
|
||||
@@ -192,7 +192,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<var:if condition="inEvent.comment.isNotEmpty">
|
||||
<var:if condition="authorativeEvent.comment.isNotEmpty">
|
||||
<tr> <!-- description in iCal -->
|
||||
<td valign="top"><var:string label:value="Comment"/>:</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user