--- MPIWGWeb/MPIWGProjects.py 2006/10/27 18:37:20 1.47.2.62
+++ MPIWGWeb/MPIWGProjects.py 2006/11/06 16:08:30 1.47.2.63
@@ -147,9 +147,9 @@ class MPIWGLink(SimpleItem):
else:
return self.getObj().weight
- manage_options=SimpleItem.manage_options+(
+ manage_options=(
{'label':'main config','action':'changeLinkForm'},
- )
+ )+SimpleItem.manage_options
def changeLinkForm(self):
@@ -324,6 +324,35 @@ class MPIWGRoot(ZSQLExtendFolder):
return str
+
+ def browserCheck(self):
+ """check the browsers request to find out the browser type"""
+ bt = {}
+ ua = self.REQUEST.get_header("HTTP_USER_AGENT")
+ bt['ua'] = ua
+ bt['isIE'] = False
+ bt['isN4'] = False
+ if string.find(ua, 'MSIE') > -1:
+ bt['isIE'] = True
+ else:
+ bt['isN4'] = (string.find(ua, 'Mozilla/4.') > -1)
+
+ try:
+ nav = ua[string.find(ua, '('):]
+ ie = string.split(nav, "; ")[1]
+ if string.find(ie, "MSIE") > -1:
+ bt['versIE'] = string.split(ie, " ")[1]
+ except: pass
+
+ bt['isMac'] = string.find(ua, 'Macintosh') > -1
+ bt['isWin'] = string.find(ua, 'Windows') > -1
+ bt['isIEWin'] = bt['isIE'] and bt['isWin']
+ bt['isIEMac'] = bt['isIE'] and bt['isMac']
+ bt['staticHTML'] = False
+
+ return bt
+
+
def versionHeaderEN(self):
"""version header text"""
@@ -460,7 +489,11 @@ class MPIWGRoot(ZSQLExtendFolder):
path = string.replace(url, root, '')
paths = path.split('/')
if len(paths) > 0:
- return paths[1]
+ sec = paths[1]
+ if sec.find('.') < 0:
+ return sec
+ else:
+ return None
return None
def getSectionStyle(self, name, style=""):
@@ -1322,7 +1355,11 @@ class MPIWGRoot(ZSQLExtendFolder):
if person =="Otto Sibum" : person="H. Otto Sibum"
if person =="Norton Wise" : person="M. Norton Wise"
#ret.append("%s"%(proj[0].absolute_url,person.encode('utf-8')))
- ret.append("%s"%(proj[0].absolute_url+"/index.html",person))
+ if self.MPIWGrootURL().split("/")[-1]=='en':
+ tmpPath="/en/staff/members/"
+ else:
+ tmpPath="/de/mitarbeiter/members/"
+ ret.append("%s"%(tmpPath+proj[0].getObject().getId()+"/index.html",person))
else:
#ret.append("%s"%person.encode('utf-8'))
ret.append("%s"%person)
@@ -2516,4 +2553,4 @@ def manage_addMPIWGProject(self,id,RESPO
if RESPONSE is not None:
- RESPONSE.redirect('manage_main')
\ No newline at end of file
+ RESPONSE.redirect('manage_main')