version 1.47.2.61, 2006/10/19 07:32:51
|
version 1.47.2.63, 2006/11/06 16:08:30
|
Line 147 class MPIWGLink(SimpleItem):
|
Line 147 class MPIWGLink(SimpleItem):
|
else: |
else: |
return self.getObj().weight |
return self.getObj().weight |
|
|
manage_options=SimpleItem.manage_options+( |
manage_options=( |
{'label':'main config','action':'changeLinkForm'}, |
{'label':'main config','action':'changeLinkForm'}, |
) |
)+SimpleItem.manage_options |
|
|
|
|
def changeLinkForm(self): |
def changeLinkForm(self): |
Line 324 class MPIWGRoot(ZSQLExtendFolder):
|
Line 324 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
return str |
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): |
def versionHeaderEN(self): |
"""version header text""" |
"""version header text""" |
|
|
Line 453 class MPIWGRoot(ZSQLExtendFolder):
|
Line 482 class MPIWGRoot(ZSQLExtendFolder):
|
return True |
return True |
return False |
return False |
|
|
|
def getSection(self): |
|
"""returns the current section name""" |
|
root = self.absolute_url() |
|
url = self.REQUEST['URL'] |
|
path = string.replace(url, root, '') |
|
paths = path.split('/') |
|
if len(paths) > 0: |
|
sec = paths[1] |
|
if sec.find('.') < 0: |
|
return sec |
|
else: |
|
return None |
|
return None |
|
|
|
def getSectionStyle(self, name, style=""): |
|
"""returns a string with the given style + '-sel' if the current section == name""" |
|
if self.getSection() == name: |
|
return style + '-sel' |
|
else: |
|
return style |
|
|
|
def MPIWGrootURL(self): |
|
"""returns the URL to the root""" |
|
return self.absolute_url() |
|
|
def upDateSQL(self,fileName): |
def upDateSQL(self,fileName): |
"""updates SQL databases using fm.jar""" |
"""updates SQL databases using fm.jar""" |
Line 1302 class MPIWGRoot(ZSQLExtendFolder):
|
Line 1355 class MPIWGRoot(ZSQLExtendFolder):
|
if person =="Otto Sibum" : person="H. Otto Sibum" |
if person =="Otto Sibum" : person="H. Otto Sibum" |
if person =="Norton Wise" : person="M. Norton Wise" |
if person =="Norton Wise" : person="M. Norton Wise" |
#ret.append("<a href=%s >%s</a>"%(proj[0].absolute_url,person.encode('utf-8'))) |
#ret.append("<a href=%s >%s</a>"%(proj[0].absolute_url,person.encode('utf-8'))) |
ret.append("<a href=%s >%s</a>"%(proj[0].absolute_url+"/index.html",person)) |
if self.MPIWGrootURL().split("/")[-1]=='en': |
|
tmpPath="/en/staff/members/" |
|
else: |
|
tmpPath="/de/mitarbeiter/members/" |
|
ret.append("<a href=%s >%s</a>"%(tmpPath+proj[0].getObject().getId()+"/index.html",person)) |
else: |
else: |
#ret.append("%s"%person.encode('utf-8')) |
#ret.append("%s"%person.encode('utf-8')) |
ret.append("%s"%person) |
ret.append("%s"%person) |