--- MPIWGWeb/MPIWGProjects.py 2004/09/02 14:59:02 1.25 +++ MPIWGWeb/MPIWGProjects.py 2004/09/03 08:04:21 1.26 @@ -362,14 +362,14 @@ class MPIWGRoot(ZSQLExtendFolder): splitted=line.split(",") - print splitted + # print splitted if not (splitted[0]==""): newObj=MPIWGStaff.MPIWGStaff(splitted[0],splitted[1],splitted[2]) try: project._setObject(splitted[0],newObj) - print "done:",splitted[0] + #print "done:",splitted[0] except: print "not done:",splitted[0] @@ -428,19 +428,19 @@ class MPIWGRoot(ZSQLExtendFolder): def formatElementForOverview(self,element): """format the element for output in overview""" if element[0]==1: #department - print element[3].getContent('xdata_05') + #print element[3].getContent('xdata_05') if element[3].getContent('xdata_05') == "4": - return """

Ind. Research Group I: %s

"""%(element[3].absolute_url(),element[3].getContent('WEB_title')) + return """

Ind. Research Group I: %s

"""%(element[3].absolute_url()+"/index_html",element[3].getContent('WEB_title')) if element[3].getContent('xdata_05') == "5": - return """

Ind. Research Group II: %s

"""%(element[3].absolute_url(),element[3].getContent('WEB_title')) + return """

Ind. Research Group II: %s

"""%(element[3].absolute_url()+"/index_html",element[3].getContent('WEB_title')) - return """

Department %s: %s

"""%(element[3].absolute_url(),element[3].getContent('xdata_05'),element[3].getContent('WEB_title')) + return """

Department %s: %s

"""%(element[3].absolute_url()+"/index_html",element[3].getContent('xdata_05'),element[3].getContent('WEB_title')) elif element[0]==2: #mainprojects - return """

%s

"""%(element[3].absolute_url(),element[3].getContent('WEB_title')) + return """

%s

"""%(element[3].absolute_url()+"/index_html",element[3].getContent('WEB_title')) elif element[0]==3: - return """

%s

"""%(element[3].absolute_url(),element[3].getContent('WEB_title')) + return """

%s

"""%(element[3].absolute_url()+"/index_html",element[3].getContent('WEB_title')) def changePosition(self,treeId,select,RESPONSE=None): """Change Postion Entry""" @@ -524,7 +524,7 @@ class MPIWGRoot(ZSQLExtendFolder): if proj: #ret.append("%s"%(proj[0].absolute_url,person.encode('utf-8'))) - ret.append("%s"%('members/'+proj[0].id,person)) + ret.append("%s"%('members/'+proj[0].id+'/index_html',person)) else: #ret.append("%s"%person.encode('utf-8')) ret.append("%s"%person) @@ -540,7 +540,7 @@ class MPIWGRoot(ZSQLExtendFolder): if len(person)>1: #nicht nur Trennzeichen splitted=person.split(",") if len(splitted)==1: - splitted=person.split(" ") + splitted=person.lstrip().rstrip().split(" ") splittedNew=[re.sub(r'\s(.*)','$1',split) for split in splitted] if splittedNew[0]=='': del splittedNew[0] @@ -555,7 +555,7 @@ class MPIWGRoot(ZSQLExtendFolder): if proj: #ret.append("%s"%(proj[0].absolute_url,person.encode('utf-8'))) - ret.append("%s"%(proj[0].absolute_url,person)) + ret.append("%s"%(proj[0].absolute_url+"/index_html",person)) else: #ret.append("%s"%person.encode('utf-8')) ret.append("%s"%person) @@ -619,8 +619,9 @@ class MPIWGRoot(ZSQLExtendFolder): splitted=name.split(",") if len(splitted)==1: - splitted=name.split(" ") - splittedNew=[re.sub(r'\s(.*)','$1',split) for split in splitted] + splitted=name.lstrip().rstrip().split(" ") + splittedNew=[split.lstrip() for split in splitted] + if splittedNew[0]=='': del splittedNew[0] search=string.join(splittedNew,' AND ')