-ACCEPTED = "accepted"
-COMPLETED = "completed"
-DECLINED = "declined"
-DELEGATED = "delegated"
-IN-PROCESS = "in process"
-NEEDS-ACTION = "needs action"
-TENTATIVE = "tentative"
+ACCEPTED = "accepted";
+COMPLETED = "completed";
+DECLINED = "declined";
+DELEGATED = "delegated";
+IN-PROCESS = "in process";
+NEEDS-ACTION = "needs action";
+TENTATIVE = "tentative";
+organized_by_you = "organized by you";
+you_are_an_attendee = "you are an attendee";
+add_info_text = "iMIP 'ADD' requests are not yet supported by SOGo.";
+publish_info_text = "The sender informs you of the attached event."
+cancel_info_text = "Your invitation or the whole event was canceled.";
+request_info_no_attendee = "is proposing a meeting to the attendees. You receive this mail as a notification, you are not scheduled as a participant.";
+Organizer = "Organizer";
+request_info = "invites you to participate in a meeting.";
+do_add_to_cal = "add to calendar";
+do_del_from_cal = "delete from calendar";
+do_accept = "accept";
+do_decline = "decline";
+do_tentative = "tentative";
+do_update_status = "update status in calendar";
+reply_info_no_attendee = "You received a reply to a scheduling event but the sender of the reply is not a participant.";
+reply_info = "This is a reply to an event invitation done by you.";
iCalEvent *storedEvent;
}
+- (iCalEvent *)authorativeEvent;
+
@end
#include <SOGoUI/SOGoDateFormatter.h>
- (NSCalendarDate *)startTime {
NSCalendarDate *date;
- date = [[self inEvent] startDate];
+ date = [[self authorativeEvent] startDate];
[date setTimeZone:[self viewTimeZone]];
return date;
}
- (NSCalendarDate *)endTime {
NSCalendarDate *date;
- date = [[self inEvent] endDate];
+ date = [[self authorativeEvent] endDate];
[date setTimeZone:[self viewTimeZone]];
return date;
}
-/* attendee fields */
-
-- (NSString *)attendeeStatusLabel {
- NSString *p;
-
- p = [[self attendee] partStat];
-
- if ([p hasPrefix:@"x-"] || [p hasPrefix:@"X-"]) {
- p = [self labelForKey:@"icalstatus_extended_prefix"];
- return [p stringByAppendingString:[p substringFromIndex:2]];
- }
-
- if ([p length] == 0) p = @"NEEDS-ACTION";
- p = [@"icalstatus_" stringByAppendingString:p];
- return [self labelForKey:p];
+- (BOOL)isEndDateOnSameDay {
+ return [[self startTime] isDateOnSameDay:[self endTime]];
+}
+- (NSTimeInterval)duration {
+ return [[self endTime] timeIntervalSinceDate:[self startTime]];
}
/* calendar folder support */
<var:string value="inEvent.summary" /> <!-- TODO: shorted title -->
<var:if condition="isLoggedInUserTheOrganizer">
- (<var:string label:value="organized by you"/>)
+ (<var:string label:value="organized_by_you"/>)
</var:if>
<var:if condition="isLoggedInUserAnAttendee">
- (<var:string label:value="you are an attendee"/>)
+ (<var:string label:value="you_are_an_attendee"/>)
</var:if>
</legend>
- <p>
- <a var:href="acceptLink" >accept</a> |
- <a var:href="declineLink" >decline</a> |
- <a var:href="tentativeLink">tentative</a>
- </p>
-
- <var:if condition="isEventStoredInCalendar" const:negate="1">
- <!--
- TODO: check whether the user is a participant or organizer, otherwise
- he won't see the event!
- -->
- <p>
- The event is not in your primary calendar:
- <a var:href="addToCalendarLink">add to calendar</a>.
- </p>
- </var:if>
- <!-- TODO: show _parent link to jump to the calendar entry -->
-
<var:if condition="inCalendar.method" const:value="REQUEST">
<!-- sent to attendees to propose or update a meeting -->
<var:if condition="isLoggedInUserAnAttendee">
+ <p class="uix_ical_toolbar">
+ <a var:href="acceptLink" label:string="do_accept"/> |
+ <a var:href="declineLink" label:string="do_decline"/> |
+ <a var:href="tentativeLink" label:string="do_tentative"/>
+ <var:if condition="isEventStoredInCalendar" const:negate="1">
+ | <a var:href="addToCalendarLink" label:string="do_add_to_cal" />
+ </var:if>
+ </p>
+
<p>
- Organizer
+ <var:string label:value="Organizer" />
<a var:href="inEvent.organizer.email"
><var:string value="organizerDisplayName" /></a>
- invites you to participate in a meeting.
+ <var:string label:value="request_info" />
</p>
- <!-- TODO: buttons: accept/decline/tentatively -->
</var:if>
<var:if condition="isLoggedInUserAnAttendee" const:negate="1">
<p>
- Organizer
+ <var:string label:value="Organizer" />
<a var:href="inEvent.organizer.email"
><var:string value="organizerDisplayName" /></a>
- is proposing a meeting to the attendees. You receive this
- mail as a notification, you are not scheduled as a participant.
+ <var:string label:value="request_info_no_attendee" />
</p>
</var:if>
</var:if>
<var:if condition="inCalendar.method" const:value="REPLY">
<!-- sent to organizer to update the status of the participant -->
- <p>
- iMIP 'REPLY' requests are not yet supported by SOGo.
- <br />
- From: <!-- TODO: support for 'root' objects? -->
- <var:string value="replySenderEMail" />
- <br />
- Status Update:
- <var:string value="inReplyAttendee.partStat" />,
- <var:if condition="isReplySenderAnAttendee">
+ <var:if condition="isReplySenderAnAttendee" const:negate="1">
+ <p><var:string label:value="reply_info_no_attendee" /></p>
+ </var:if>
+
+ <var:if condition="isReplySenderAnAttendee">
+ <p class="uix_ical_toolbar">
+ <a var:href="addStatusReplyLink"
+ var:_newstat="$inReplyAttendee.partStatWithDefault"
+ var:_sender="replySenderBaseEMail"
+ label:string="do_update_status"/>
+ </p>
+
+ <!-- TODO: replies to events not in the calendar? -->
+
+ <p>
+ Status Update:
+ <var:string label:value="$inReplyAttendee.partStatWithDefault" />,
was:
- <var:string value="storedReplyAttendee.partStat" />.
- </var:if>
- <var:if condition="isReplySenderAnAttendee" const:negate="1">
- <b>the sender is not registered as an attendee!</b>
- </var:if>
- </p>
+ <var:string
+ label:value="$storedReplyAttendee.partStatWithDefault" />.
+ </p>
+ </var:if>
</var:if>
<var:if condition="inCalendar.method" const:value="CANCEL">
<!-- sent to attendees to notify of the attendee being removed or the
event being deleted -->
+ <var:if condition="isEventStoredInCalendar">
+ <p class="uix_ical_toolbar">
+ <a var:href="delFromCalendarLink" label:string="do_del_from_cal"/>
+ </p>
+ </var:if>
+
<p>
<!-- todo: if there are no attendees, the whole meeting was stopped -->
- Your invitation or the whole event was canceled.
+ <var:string label:value="cancel_info_text" />
</p>
</var:if>
<var:if condition="inCalendar.method" const:value="ADD">
<!-- TODO -->
- <p>
- iMIP 'ADD' requests are not yet supported by SOGo.
- </p>
+ <p><var:string label:value="add_info_text" /></p>
</var:if>
<var:if condition="inCalendar.method" const:value="PUBLISH">
<!-- none-scheduling event sent to someone for adding to the calendar -->
+ <p><var:string label:value="publish_info_text" /></p>
</var:if>
DECLINE-COUNTER
-->
</var:if>
+
+
+ <!-- the user comment is used in replies -->
+ <var:if condition="inEvent.userComment.isNotEmpty">
+ <div class="linked_attachment_meta" style="background-color: white;">
+ <var:string value="inEvent.userComment" const:insertBR="1" />
+ </div>
+ <br />
+ </var:if>
+
<div class="linked_attachment_meta" style="background-color: white;">
<table border="0" class="linked_attachment_meta">
<td>
<!-- TODO: we need a better viewer for that -->
<var:string value="startTime" formatter="dateFormatter" />
- -
+ <var:string label:value="to" />
<var:string value="endTime" formatter="dateFormatter" />
</td>
</tr>
<var:foreach list="authorativeEvent.participants" item="attendee">
<a var:href="attendee.email"
><var:string value="attendee.cnForDisplay" /></a>
- (<var:string value="attendeeStatusLabel" />)
+ (<var:string label:value="$attendee.partStatWithDefault" />)
<br />
</var:foreach>
</td>
</tr>
- <tr>
- <td valign="top"><var:string label:value="User Comment"/>:</td>
- <td>
- <var:string value="inEvent.userComment" const:insertBR="1" />
- </td>
- </tr>
-
- <tr> <!-- description in iCal -->
- <td valign="top"><var:string label:value="Comment"/>:</td>
- <td>
- <var:string value="authorativeEvent.comment" const:insertBR="1" />
- </td>
- </tr>
+ <var:if condition="inEvent.comment.isNotEmpty">
+ <tr> <!-- description in iCal -->
+ <td valign="top"><var:string label:value="Comment"/>:</td>
+ <td>
+ <var:string value="authorativeEvent.comment" const:insertBR="1" />
+ </td>
+ </tr>
+ </var:if>
</table>
</div>
</fieldset>