]> err.no Git - scalable-opengroupware.org/commitdiff
implemented homepage (almost done), removed 'schedule' tab
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 14 Jul 2005 09:46:51 +0000 (09:46 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 14 Jul 2005 09:46:51 +0000 (09:46 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@745 d1b88da0-ebda-0310-925b-ed51d893ca5b

24 files changed:
SOGo/Main/ChangeLog
SOGo/Main/English.lproj/Localizable.strings
SOGo/Main/GNUmakefile
SOGo/Main/SOGoUserHomePage.m
SOGo/Main/SOGoUserHomePage.wox
SOGo/Main/Version
SOGo/Main/homepage.js [new file with mode: 0644]
SOGo/Main/product.plist
SOGo/SoObjects/Appointments/ChangeLog
SOGo/SoObjects/Appointments/SOGoAppointmentFolder.m
SOGo/SoObjects/Appointments/Version
SOGo/SoObjects/SOGo/AgenorUserManager.h
SOGo/SoObjects/SOGo/AgenorUserManager.m
SOGo/SoObjects/SOGo/ChangeLog
SOGo/UI/Common/ChangeLog
SOGo/UI/Common/Version
SOGo/UI/Common/calendar.css
SOGo/UI/Common/uix.css
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/English.lproj/Localizable.strings
SOGo/UI/Scheduler/Version
SOGo/UI/Templates/ChangeLog
SOGo/UI/Templates/UIxCalScheduleOverview.wox
SOGo/UI/Templates/UIxCalSelectTab.wox

index 4c5e846ffdd18ac407630ef6c3f936f148cbb7d4..e90669624b41d17265a637a9a4ed1ebf5dbc5381 100644 (file)
@@ -1,3 +1,15 @@
+2005-07-14  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.31
+
+       * SOGoUserHomePage.[m, wox]: added internet access lock
+         display/modification and vacation state (currently only faked)
+
+       * homepage.js: JavaScript in use on the homepage
+
+       * English.lproj/Localizable.strings: removed old labels and added a
+         bunch of new labels
+
 2005-07-12  Helge Hess  <helge.hess@opengroupware.org>
        
        * v0.9.30
index 3ddf092e55cfa36463f17ede0e5e38d9640025a4..8bd9c98b2c6945314ee5bd9f5b1df29351cffb73 100644 (file)
@@ -1,5 +1,11 @@
 /* this file is in UTF-8 format! */
 
-"Calendar"     = "Calendar";
-"Addressbook"  = "Addressbook";
-"Mail"         = "Mail";
+"Homepage" = "Homepage";
+
+"Internet access authorized and" = "Internet access authorized and";
+"internetAccessState_0" = "CLOSED";
+"internetAccessState_1" = "OPEN";
+
+"Automatic vacation messages activation" = "Automatic vacation messages activation";
+"Internet" = "Internet";
+"Intranet" = "Intranet";
index e213405555f9eb922147d86c2c150693168bb03b..414e7f18905d3bd0d899d90bf3c590e86f9b39f8 100644 (file)
@@ -41,6 +41,8 @@ MainUI_RESOURCE_FILES +=      \
        SOGoUserHomePage.wox    \
        SOGoGroupPage.wox       \
        SOGoGroupsPage.wox      \
+       \
+       homepage.js             \
 
 MainUI_LOCALIZED_RESOURCE_FILES += \
        Locale Localizable.strings
index e3cdd016ccea5872ecf395451c09154437c872bf..e5e821dd51e6f1c43d749d073f501ceb165f7828 100644 (file)
@@ -23,6 +23,7 @@
 
 @interface SOGoUserHomePage : SoComponent
 {
+  id item;
 }
 
 - (NSString *)ownPath;
   
 @end
 
+#include <SOGo/AgenorUserManager.h>
+#include "SOGoUser.h"
 #include "common.h"
 
 @implementation SOGoUserHomePage
 
+static NSArray *internetAccessStates = nil;
+
++ (void)initialize {
+  static BOOL didInit = NO;
+  
+  if (didInit) return;
+  didInit = YES;
+  
+  internetAccessStates = [[NSArray alloc] initWithObjects:@"0", @"1", nil];
+}
+
+- (void)dealloc {
+  [self->item release];
+  [super dealloc];
+}
+
 /* lookup */
 
 - (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag {
   return nil;
 }
 
+/* accessors */
+
+- (void)setItem:(id)_item {
+  ASSIGN(self->item, _item);
+}
+- (id)item {
+  return self->item;
+}
+
+- (NSArray *)internetAccessStates {
+  return internetAccessStates;
+}
+
+- (NSString *)internetAccessState {
+  NSUserDefaults *ud;
+  NSNumber       *value;
+
+  ud    = [[[self context] activeUser] userDefaults];
+  value = [ud objectForKey:@"allowinternet"];
+  return [NSString stringWithFormat:@"%d", [value boolValue]];
+}
+- (void)setInternetAccessState:(NSString *)_internetAccessState {
+  NSUserDefaults *ud;
+  
+  ud = [[[self context] activeUser] userDefaults];
+  [ud setObject:_internetAccessState forKey:@"allowinternet"];
+  [ud synchronize];
+}
+
+- (NSString *)itemInternetAccessStateText {
+  NSString *key;
+  
+  key = [NSString stringWithFormat:@"internetAccessState_%@", self->item];
+  return key;
+}
+
 /* paths */
 
 - (NSString *)ownPath {
   return [self relativePathToUserFolderSubPath:@"Mail/"];
 }
 
+/* objects */
+
+- (id)calendarFolder {
+  return [[self clientObject] lookupName:@"Calendar"
+                              inContext:[self context]
+                              acquire:NO];
+}
+
+/* checking access */
+
+- (BOOL)canAccess {
+  WOContext *ctx;
+  NSString  *owner;
+
+  ctx   = [self context];
+  owner = [[self clientObject] ownerInContext:ctx];
+  return [owner isEqualToString:[[ctx activeUser] login]];
+}
+
+- (BOOL)isNotAllowedToChangeInternetAccess {
+  AgenorUserManager *um;
+  WOContext         *ctx;
+  NSString          *uid;
+
+  ctx = [self context];
+  /* do not allow changes when access is from Internet */
+  if (![ctx isAccessFromIntranet])
+    return YES;
+  um  = [AgenorUserManager sharedUserManager];
+  uid = [[ctx activeUser] login];
+  return [um isUserAllowedToChangeSOGoInternetAccess:uid] ? NO : YES;
+}
+
+- (BOOL)isVacationMessageEnabledForInternet {
+  return NO;
+}
+
+- (BOOL)isVacationMessageEnabledForIntranet {
+  return YES;
+}
+
 /* actions */
 
+#if 0
 - (id)defaultAction {
   return [self redirectToLocation:[self relativeCalendarPath]];
 }
+#endif
+
+/* this is triggered by an XMLHTTPRequest */
+- (id)saveInternetAccessStateAction {
+  NSString *state;
+  
+  if ([self isNotAllowedToChangeInternetAccess])
+    return [NSException exceptionWithHTTPStatus:403 /* Forbidden */];
+
+  state = [[[self context] request] formValueForKey:@"allowinternet"];
+  [self setInternetAccessState:state];
+  return [NSException exceptionWithHTTPStatus:200 /* OK */];
+}
 
 @end /* SOGoUserHomePage */
index 391f20f7063b78e8f2f474be4981072f5eb24e38..4850127618816634b29ae38d6840b45484b2d8af 100644 (file)
 <?xml version='1.0' standalone='yes'?>
-<var:component
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:var="http://www.skyrix.com/od/binding"
-  xmlns:const="http://www.skyrix.com/od/constant"
-  xmlns:uix="OGo:uix"
-  xmlns:label="OGo:label"
-  className="UIxPageFrame"
-  const:title="SOGo User Homepage"
+<var:component xmlns="http://www.w3.org/1999/xhtml"
+               xmlns:var="http://www.skyrix.com/od/binding"
+               xmlns:const="http://www.skyrix.com/od/constant"
+               xmlns:rsrc="OGo:url"
+               xmlns:label="OGo:label"
+               xmlns:uix="OGo:uix"
+               className="UIxPageFrame"
+               title="name"
 >
-  <h3 class="window_label">
-    OpenGroupware.org: 
-    <var:string value="clientObject.login" />
-  </h3>
-
-  <ul>
-    <li><a var:href="relativeCalendarPath"
-        ><var:string label:value="Calendar"/></a></li>
-    <li><a var:href="relativeContactsPath"
-        ><var:string label:value="Addressbook"/></a></li>
-    <li><a var:href="relativeMailPath"
-        ><var:string label:value="Mail"/></a></li>
-  </ul>
+  <var:if condition="canAccess" const:negate="YES">
+    <var:string label:value="Forbidden" const:style="window_label" />
+  </var:if>
+  <var:if condition="canAccess">
+      <script rsrc:src="generic.js"  > <!-- space required --></script>
+      <script rsrc:src="homepage.js" > <!-- space required --></script>
+    <table id="skywintable"
+           class="wintable"
+           cellspacing="0"
+           cellpadding="5"
+           width="100%"
+    >
+      <tr>
+        <td class="wintitle">
+          <table cellpadding="0" cellspacing="0" width="100%">
+            <tr>
+              <td width="5"/>
+              <td class="wintitle">
+                <span class="window_label">
+                <var:string label:value="Homepage"/>
+                </span>
+              </td>
+              <td width="36" align="right" valign="center">
+                <var:component className="UIxWinClose"/>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="wincontent">
+          <p class="homepagefont">
+              <var:string label:value="Internet access authorized and"
+              /> <var:popup const:name="allowinternet"
+                            list="internetAccessStates"
+                            item="item"
+                            label:string="$itemInternetAccessStateText"
+                            selection="internetAccessState"
+                            disabled="isNotAllowedToChangeInternetAccess"
+                            const:onchange="toggleInternetAccessState(this)"
+                 />
+            <br />
+            <var:string label:value="Automatic vacation messages activation" />:
+            <input type="checkbox"
+                   var:selection="isVacationMessageEnabledForInternet"
+                   var:checked="isVacationMessageEnabledForInternet"
+                   disabled="YES"
+            /> <var:string label:value="Internet" />
+            <input type="checkbox"
+                   var:selection="isVacationMessageEnabledForIntranet"
+                   var:checked="isVacationMessageEnabledForIntranet"
+                   disabled="YES"
+            /> <var:string label:value="Intranet" />
+              <input type="submit"
+                     value="SaveInternetAccessState"
+                     name="saveInternetAccessState:method"
+                     style="display: none;"
+              />
+          </p>
+          <p>
+            <var:component className="UIxCalScheduleOverview"
+                           clientObject="calendarFolder"
+            />
+          </p>
+        </td>
+      </tr>
+      <tr>
+        <td class="wincontent">
+          <table border="0" width="100%" cellpadding="0" cellspacing="0">
+            <tr>
+              <td colspan="2">
+              </td>
+            </tr>
+            <tr bgcolor="#F5F5E9">
+              <td align="left" width="10">
+                <var:entity const:name="nbsp"/>
+              </td>
+              <td align="right">
+                <img border="0"
+                     alt=""
+                     rsrc:src="corner_right.gif"
+                />
+              </td>
+            </tr>
+            <tr>
+              <td colspan="2" bgcolor="#F5F5E9">
+                <table border="0" width="100%" cellpadding="10" cellspacing="0">
+                  <tr/>
+                </table>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+    </table>
+  </var:if>
 </var:component>
index ce7ecb1fbc4be937594105aa38efd4b3f0b890d9..708a90e8bf44180f8fa9b8ceef044b188c1c6f3b 100644 (file)
@@ -1,6 +1,6 @@
 # Version file
 
-SUBMINOR_VERSION:=30
+SUBMINOR_VERSION:=31
 
 # v0.9.24 requires libWEExtensions v4.5.67
 # v0.9.16 requires libNGExtensions v4.5.136
diff --git a/SOGo/Main/homepage.js b/SOGo/Main/homepage.js
new file mode 100644 (file)
index 0000000..69057dd
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2005 SKYRIX Software AG
+ This file is part of OpenGroupware.org.
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ License for more details.
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING.  If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+ */
+/* JavaScript for SOGo Homepage */
+
+function toggleInternetAccessState(sender) {
+//    var form = document.getElementById("syncDefaultsForm");
+//    document.syncDefaultsForm.action="saveInternetAccessState:method";
+//    form.submit();
+    this.postInternetAccessState(sender, sender.value);
+    return true;
+}
+
+function postInternetAccessState(sender, state) {
+    var url;
+    var http = createHTTPClient();
+    
+    url = "edit?allowinternet=" + state;
+    
+    if (http) {
+        http.open("POST", url, false);
+        http.send(null);
+        if (http.status != 200) {
+            alert("Failed to change state: " + http.statusText);
+            window.opener.location.reload();
+        }
+    }
+    else {
+        window.opener.location.href = url;
+    }
+}
index 1303d9b15bbfbb3cff77d7e5bcf86f58bbc84102..fb29d2e7e0273de97522df4ac30b217f0ed8aa97 100644 (file)
     SOGoUserFolder = {
       superclass    = "SOGoFolder";
       methods = {
-        index = { 
+        view = { 
+          protectedBy = "View";
+          pageName    = "SOGoUserHomePage"; 
+        };
+        edit = { 
           protectedBy = "View";
           pageName    = "SOGoUserHomePage"; 
+          actionName  = "saveInternetAccessState";
         };
+        /*
         GET = { // more or less a hack, see README of dbd
           protectedBy = "View";
           pageName    = "SOGoUserHomePage"; 
         };
+        */
       };
     };
     
index ef7e4c600a4b77f4155db5e953d4c8da2cce4f13..be5e960499f83835b96a3d689494b4ca62220cc5 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-14  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * SOGoAppointmentFolder.m: changed redirect from 'schedule' to
+         'weekoverview' (v0.9.43)
+
 2005-07-14  Helge Hess  <helge.hess@opengroupware.org>
 
        * SOGoAppointmentFolder.m: moved +globallyUniqueObjectId method to
index 3faab10846ff8d40bf18c02356ba8d1d5a5e5259..5e56bb75b2b0597f33e4879f699b51ecbadd9340 100644 (file)
@@ -696,7 +696,7 @@ static NSTimeZone *MET    = nil;
 
   uri = [[_ctx request] uri];
   if (![uri hasSuffix:@"/"]) uri = [uri stringByAppendingString:@"/"];
-  uri = [uri stringByAppendingString:@"schedule"];
+  uri = [uri stringByAppendingString:@"weekoverview"];
 
   r = [_ctx response];
   [r setStatus:302 /* moved */];
index 02257ba2513ebec89166bdf2da670697c6b521bc..e6df4b3edeb8261f5f0654b089e2b263c7b8596e 100644 (file)
@@ -1,6 +1,6 @@
 # Version file
 
-SUBMINOR_VERSION:=42
+SUBMINOR_VERSION:=43
 
 # v0.9.42 requires libSOGo            v0.9.54
 # v0.9.32 requires libGDLContentStore v4.5.26
index 421ee1f2d6a67e5922a9c0fff8b2ac3b095dc9fd..0e278c73f297488e826d83113ced61f9e1df4180 100644 (file)
@@ -42,6 +42,7 @@
   SOGoLRUCache *emailCache;
   SOGoLRUCache *shareStoreCache;
   SOGoLRUCache *shareEMailCache;
+  SOGoLRUCache *changeInternetAccessCache;
 }
 
 + (id)sharedUserManager;
@@ -70,6 +71,8 @@
 
 - (NSUserDefaults *)getUserDefaultsForUID:(NSString *)_uid;
 
+- (BOOL)isUserAllowedToChangeSOGoInternetAccess:(NSString *)_uid;
+
 @end
 
 #endif /* __AgenorUserManager_H_ */
index 082f96606c150b4ae794a0d2f9a905050177be27..687e7cad4c972e3a7f7d9b51627b9cfb8c48db79 100644 (file)
@@ -37,7 +37,8 @@
 - (NSString *)_cachedEmailForUID:(NSString *)_uid;
 - (void)_cacheUID:(NSString *)_uid forEmail:(NSString *)_email;
 - (NSString *)_cachedUIDForEmail:(NSString *)_email;
-  
+
+- (BOOL)primaryIsUserAllowedToChangeSOGoInternetAccess:(NSString *)_uid;
 @end
 
 // TODO: add a timer to flush LRU caches every some hours
@@ -49,12 +50,13 @@ static BOOL     useLDAP     = NO;
 static NSString *ldapHost   = nil;
 static NSString *ldapBaseDN = nil;
 static NSNull   *sharedNull = nil;
-static NSString *fallbackIMAP4Server  = nil;
-static NSString *defaultMailDomain    = @"equipement.gouv.fr";
-static NSString *shareLDAPClass       = @"mineqMelBoite";
-static NSString *shareLoginSeparator  = @".-.";
-static NSString *mailEmissionAttrName = @"mineqMelmailEmission";
-static NSURL    *AgenorProfileURL     = nil;
+static NSString *fallbackIMAP4Server          = nil;
+static NSString *defaultMailDomain            = @"equipement.gouv.fr";
+static NSString *shareLDAPClass               = @"mineqMelBoite";
+static NSString *shareLoginSeparator          = @".-.";
+static NSString *mailEmissionAttrName         = @"mineqMelmailEmission";
+static NSString *changeInternetAccessAttrName = @"mineqOgoAccesInternet";
+static NSURL    *AgenorProfileURL             = nil;
 
 static NSArray *fromEMailAttrs = nil;
 
@@ -115,17 +117,20 @@ static NSArray *fromEMailAttrs = nil;
     self->emailCache      = [[SOGoLRUCache alloc] initWithCacheSize:10000];
     self->shareStoreCache = [[SOGoLRUCache alloc] initWithCacheSize:10000];
     self->shareEMailCache = [[SOGoLRUCache alloc] initWithCacheSize:10000];
+    self->changeInternetAccessCache =
+      [[SOGoLRUCache alloc] initWithCacheSize:10000];
   }
   return self;
 }
 
 - (void)dealloc {
-  [self->shareStoreCache release];
-  [self->shareEMailCache release];
-  [self->serverCache     release];
-  [self->cnCache         release];
-  [self->uidCache        release];
-  [self->emailCache      release];
+  [self->serverCache               release];
+  [self->cnCache                   release];
+  [self->uidCache                  release];
+  [self->emailCache                release];
+  [self->shareStoreCache           release];
+  [self->shareEMailCache           release];
+  [self->changeInternetAccessCache release];
   [super dealloc];
 }
 
@@ -843,6 +848,61 @@ static NSArray *fromEMailAttrs = nil;
   return defaults;
 }
 
+/* internet access lock */
+
+- (BOOL)isUserAllowedToChangeSOGoInternetAccess:(NSString *)_uid {
+  NSNumber *bv;
+  
+  bv = [self->changeInternetAccessCache objectForKey:_uid];
+  if (!bv) {
+    BOOL value;
+    
+    value = [self primaryIsUserAllowedToChangeSOGoInternetAccess:_uid];
+    bv    = [NSNumber numberWithBool:value];
+    [self->changeInternetAccessCache addObject:bv forKey:_uid];
+  }
+  return [bv boolValue];
+}
+
+- (BOOL)primaryIsUserAllowedToChangeSOGoInternetAccess:(NSString *)_uid {
+  static NSArray   *attrs = nil;
+  NGLdapConnection *conn;
+  EOQualifier      *q;
+  NSEnumerator     *resultEnum;
+  NGLdapEntry      *entry;
+  NGLdapAttribute  *attr;
+  NSString         *value;
+  
+  if (attrs == nil)
+    attrs = [[NSArray alloc] initWithObjects:changeInternetAccessAttrName, nil];
+  
+  q = [EOQualifier qualifierWithQualifierFormat:@"uid = %@", _uid];
+  
+  conn       = [self ldapConnection];
+  resultEnum = [conn deepSearchAtBaseDN:ldapBaseDN
+                     qualifier:q
+                     attributes:attrs];
+  entry = [resultEnum nextObject];
+  if (entry == nil) {
+    if(debugOn) {
+      [self logWithFormat:@"%s Didn't find LDAP entry for uid '%@'!",
+        __PRETTY_FUNCTION__,
+        _uid];
+    }
+    return NO;
+  }
+  attr = [entry attributeWithName:changeInternetAccessAttrName];
+  if(attr == nil && debugOn) {
+    [self logWithFormat:@"%s LDAP entry for uid '%@' "
+                        @"has no mineqOgoAccesInternet attribute?",
+                        __PRETTY_FUNCTION__,
+                        _uid];
+    return NO; /* nothing we can do about it */
+  }
+  value = [attr stringValueAtIndex:0];
+  return [value boolValue];
+}
+
 /* debugging */
 
 - (BOOL)isDebuggingEnabled {
index fd226845758de762621f0c222bb97effabb69f67..950d2a6c9929b42f91abc4a883427d62d88fedb5 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-14  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * AgenorUserManager.[hm]: added accessors and cache for the
+         'mineqOgoAccesInternet' flag (v0.9.56)
+
 2005-07-14  Helge Hess  <helge.hess@opengroupware.org>
 
        * SOGoContentObject.m: added empty davCopy/davMove methods (v0.9.55)
index d239cc1460b48a3091a9958cfaf72841e86d6cc8..a973f725a944b6739511ac5df27f9d45d919db69 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-14  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * calendar.css, uix.css: added homepagefont and added 'title' class
+         to use in the scheduler overview (v0.9.41)
+
 2005-07-13  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * English.lproj/Localizable.strings: removed label "You are here" and
index eee34e2bfb45f4302f96fe2fb8a83b8304b49895..e13dc4034a0c7e312217bff6a524295e88fa4095 100644 (file)
@@ -1,5 +1,5 @@
 # Version file
 
-SUBMINOR_VERSION:=40
+SUBMINOR_VERSION:=41
 
 # v0.9.28 requires NGExtensions v4.5.136
index 198eae4d2b52f1b248096f178e92e677280d4ccf..8097ff415910135389a0404d9fdde7b7f1279c6f 100644 (file)
   font-size:        10pt;
 }
 
+.title {
+  font-size:        12pt;
+  font-weight:      bold;
+  background-color: #d8d8d0;
+}
+
 th.schedoverview_title {
   font-size:        10pt;
   font-weight:      bold;
index de9a4fb47374bb6abdb73ace626378a393d46fed..0c5e2be42fe59795a565913ddbeaa197e1b5b512 100644 (file)
@@ -48,6 +48,13 @@ a:hover {
   font-weight:      bold;
 }
 
+.homepagefont {
+  text-decoration:  none;
+  font-family:      Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+  font-size:        10pt;
+  color:            #000000;
+}
+
 
 /* tabs */
 
index 1d86f5a5fd1117a627275545315978d66023dc07..3bf94cdae4f42bb6225ca84fd955aafcd38b5d04 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-13  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * English.lproj/Localizable.strings: "Schedule" maps to
+         "Appointment propositions" now (v0.9.129)
+
 2005-07-11  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * UIxCalView.h: added -setAppointments: to the public API
index 8e481dc84e2905379712e35fd5072e249f5f59d1..121eb359c1b5dec33f27f4e246f17cfa613f0397 100644 (file)
@@ -89,7 +89,7 @@
 
 /* Schedule */
 
-"Schedule"             = "Schedule";
+"Schedule"             = "Appointment propositions";
 "No appointments found" = "You don't have any appointments in the near future.";
 "Meetings proposed by you" = "Meetings proposed by you";
 "Meetings proposed to you" = "Meetings proposed to you";
index b5a7494a0995c61dea6f85e613865761bcf2a4b1..90762af80ef790248cc4af3379e5fce135626c1a 100644 (file)
@@ -1,6 +1,6 @@
 # Version file
 
-SUBMINOR_VERSION:=128
+SUBMINOR_VERSION:=129
 
 # v0.9.123 requires Appointments v0.9.35
 # v0.9.123 requires SOGoUI       v0.9.24
index 6a3c21cd6ad149c38af86b1a54f0d97bfab1bb49..031e1d9edbfa6fb06dd84c3e41132befbc484545 100644 (file)
@@ -1,3 +1,10 @@
+2005-07-14  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * UIxCalSelectTab.wox: removed 'Schedule' tab.
+
+       * UIxCalScheduleOverview.wox: rewritten to be a subcomponent instead
+         of a proper page. This is used by SOGoHomePage now.
+
 2005-07-13  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * *.wox: fixed all corner_right.gif image resources
index 50b7bdcd5326e8e9587f1f5a5c721dd0c7e2ec26..9d46d97ea757c273d9b80228b7910c74972de980 100644 (file)
 <?xml version='1.0' standalone='yes'?>
 
-<var:component xmlns="http://www.w3.org/1999/xhtml"
-               xmlns:var="http://www.skyrix.com/od/binding"
-               xmlns:const="http://www.skyrix.com/od/constant"
-               xmlns:rsrc="OGo:url"
-               xmlns:label="OGo:label"
-               className="UIxPageFrame"
-               title="name"
+<span xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:var="http://www.skyrix.com/od/binding"
+      xmlns:const="http://www.skyrix.com/od/constant"
+      xmlns:rsrc="OGo:url"
+      xmlns:label="OGo:label"
 >
-  <var:if condition="canAccess" const:negate="YES">
-    <var:string label:value="Forbidden" />
-  </var:if>
-  <var:if condition="canAccess">
-    <table id="skywintable"
-           class="wintable"
-           cellspacing="0"
-           cellpadding="5"
-           width="100%"
-    >
+  <table border="0"
+         width="100%"
+         cellpadding="2"
+         cellspacing="0"
+         class="schedoverview"
+  >
+    <tr>
+      <th colspan="5" class="schedoverview title">
+        <var:string label:value="Schedule"/>
+        <var:string value="startDate" label:dateformat="dayLabelFormat" /> -
+        <var:string value="endDate" label:dateformat="dayLabelFormat" />
+      </th>
+    </tr>
+    <var:if condition="hasAnyAppointments" const:negate="YES">
       <tr>
-        <td class="wintitle">
-          <table cellpadding="0" cellspacing="0" width="100%">
+        <td colspan="5">
+          <var:string label:value="No appointments found"
+                      const:style="schedoverview"
+          />
+        </td>
+      </tr>
+    </var:if>
+    <var:if condition="hasAnyAppointments">
+      <var:if condition="hasUserAppointments">
+        <tr>
+          <!-- meetings proposed by user -->
+          <th colspan="5" class="schedoverview_title">
+            <var:string label:value="Meetings proposed by you" />
+          </th>
+        </tr>
+        <tr>
+          <th class="schedoverview"
+          ><var:string label:value="Start date" /></th>
+          <th class="schedoverview"
+          ><var:string label:value="Title" /></th>
+          <th class="schedoverview"
+              colspan="2"
+          ><var:string label:value="participants"/></th>
+        </tr>
+        <var:foreach list="userAppointments"
+                     item="item"
+        >
+          <var:foreach count="renderedParticipantsCount"
+                       index="participantIndex"
+          >
             <tr>
-              <td width="5"/>
-              <td class="wintitle">
-                <span class="window_label">
-                <var:string label:value="Schedule"/>
-                <var:string value="startDate" label:dateformat="dayLabelFormat" /> -
-                <var:string value="endDate" label:dateformat="dayLabelFormat" />
-                </span>
+              <var:if condition="isFirstParticipant">  
+                <td class="schedoverview"
+                    var:rowspan="rowspan"
+                >
+                  <var:string value="item.startDate"
+                              label:dateformat="sched_startDateFormat"
+                  />
+                </td>
+                <td class="schedoverview"
+                    var:rowspan="rowspan"
+                >
+                  <a var:href="appointmentViewURL"
+                     class="schedoverview"
+                  ><var:string value="item.title"
+                               const:escapeHTML="YES"
+                   /></a>
+                </td>
+              </var:if>
+              <td class="schedoverview">
+                <var:string value="participant" />
               </td>
-              <td width="36" align="right" valign="center">
-                <var:component className="UIxWinClose"/>
+              <td class="schedoverview">
+                <var:component className="UIxCalParticipationStatusView"
+                               partStat="participationStatus"
+                />
               </td>
             </tr>
-          </table>
-        </td>
-      </tr>
-      <tr>
-        <td id="skywinbodycell" class="wincontent">
-          <table border="0" width="100%" cellpadding="0" cellspacing="0">
+          </var:foreach>
+          <var:if condition="didTruncateParticipants">
             <tr>
-              <td colspan="2">
-                <var:component className="UIxCalSelectTab"
-                               const:selection="schedule"
-                               currentDate="selectedDate"
-                >
-                  <var:if condition="hasAnyAppointments" const:negate="YES">
-                    <var:string label:value="No appointments found"
-                                const:style="schedoverview"
-                    />
-                  </var:if>
-                  <var:if condition="hasAnyAppointments">
-                    <table border="0"
-                           width="100%"
-                           cellpadding="2"
-                           cellspacing="0"
-                           class="schedoverview"
-                    >
-                      <var:if condition="hasUserAppointments">
-                        <tr>
-                          <!-- meetings proposed by user -->
-                          <th colspan="5" class="schedoverview_title">
-                            <var:string label:value="Meetings proposed by you" />
-                          </th>
-                        </tr>
-                        <tr>
-                          <th class="schedoverview"
-                          ><var:string label:value="Start date" /></th>
-                          <th class="schedoverview"
-                          ><var:string label:value="Title" /></th>
-                          <th class="schedoverview"
-                              colspan="2"
-                          ><var:string label:value="participants"/></th>
-                        </tr>
-                        <var:foreach list="userAppointments"
-                                     item="item"
-                        >
-                          <var:foreach count="renderedParticipantsCount"
-                                       index="participantIndex"
-                          >
-                            <tr>
-                              <var:if condition="isFirstParticipant">  
-                                <td class="schedoverview"
-                                    var:rowspan="rowspan"
-                                >
-                                  <var:string value="item.startDate"
-                                              label:dateformat="sched_startDateFormat"
-                                  />
-                                </td>
-                                <td class="schedoverview"
-                                    var:rowspan="rowspan"
-                                >
-                                  <a var:href="appointmentViewURL"
-                                     class="schedoverview"
-                                  ><var:string value="item.title"
-                                               const:escapeHTML="YES"
-                                   /></a>
-                                </td>
-                              </var:if>
-                              <td class="schedoverview">
-                                <var:string value="participant" />
-                              </td>
-                              <td class="schedoverview">
-                                <var:component className="UIxCalParticipationStatusView"
-                                               partStat="participationStatus"
-                                />
-                              </td>
-                            </tr>
-                          </var:foreach>
-                          <var:if condition="didTruncateParticipants">
-                            <tr>
-                              <td colspan="2" class="schedoverview">
-                                <a var:href="appointmentViewURL"
-                                   class="schedoverview"
-                                ><var:string value="truncatedParticipantsCount" />
-                                <var:string label:value="more participants" />...
-                                </a>
-                              </td>
-                            </tr>
-                          </var:if>
-                        </var:foreach>
-                      </var:if>
-
-                      <var:if condition="hasForeignAppointments">
-                        <var:if condition="hasUserAppointments">
-                          <tr>
-                            <td><var:entity const:name="nbsp" /></td>
-                          </tr>
-                        </var:if>
-                        <tr>
-                          <!-- meetings proposed to user -->
-                          <th colspan="5" class="schedoverview_title">
-                            <var:string label:value="Meetings proposed to you" />
-                          </th>
-                        </tr>
-                        <tr>
-                          <th class="schedoverview"
-                          ><var:string label:value="Start date" /></th>
-                          <th class="schedoverview"
-                          ><var:string label:value="Title" /></th>
-                          <th class="schedoverview"
-                              colspan="2"
-                          ><var:string label:value="participants" /></th>
-                          <th class="schedoverview"
-                          ><var:string label:value="action" /></th>
-                        </tr>
-                        <var:foreach list="foreignAppointments"
-                                     item="item"
-                        >
-                          <var:foreach count="renderedParticipantsCount"
-                                       index="participantIndex"
-                          >
-                            <tr>
-                              <var:if condition="isFirstParticipant">  
-                                <td class="schedoverview"
-                                    var:rowspan="rowspan"
-                                >
-                                  <var:string value="item.startDate"
-                                              label:dateformat="sched_startDateFormat"
-                                  />
-                                </td>
-                                <td class="schedoverview"
-                                    var:rowspan="rowspan"
-                                >
-                                  <a var:href="appointmentViewURL"
-                                     class="schedoverview"
-                                  ><var:string value="item.title"
-                                               const:escapeHTML="YES"
-                                   /></a>
-                                </td>
-                              </var:if>
-                              <td class="schedoverview">
-                                <var:string value="participant" />
-                              </td>
-                              <td class="schedoverview">
-                                <var:component className="UIxCalParticipationStatusView"
-                                               partStat="participationStatus"
-                                />
-                              </td>
-                              <td class="schedoverview">
-                                <var:if-key const:key="participantIndex"
-                                            value="userIndex"
-                                >
-                                  <var:if-key const:key="userParticipationStatus"
-                                              const:value="1"
-                                              const:negate="YES"
-                                  >  
-                                    <a var:href="acceptAppointmentURL"
-                                       class="button_auto"
-                                    ><var:string label:value="accept" /></a>
-                                  </var:if-key>
-                                  <var:if-key const:key="userParticipationStatus"
-                                              const:value="2"
-                                              const:negate="YES"
-                                  >  
-                                    <a var:href="declineAppointmentURL"
-                                       class="button_auto"
-                                    ><var:string label:value="decline" /></a>
-                                  </var:if-key>
-                                </var:if-key>
-                              </td>
-                            </tr>
-                          </var:foreach>
-                          <var:if condition="didTruncateParticipants">
-                            <tr>
-                              <td colspan="3" class="schedoverview">
-                                <a var:href="appointmentViewURL"
-                                   class="schedoverview"
-                                ><var:string value="truncatedParticipantsCount" />
-                                <var:string label:value="more participants" />...
-                                </a>
-                              </td>
-                            </tr>
-                          </var:if>
-                        </var:foreach>
-                      </var:if>
-                    </table>
-                  </var:if>
-                  <var:if condition="isUIxDebugEnabled">
-                    <p class="schedoverview">      
-                      workflow<br />
-                      ========<br />
-                      
-                      in fact, the workflow we wish to implement is :
-                      person A sets a meeting with B and C
-                      when he sets it, he clicks on a button : either "propose" or
-                      "propose and mail" (obvious)
-                      In both case, when B and C logs into SOGo, they see, in their
-                      'news page', that a new meeting has beeing proposed
-                      then by clicking on it, they can accept it
-                      on the news, you have to show : meetings proposed to the person
-                      logging in, meetings proposed BY the person logging in,
-                      and their different acceptance
-                      
-                      if you reject the meeting, it still appears in the news page
-                      as refused
-                      
-                      We have still two issues : ergonomic and functionnal
-                      
-                      The ergonomic one : I propose two sections in the news page,
-                      with each being a table, containing, each line, an apt,
-                      with title, day, hour, participants (truncated), the line
-                      being green if it has been accepted by all, red if rejected
-                      by someone
-                      grey if in another state
-                      
-                      the functionnal : a meeting that is still not accepted by
-                      everyone must appear in each participant's view, and be
-                      counted in the conflict manager, or not ?
-                      it's an open point
-                    </p>
-                  </var:if>
-                </var:component>
+              <td colspan="2" class="schedoverview">
+                <a var:href="appointmentViewURL"
+                   class="schedoverview"
+                ><var:string value="truncatedParticipantsCount" />
+                <var:string label:value="more participants" />...
+                </a>
               </td>
             </tr>
-            <tr bgcolor="#F5F5E9">
-              <td align="left" width="10">
-                <var:entity const:name="nbsp"/>
+          </var:if>
+        </var:foreach>
+      </var:if>
+      <var:if condition="hasForeignAppointments">
+        <var:if condition="hasUserAppointments">
+          <tr>
+            <td><var:entity const:name="nbsp" /></td>
+          </tr>
+        </var:if>
+        <tr>
+          <!-- meetings proposed to user -->
+          <th colspan="5" class="schedoverview_title">
+            <var:string label:value="Meetings proposed to you" />
+          </th>
+        </tr>
+        <tr>
+          <th class="schedoverview"
+          ><var:string label:value="Start date" /></th>
+          <th class="schedoverview"
+          ><var:string label:value="Title" /></th>
+          <th class="schedoverview"
+              colspan="2"
+          ><var:string label:value="participants" /></th>
+          <th class="schedoverview"
+          ><var:string label:value="action" /></th>
+        </tr>
+        <var:foreach list="foreignAppointments"
+                     item="item"
+        >
+          <var:foreach count="renderedParticipantsCount"
+                       index="participantIndex"
+          >
+            <tr>
+              <var:if condition="isFirstParticipant">  
+                <td class="schedoverview"
+                    var:rowspan="rowspan"
+                >
+                  <var:string value="item.startDate"
+                              label:dateformat="sched_startDateFormat"
+                  />
+                </td>
+                <td class="schedoverview"
+                    var:rowspan="rowspan"
+                >
+                  <a var:href="appointmentViewURL"
+                     class="schedoverview"
+                  ><var:string value="item.title"
+                               const:escapeHTML="YES"
+                   /></a>
+                </td>
+              </var:if>
+              <td class="schedoverview">
+                <var:string value="participant" />
               </td>
-              <td align="right">
-                <img border="0"
-                     alt=""
-                     src="/sogod.woa/so/ControlPanel/Products/CommonUI/Resources/corner_right.gif"
+              <td class="schedoverview">
+                <var:component className="UIxCalParticipationStatusView"
+                               partStat="participationStatus"
                 />
               </td>
+              <td class="schedoverview">
+                <var:if-key const:key="participantIndex"
+                            value="userIndex"
+                >
+                  <var:if-key const:key="userParticipationStatus"
+                              const:value="1"
+                              const:negate="YES"
+                  >  
+                    <a var:href="acceptAppointmentURL"
+                       class="button_auto"
+                    ><var:string label:value="accept" /></a>
+                  </var:if-key>
+                  <var:if-key const:key="userParticipationStatus"
+                              const:value="2"
+                              const:negate="YES"
+                  >  
+                    <a var:href="declineAppointmentURL"
+                       class="button_auto"
+                    ><var:string label:value="decline" /></a>
+                  </var:if-key>
+                </var:if-key>
+              </td>
             </tr>
+          </var:foreach>
+          <var:if condition="didTruncateParticipants">
             <tr>
-              <td colspan="2" bgcolor="#F5F5E9">
-                <table border="0" width="100%" cellpadding="10" cellspacing="0">
-                  <tr/>
-                </table>
+              <td colspan="3" class="schedoverview">
+                <a var:href="appointmentViewURL"
+                   class="schedoverview"
+                ><var:string value="truncatedParticipantsCount" />
+                <var:string label:value="more participants" />...
+                </a>
               </td>
             </tr>
-          </table>
-        </td>
-      </tr>
-    </table>
-  </var:if>
-</var:component>
\ No newline at end of file
+          </var:if>
+        </var:foreach>
+      </var:if>
+    </var:if>
+  </table>
+</span>
\ No newline at end of file
index 9b92106240b58e598c84879ce1671dddcfd35f74..fcc60180abcf4d3e2c48fba495b5c0c12a5181c0 100644 (file)
              const:selectedTabStyle="tab_selected"
              const:bodyStyle="tabview_body"
 >
-  <uix:tab const:key="schedule"
-           label:label="Schedule"
-           var:href="scheduletabLink"
-  >
-     <var:component-content />
-  </uix:tab>
   <uix:tab const:key="day" var:label="dayLabel" var:href="daytabLink">
      <var:component-content />
   </uix:tab>