version 1.26, 2004/05/10 20:46:46
|
version 1.29, 2004/05/28 09:50:39
|
Line 284 class ECHO_navigation(Folder):
|
Line 284 class ECHO_navigation(Folder):
|
|
|
displayedMetaTypes=displayTypes |
displayedMetaTypes=displayTypes |
|
|
|
def getR(self): |
|
"""re""" |
|
return self.REQUEST |
|
|
def __init__(self,id,title,pathToHierarchy): |
def __init__(self,id,title,pathToHierarchy): |
"""init""" |
"""init""" |
self.id=id |
self.id=id |
Line 361 class ECHO_navigation(Folder):
|
Line 365 class ECHO_navigation(Folder):
|
tempObj=self.pathToHierarchy[0:] |
tempObj=self.pathToHierarchy[0:] |
tempObj=re.sub("/",".",tempObj) |
tempObj=re.sub("/",".",tempObj) |
tempObj="self.aq_parent"+tempObj |
tempObj="self.aq_parent"+tempObj |
|
#print tempObj |
objtemp=eval(tempObj) |
objtemp=eval(tempObj) |
|
|
obj=objtemp |
obj=objtemp |
Line 391 class ECHO_navigation(Folder):
|
Line 395 class ECHO_navigation(Folder):
|
for z in temp[x][1].getNavList(): |
for z in temp[x][1].getNavList(): |
listNav.append((z[0],z[1],None)) |
listNav.append((z[0],z[1],None)) |
else: |
else: |
# add label fals existiert und nicht leer |
# add label falls existiert und nicht leer |
if hasattr(temp[x][1],'label'): |
if hasattr(temp[x][1],'label'): |
if not temp[x][1].label=='': |
if not temp[x][1].label=='': |
label=temp[x][1].label.encode('utf-8') |
label=temp[x][1].label.encode('utf-8') |
Line 516 class ECHO_navigation(Folder):
|
Line 520 class ECHO_navigation(Folder):
|
|
|
return len(self.barFromHash(self.createNavHash(0))) |
return len(self.barFromHash(self.createNavHash(0))) |
|
|
|
def startOfHierarchy(self,list): |
|
splitted=self.pathToHierarchy.split("/") |
|
last=splitted[len(splitted)-1] |
|
#print last,list |
|
try: |
|
nr=list.index(last) |
|
except: |
|
nr=0 |
|
return nr+1 |
|
|
def secondNavElements(self): |
def secondNavElements(self): |
"""Zweite Ordnung""" |
"""Zweite Ordnung""" |
|
|
Line 527 class ECHO_navigation(Folder):
|
Line 541 class ECHO_navigation(Folder):
|
|
|
splitted=ult_temp.split("/") |
splitted=ult_temp.split("/") |
|
|
|
#print "AU",self.absolute_url(),splitted |
|
#start=[splitted[2]] #orig |
|
startNr= self.startOfHierarchy(splitted) |
|
|
|
start=[splitted[startNr]] |
|
|
start=[splitted[2]] |
|
#print start |
#print start |
|
|
keys=self.barFromHash(hash,start=start) |
keys=self.barFromHash(hash,start=start) |
Line 553 class ECHO_navigation(Folder):
|
Line 571 class ECHO_navigation(Folder):
|
## else: |
## else: |
## start=[splitted[len(splitted)-1]] |
## start=[splitted[len(splitted)-1]] |
|
|
start=splitted[2:order+1] |
#start=splitted[2:order+1] #orig |
|
startNr= self.startOfHierarchy(splitted) |
|
start=splitted[startNr:order] |
#print start |
#print start |
|
|
keys=self.barFromHash(hash,start=start) |
keys=self.barFromHash(hash,start=start) |
Line 611 def createPath(url1,url2):
|
Line 631 def createPath(url1,url2):
|
if temp2[0]==test: |
if temp2[0]==test: |
del temp2[0] |
del temp2[0] |
|
|
|
#print "CP:"+url1+"::"+url2+"::"+url1+"/"+string.join(temp2,"/") |
return url1+"/"+string.join(temp2,"/") |
return url1+"/"+string.join(temp2,"/") |
|
|
def sortWeight(x,y): |
def sortWeight(x,y): |