]> err.no Git - scalable-opengroupware.org/commitdiff
overall fix for the navigation
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 27 Jul 2004 12:27:30 +0000 (12:27 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 27 Jul 2004 12:27:30 +0000 (12:27 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@158 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/Main/ChangeLog
SOGo/Main/GNUmakefile
SOGo/Main/Version
SOGo/Main/sogod.m
SOGo/UI/Common/ChangeLog
SOGo/UI/Common/UIxAppNavView.m
SOGo/UI/Common/UIxPageFrame.m
SOGo/UI/Common/UIxPageFrame.wox
SOGo/UI/Common/Version

index faf0d4665e3f96a4ba9cd2115cb6419c515bbeef..723de465817a6ccc05e6a6014e21d948260cd487 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-27  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * sogod.m: added static SoRootURL to context (v0.9.4)
+
 2004-07-19  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * sogod.m, */Locale: converted to UTF-8 for better editability (v0.9.3)
index f294998099a032c0ffa9bf4c46797ce524126d8f..cedd1b321d417d2344b10d99c59273c936cffcea 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: GNUmakefile,v 1.13 2004/06/08 11:41:13 helge Exp $
+# $Id$
 
 include $(GNUSTEP_MAKEFILES)/common.make
 
index fc795f55c1387b14d99ba68f17adc4f527276f1f..749d66dc7109fb3f49932aae8e0c044ad7d4e6c0 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=3
+SUBMINOR_VERSION:=4
index 84d2a7fe7ed147bea949d7e523491c2206588b93..15646454f79c86d8bd6febf462440f26dc73e58e 100644 (file)
@@ -117,6 +117,11 @@ static BOOL doCrashOnSessionCreate = NO;
       locale = [self currentLocaleConsideringLanguages:langs];
       [_ctx takeValue:locale forKey:@"locale"];
   }
+  
+  /* set SoRootURL */
+  if(![_ctx valueForKey:@"SoRootURL"]) {
+      [_ctx takeValue:@"/sogod.woa/so/" forKey:@"SoRootURL"];
+  }
   /* first check attributes directly bound to the application */
   if ((obj = [super lookupName:_key inContext:_ctx acquire:_flag]))
     return obj;
index 1431b1fa04fa4b12cf226e14d33a2a45673aed7f..39381c5ccc4d822eb9033e1023aa094c46220361 100644 (file)
@@ -1,3 +1,15 @@
+2004-07-27  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.2
+
+       * UIxPageFrame.m: added convenience methods to access specific parts
+         of the URL.
+
+       * UIxPageFrame.wox: fixed navigation URLs. Inserted references to
+         rootURL where no content is currently available.
+
+       * UIxAppNavView.m: enhanced construction of navigation url path.
+
 2004-07-26  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * calendar.css: added styles for dayoverview's content.
index 54d3930e46f38adc66822145500edfd78403de87..2094c588506893b0440bd0f3589db848ea5dd3ef 100644 (file)
     
     if (![name hasPrefix:@"sogod"]) {
       NSMutableDictionary *c;
-      
+      NSString *url;
+
+      url = [obj baseURLInContext:[self context]];
+      if(![url hasSuffix:@"/"]) {
+          url = [url stringByAppendingString:@"/"];
+      }
       c = [[NSMutableDictionary alloc] initWithCapacity:2];
       [c setObject:name forKey:@"name"];
-      [c setObject:[obj baseURLInContext:[self context]] forKey:@"url"];
+      [c setObject:url forKey:@"url"];
       [navPathComponents addObject:c];
       [c release];
     }
index ba39e5f4b63c561927d0ada0c99cfbaf95f97736..089440db97d4823de5bcf379f007bee83af51704 100644 (file)
@@ -7,9 +7,16 @@
 
 @interface UIxPageFrame : SoComponent
 {
-  NSString *title;
+    NSString *title;
+    NSString *rootURL;
+    NSString *userRootURL;
 }
 
+- (SoUser *)user;
+- (NSString *)rootURL;
+- (NSString *)userRootURL;
+- (NSString *)calendarRootURL;
+
 @end
 
 #include "common.h"
@@ -18,6 +25,8 @@
 
 - (void)dealloc {
   [self->title release];
+  [self->rootURL release];
+  [self->userRootURL release];
   [super dealloc];
 }
 
 - (void)setTitle:(NSString *)_value {
   ASSIGN(self->title, _value);
 }
-
 - (NSString *)title {
   return self->title;
 }
 
-- (NSString *)login {
+- (SoUser *)user {
     WOContext *ctx;
-    SoUser *user;
     
     ctx = [self context];
-    user = [[[self clientObject] authenticatorInContext:ctx]
+    return [[[self clientObject] authenticatorInContext:ctx]
                                  userInContext:ctx];
-    return [user login];
 }
 
+- (NSString *)rootURL {
+    WOContext *ctx;
+    NSArray *traversalObjects;
+
+    if(self->rootURL)
+        return self->rootURL;
+
+    ctx = [self context];
+    traversalObjects = [ctx objectTraversalStack];
+    self->rootURL = [[[traversalObjects objectAtIndex:0]
+                                        rootURLInContext:ctx]
+                                        retain];
+    return self->rootURL;
+}
+
+- (NSString *)userRootURL {
+    WOContext *ctx;
+    NSArray *traversalObjects;
+
+    if(self->userRootURL)
+        return self->userRootURL;
+
+    ctx = [self context];
+    traversalObjects = [ctx objectTraversalStack];
+    self->userRootURL = [[[[traversalObjects objectAtIndex:1]
+                                             baseURLInContext:ctx]
+                                             stringByAppendingString:@"/"]
+                                             retain];
+    return self->userRootURL;
+}
+
+- (NSString *)calendarRootURL {
+    return [[self userRootURL] stringByAppendingString:@"Calendar/"];
+}
+
+
 @end /* UIxPageFrame */
index 622ecbab272e3f021c44aa2fcd893ed60f90b20c..3d424da475242678c85d2eba3a70ca3af9bd983e 100644 (file)
@@ -78,7 +78,7 @@
                         <tr>
                           <td>
                             <font class="skydockfont">
-                              <a href="/sogod.woa/so/" class="skydockfont">SOGo (<var:string value="login" />)</a>
+                              <a var:href="userRootURL" class="skydockfont">SOGo (<var:string value="user.login" />)</a>
                             </font>
                           </td>
                         </tr>
                         <tr>
                           <td valign="middle">
                             <font class="skydockfont">
-                              <a href="/OpenGroupware/x/dock" class="skydockfont">News</a>
+                              <a var:href="userRootURL" class="skydockfont">News</a>
                             </font>
                           </td>
                         </tr>
                         <tr>
                           <td valign="middle">
                             <font class="skydockfont">
-                              <a href="/OpenGroupware/x/dock" class="skydockfont">Projects</a>
+                              <a var:href="userRootURL" class="skydockfont">Projects</a>
                             </font>
                           </td>
                         </tr>
                         <tr>
                           <td valign="middle">
                             <font class="skydockfont">
-                              <a href="/OpenGroupware/x/dock" class="skydockfont">Contacts</a>
+                              <a var:href="userRootURL" class="skydockfont">Contacts</a>
                             </font>
                           </td>
                         </tr>
                         <tr>
                           <td valign="middle">
                             <font class="skydockfont">
-                              <a href="/OpenGroupware/x/dock" class="skydockfont">Companies</a>
+                              <a var:href="userRootURL" class="skydockfont">Companies</a>
                             </font>
                           </td>
                         </tr>
                         <tr>
                           <td valign="middle">
                             <font class="skydockfont">
-                              <a href="/OpenGroupware/x/dock" class="skyDockFont">Calendar</a>
+                              <a var:href="calendarRootURL" class="skyDockFont">Calendar</a>
                             </font>
                           </td>
                         </tr>
                         <tr>
                           <td valign="middle">
                             <font class="skydockfont">
-                              <a href="/OpenGroupware/x/dock" class="skydockfont">Tasks</a>
+                              <a var:href="userRootURL" class="skydockfont">Tasks</a>
                             </font>
                           </td>
                         </tr>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a href="/OpenGroupware/x/mail" class="skydockfont">New Email</a>
+                        <a var:href="userRootURL" class="skydockfont">New Email</a>
                       </td>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a href="/OpenGroupware/x/mail" class="skydockfont">Inbox</a>
+                        <a var:href="userRootURL" class="skydockfont">Inbox</a>
                       </td>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a href="/OpenGroupware/x/dock" class="skydockfont">Preferences</a>
+                        <a var:href="userRootURL" class="skydockfont">Preferences</a>
                       </td>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a href="/OpenGroupware/x/downloadBookmark" target="private_desktop" class="skydockfont">Home</a>
+                        <a var:href="userRootURL" target="private_desktop" class="skydockfont">Home</a>
                       </td>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a href="/OpenGroupware/x/downloadBookmark" target="public_desktop" class="skydockfont">Desktop</a>
+                        <a var:href="userRootURL" target="public_desktop" class="skydockfont">Desktop</a>
                       </td>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a href="/OpenGroupware/x/dock" class="skydockfont">Logout</a>
+                        <a var:href="userRootURL" class="skydockfont">Logout</a>
                       </td>
                     </tr>
                   </table>
             <tr>
               <td valign="top" align="left">
                 <font class="defaultfont"><var:entity const:name="copy"/>
-      2000-2004 <a href="http://www.skyrix.com:80/knoppix/skyrix/" target="SKYRIX">SKYRIX Software AG</a>.
-      We welcome your
-      <a href="http://www.opengroupware.org/en/feedback.html" target="feedback">feedback</a>.
-        </font>
+                  2000-2004 <a href="http://www.skyrix.com:80/knoppix/skyrix/"
+                               target="SKYRIX"
+                            >SKYRIX Software AG</a>. We welcome your <a href="http://www.opengroupware.org/en/feedback.html"
+                                                                        target="feedback"
+                                                                     >feedback</a>.
+                </font>
               </td>
               <td valign="top" align="right">
                 <font class="defaultfont">
-          No sessions required! ;-)
-        </font>
+                  No sessions required! ;-)
+                </font>
               </td>
             </tr>
           </table>
index d64ce5ad6612a2d6d7102ee381ead2f0f3fb343a..2c9bdd95ac11718db4432f22aa46d2f6f016f30b 100644 (file)
@@ -1,5 +1,5 @@
 # $Id: Version,v 1.1 2003/11/24 01:24:40 helge Exp $
 
-SUBMINOR_VERSION:=1
+SUBMINOR_VERSION:=2
 
 # 1.1.0 requires NGObjWeb 4.2.202