version 1.60, 2005/10/26 11:18:19
|
version 1.64, 2005/10/28 17:49:45
|
Line 99 class ECHO_ZCatalogElement(SimpleItem):
|
Line 99 class ECHO_ZCatalogElement(SimpleItem):
|
return getattr(self,self.catalogId).uniqueValuesFor(self.field) |
return getattr(self,self.catalogId).uniqueValuesFor(self.field) |
|
|
def getNavList(self): |
def getNavList(self): |
"""ausgabe der treffer list für navigation""" |
"""ausgabe der treffer list fuer navigation""" |
|
|
records=self.getKeywordList() |
records=self.getKeywordList() |
|
|
|
records=[x.encode('utf-8') for x in records] |
|
records.sort() |
if not records: |
if not records: |
return [] |
return [] |
else: |
else: |
ret=[] |
ret=[] |
for record in records: |
for record in records: |
|
|
#print "RC",record |
#print "RC",record |
#if record: |
#if record: |
# ret.append((record,self.baseUrl+urllib.quote(record))) |
# ret.append((record,self.baseUrl+urllib.quote(record))) |
Line 125 def manage_addECHO_ZCatalogElementForm(s
|
Line 127 def manage_addECHO_ZCatalogElementForm(s
|
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','AddECHO_ZCatalogElement.zpt')).__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','AddECHO_ZCatalogElement.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
def manage_addECHO_ZCatalogElement(self,id,title,field,baseUrl,weight,contentType,RESPONSE=None): |
def manage_addECHO_ZCatalogElement(self,id,title,field,catalogId,baseUrl,weight,contentType,RESPONSE=None): |
"""Add an ECHO_ZCatalogelement""" |
"""Add an ECHO_ZCatalogelement""" |
self._setObject(id,ECHO_ZCatalogElement(id,title,field,baseUrl,weight,contentType)) |
|
|
self._setObject(id,ECHO_ZCatalogElement(id,title,field,catalogId,baseUrl,weight,contentType)) |
|
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
Line 266 class ECHO_sqlElement(SimpleItem):
|
Line 269 class ECHO_sqlElement(SimpleItem):
|
zLOG.LOG('ECHO_Nav',zLOG.INFO,'ZSQLSimpleSearch not supported') |
zLOG.LOG('ECHO_Nav',zLOG.INFO,'ZSQLSimpleSearch not supported') |
|
|
def getNavList(self): |
def getNavList(self): |
"""ausgabe der treffer list für navigation""" |
"""ausgabe der treffer list fuer navigation""" |
|
|
#naechste schritte sind trial and error, warum geht mal das eine mal das andere 2.3 / 2.4 ?? |
#naechste schritte sind trial and error, warum geht mal das eine mal das andere 2.3 / 2.4 ?? |
|
|
|
try: |
try: |
try: |
|
records=self.ZSQLSimpleSearch(query=self.query) |
|
except: |
records=self.searchQuery(self.aq_parent,query=self.query) #python 2.4 version (??) |
records=self.searchQuery(self.aq_parent,query=self.query) #python 2.4 version (??) |
except: |
except: |
records=self.serchQuery()#python 2.3 version(??) |
records=self.searchQuery()#python 2.3 version(??) |
|
|
|
|
if not records: |
if not records: |
Line 654 class ECHO_navigation(Folder):
|
Line 661 class ECHO_navigation(Folder):
|
try: |
try: |
label=temp[x][1].getLabel() |
label=temp[x][1].getLabel() |
except: |
except: |
label=temp[x][1].label |
label=temp[x][1].label.encode('utf-8') |
else: |
else: |
label=temp[x][1].title.encode('utf-8') |
label=temp[x][1].title.encode('utf-8') |
else: |
else: |
label=temp[x][1].title.encode('utf-8') |
label=temp[x][1].title.encode('utf-8') |
|
|
|
try: |
|
label=label.encode('utf-8') |
|
except: |
|
label=label.decode('latin-1') |
|
|
if location: |
if location: |
|
|
loc=getattr(temp[x][1],'location','top') |
loc=getattr(temp[x][1],'location','top') |