]> err.no Git - scalable-opengroupware.org/commitdiff
work on ical viewer
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 18 Jul 2005 10:29:48 +0000 (10:29 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 18 Jul 2005 10:29:48 +0000 (10:29 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@784 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/UI/MailPartViewers/ChangeLog
SOGo/UI/MailPartViewers/English.lproj/Localizable.strings
SOGo/UI/MailPartViewers/UIxMailPartICalViewer.m
SOGo/UI/MailPartViewers/Version
SOGo/UI/SOGoUI/SOGoAptFormatter.m
SOGo/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox

index 0b2d961eb61e134f800c240af63fd7587c68abb9..673cd7d4d63d5f1179bbd5f7bb5fcfe472a4ecb6 100644 (file)
@@ -1,5 +1,11 @@
 2005-07-18  Helge Hess  <helge.hess@opengroupware.org>
 
+       * v0.9.14
+
+       * UIxMailPartICalViewer.m: replaced some methods with label bindings
+
+       * English.lproj/Localizable.strings: added more strings
+
        * UIxMailPartICalViewer.m: added -attendeeStatusLabel to produce a
          readable and localized part-stat (v0.9.13)
 
index e1d2eed7d702f15d6138942eb5ca7ebf33328f25..08cb2ebc47a4d685d2c6b3b18e9fa4ebd2336594 100644 (file)
@@ -1,7 +1,23 @@
-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.";
index cd9ab67e7439f0a4e74c5c9d8e414ea7beee9bdf..fd468cc0ea1739710a6c2dd47edcfd9deee5fd17 100644 (file)
@@ -41,6 +41,8 @@
   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 */
index fae4f21a75c78cd381da74e338bb4b9608e08e15..c2888967f985416fc39709340fd45c54fc574c6f 100644 (file)
@@ -1,6 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=13
+SUBMINOR_VERSION:=14
 
 # v0.9.0 requires libNGiCal v4.5.53
 # v0.9.1 requires libNGMime v4.5.213
index 750a0ee18a9c24a24a8511dc235d133dab4c815f..99f938c515bedd1c27c8652efc7228fc795a39d1 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2004 SKYRIX Software AG
+  Copyright (C) 2004-2005 SKYRIX Software AG
 
   This file is part of OpenGroupware.org.
 
@@ -18,7 +18,6 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
 
 #include "SOGoAptFormatter.h"
 #include "common.h"
index 0fdbba5706b7d14ef052b7d16210edeb5c1ff8ae..e14df9df9971ee53106335eb6775e61255b346bb 100644 (file)
       <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>