version 1.22, 2004/08/24 13:26:03
|
version 1.28, 2004/09/05 17:17:02
|
Line 362 class MPIWGRoot(ZSQLExtendFolder):
|
Line 362 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
|
|
splitted=line.split(",") |
splitted=line.split(",") |
print splitted |
# print splitted |
|
|
if not (splitted[0]==""): |
if not (splitted[0]==""): |
newObj=MPIWGStaff.MPIWGStaff(splitted[0],splitted[1],splitted[2]) |
newObj=MPIWGStaff.MPIWGStaff(splitted[0],splitted[1],splitted[2]) |
|
|
try: |
try: |
project._setObject(splitted[0],newObj) |
project._setObject(splitted[0],newObj) |
print "done:",splitted[0] |
#print "done:",splitted[0] |
except: |
except: |
print "not done:",splitted[0] |
print "not done:",splitted[0] |
|
|
Line 428 class MPIWGRoot(ZSQLExtendFolder):
|
Line 428 class MPIWGRoot(ZSQLExtendFolder):
|
def formatElementForOverview(self,element): |
def formatElementForOverview(self,element): |
"""format the element for output in overview""" |
"""format the element for output in overview""" |
if element[0]==1: #department |
if element[0]==1: #department |
return """<h2><a href="%s">Department %s: %s</a></h2>"""%(element[3].absolute_url(),element[3].getContent('xdata_05'),element[3].getContent('WEB_title')) |
#print element[3].getContent('xdata_05') |
|
if element[3].getContent('xdata_05') == "4": |
|
return """<h2><a href="%s">Ind. Research Group I: %s</a></h2>"""%(element[3].absolute_url()+"/index_html",element[3].getContent('WEB_title')) |
|
if element[3].getContent('xdata_05') == "5": |
|
return """<h2><a href="%s">Ind. Research Group II: %s</a></h2>"""%(element[3].absolute_url()+"/index_html",element[3].getContent('WEB_title')) |
|
|
|
return """<h2><a href="%s">Department %s: %s</a></h2>"""%(element[3].absolute_url()+"/index_html",element[3].getContent('xdata_05'),element[3].getContent('WEB_title')) |
|
|
elif element[0]==2: #mainprojects |
elif element[0]==2: #mainprojects |
return """<h3><a href="%s">%s</a></h3><p>"""%(element[3].absolute_url(),element[3].getContent('WEB_title')) |
return """<h3><a href="%s">%s</a></h3><p>"""%(element[3].absolute_url()+"/index_html",element[3].getContent('WEB_title')) |
|
|
elif element[0]==3: |
elif element[0]==3: |
return """<p><a href="%s">%s</a></p>"""%(element[3].absolute_url(),element[3].getContent('WEB_title')) |
return """<p class="p_noindent"><a href="%s">%s</a></p>"""%(element[3].absolute_url()+"/index_html",element[3].getContent('WEB_title')) |
|
|
def changePosition(self,treeId,select,RESPONSE=None): |
def changePosition(self,treeId,select,RESPONSE=None): |
"""Change Postion Entry""" |
"""Change Postion Entry""" |
Line 518 class MPIWGRoot(ZSQLExtendFolder):
|
Line 524 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
if proj: |
if proj: |
#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>"%('members/'+proj[0].id,person)) |
ret.append("<a href=%s >%s</a>"%('members/'+proj[0].id+'/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) |
Line 534 class MPIWGRoot(ZSQLExtendFolder):
|
Line 540 class MPIWGRoot(ZSQLExtendFolder):
|
if len(person)>1: #nicht nur Trennzeichen |
if len(person)>1: #nicht nur Trennzeichen |
splitted=person.split(",") |
splitted=person.split(",") |
if len(splitted)==1: |
if len(splitted)==1: |
splitted=person.split(" ") |
splitted=person.lstrip().rstrip().split(" ") |
splittedNew=[re.sub(r'\s(.*)','$1',split) for split in splitted] |
splittedNew=[re.sub(r'\s(.*)','$1',split) for split in splitted] |
if splittedNew[0]=='': |
if splittedNew[0]=='': |
del splittedNew[0] |
del splittedNew[0] |
Line 549 class MPIWGRoot(ZSQLExtendFolder):
|
Line 555 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
if proj: |
if proj: |
#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,person)) |
ret.append("<a href=%s >%s</a>"%(proj[0].absolute_url+"/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) |
Line 581 class MPIWGRoot(ZSQLExtendFolder):
|
Line 587 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
y=name |
y=name |
splitted=y.split(",") |
splitted=y.split(",") |
for s in splitted: |
#XXXX |
splitNeu.append("\""+s+"\"") |
splitNeu=["\'"+splitted[1]+" "+splitted[0]+"\'"] |
|
|
|
#for s in splitted: |
|
# splitNeu.append("\""+s+"\"") |
search=string.join(splitNeu,' AND ') |
search=string.join(splitNeu,' AND ') |
|
|
proj=self.ProjectCatalog({'xdata_01':search}) |
proj=self.ProjectCatalog({'xdata_01':search}) |
|
|
if proj: |
if proj: |
proj2=[x for x in proj] |
proj2=[] |
|
for x in proj: |
|
|
|
if not((splitted[1]==" Christoph") and (splitted[0]=="Hoffmann") and (str(x.WEB_title).find('Einstein')>0)): |
|
|
|
#print repr(splitted[1]),repr(splitted[0]),repr(x.WEB_title) |
|
proj2.append(x) |
# proj2.sort(sortP) |
# proj2.sort(sortP) |
# ret.append((y,proj2)) |
# ret.append((y,proj2)) |
else: |
else: |
Line 613 class MPIWGRoot(ZSQLExtendFolder):
|
Line 629 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
splitted=name.split(",") |
splitted=name.split(",") |
if len(splitted)==1: |
if len(splitted)==1: |
splitted=name.split(" ") |
splitted=name.lstrip().rstrip().split(" ") |
splittedNew=[re.sub(r'\s(.*)','$1',split) for split in splitted] |
splittedNew=[split.lstrip() for split in splitted] |
|
|
if splittedNew[0]=='': |
if splittedNew[0]=='': |
del splittedNew[0] |
del splittedNew[0] |
search=string.join(splittedNew,' AND ') |
search=string.join(splittedNew,' AND ') |