version 1.12, 2004/07/08 07:04:31
|
version 1.15, 2004/07/29 07:36:16
|
Line 100 class MPIWGRoot(ZSQLExtendFolder):
|
Line 100 class MPIWGRoot(ZSQLExtendFolder):
|
"""sort names""" |
"""sort names""" |
|
|
def sortLastName(x_c,y_c): |
def sortLastName(x_c,y_c): |
|
try: |
|
x=urllib.unquote(x_c).encode('utf-8','ignore') |
|
except: |
x=urllib.unquote(x_c) |
x=urllib.unquote(x_c) |
y=urllib.unquote(y_c) |
|
|
try: |
|
y=urllib.unquote(y_c).encode('utf-8','ignore') |
|
except: |
|
x=urllib.unquote(y_c) |
|
|
|
|
|
|
try: |
try: |
last_x=x.split()[len(x.split())-1] |
last_x=x.split()[len(x.split())-1] |
Line 198 class MPIWGRoot(ZSQLExtendFolder):
|
Line 207 class MPIWGRoot(ZSQLExtendFolder):
|
RESPONSE.redirect("showHistoricalPersons") |
RESPONSE.redirect("showHistoricalPersons") |
|
|
|
|
|
def getPersonDict(self,name): |
|
"""name von dict""" |
|
|
|
try: |
|
return self.personDict[name][0].encode('utf-8') |
|
except: |
|
return self.personDict[name][0] |
|
return self.personDict[name][0].decode('latin-1').encode('utf-8') |
|
|
|
|
def showHistoricalPersons(self): |
def showHistoricalPersons(self): |
"""show persons""" |
"""show persons""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/showHistoricalPersons').__of__(self) |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/showHistoricalPersons').__of__(self) |
Line 263 class MPIWGRoot(ZSQLExtendFolder):
|
Line 282 class MPIWGRoot(ZSQLExtendFolder):
|
if re.match(searchStr,project[1]): |
if re.match(searchStr,project[1]): |
|
|
if depth: |
if depth: |
print "ho" |
|
if int(depth)>=len(project[1].split("."))-len(childs.split(".")): |
if int(depth)>=len(project[1].split("."))-len(childs.split(".")): |
|
|
ret.append(project) |
ret.append(project) |
Line 393 class MPIWGRoot(ZSQLExtendFolder):
|
Line 412 class MPIWGRoot(ZSQLExtendFolder):
|
splittedId=idNr.split(".") |
splittedId=idNr.split(".") |
depth=len(splittedId) |
depth=len(splittedId) |
nr=idNr |
nr=idNr |
title=project[0].WEB_title |
#title=project[0].WEB_title |
|
title=[project[0].getContent('WEB_title')] |
|
#print title |
|
|
returnList.append((depth,nr,title,project[0])) |
returnList.append((depth,nr,title,project[0])) |
|
|
Line 457 class MPIWGRoot(ZSQLExtendFolder):
|
Line 478 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
|
|
|
|
|
def getRelativeUrlFromPerson(self,list): |
|
"""get urls to person list""" |
|
ret=[] |
|
persons=list.split(";") |
|
for person in persons: |
|
|
|
if len(person)>1: #nicht nur Trennzeichen |
|
splitted=person.split(",") |
|
if len(splitted)==1: |
|
splitted=person.split(" ") |
|
splittedNew=[re.sub(r'\s(.*)','$1',split) for split in splitted] |
|
if splittedNew[0]=='': |
|
del splittedNew[0] |
|
search=string.join(splittedNew,' AND ') |
|
|
|
if not search=='': |
|
|
|
try: |
|
proj=self.MembersCatalog({'title':search}) |
|
except: |
|
proj=None |
|
|
|
if proj: |
|
#ret.append("<a href=%s >%s</a>"%(proj[0].absolute_url,person.encode('utf-8'))) |
|
ret.append("<a href=%s >%s</a>"%('members/'+proj[0].id,person)) |
|
else: |
|
#ret.append("%s"%person.encode('utf-8')) |
|
ret.append("%s"%person) |
|
return string.join(ret,";") |
|
|
|
|
def getUrlFromPerson(self,list): |
def getUrlFromPerson(self,list): |
Line 717 class MPIWGProject(Folder):
|
Line 767 class MPIWGProject(Folder):
|
try: |
try: |
text =x.encode('utf-8') |
text =x.encode('utf-8') |
except: |
except: |
text="ERROR" |
text=x.decode('latin-1').encode('utf-8') |
|
|
#delete separator (;) if is there is one |
#delete separator (;) if is there is one |
try: |
try: |