Diff for /ECHO_content/ECHO_collection.py between versions 1.54 and 1.60

version 1.54, 2004/05/06 13:05:49 version 1.60, 2004/05/06 16:59:35
Line 577  class ECHO_collection(Folder, Persistent Line 577  class ECHO_collection(Folder, Persistent
     security=ClassSecurityInfo()      security=ClassSecurityInfo()
     meta_type='ECHO_collection'      meta_type='ECHO_collection'
   
       displayTypes=displayTypes
               
     def getTitle(self):      def getTitle(self):
     """title"""      """title"""
     return self.title.encode('utf-8')       return self.title.encode('utf-8') 
Line 642  class ECHO_collection(Folder, Persistent Line 644  class ECHO_collection(Folder, Persistent
                 element=getattr(object,entry)                  element=getattr(object,entry)
                 try:                  try:
                     if element.meta_type in ["ECHO_collection","ECHO_group"]:                      if element.meta_type in ["ECHO_collection","ECHO_group"]:
                         collections+="<element name=\""+element.title+"\" url=\""+element.absolute_url()+"\">"                          collections+="<element name=\""+quote(element.title)+"\" url=\""+element.absolute_url()+"\">"
                         collections+=getCollection(element,depth)+"</element>\n"                          collections+=getCollection(element,depth)+"</element>\n"
                 except:                  except:
                     """nothing"""                      """nothing"""
             return collections              return collections
                   
       ret="""<?xml version="1.0" encoding="utf-8" ?>"""
         return "<collection>"+getCollection(self)+"</collection>"          return ret+"<collection>"+getCollection(self)+"</collection>"
           
     def createJavaScript(self):      def createJavaScript(self):
         """CreateJava"""          """CreateJava"""
Line 857  class ECHO_collection(Folder, Persistent Line 859  class ECHO_collection(Folder, Persistent
         elif hasattr(self,'collection_index_template'):          elif hasattr(self,'collection_index_template'):
             return self.collection_index_template()                  return self.collection_index_template()    
         elif hasattr(self,'main_index_template'):          elif hasattr(self,'main_index_template'):
             return self.collection_index_template()                  return self.main_index_template()    
                   
         pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_main_index_template_standard.zpt').__of__(self)          pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_main_index_template_standard.zpt').__of__(self)
         pt.content_type="text/html"          pt.content_type="text/html"
Line 940  class ECHO_group(ECHO_collection): Line 942  class ECHO_group(ECHO_collection):
     def index_html(self):      def index_html(self):
         """standard page"""          """standard page"""
         displayedObjects=self.ZopeFind(self,obj_metatypes=displayTypes)          displayedObjects=self.ZopeFind(self,obj_metatypes=displayTypes)
         if len(displayedObjects)==1: # nur ein Object dann redirect auf dieses Object          if (len(displayedObjects)==1) and (displayedObjects[0][1].meta_type=="ECHO_collection"): # nur ein Object dann redirect auf dieses Object
             return self.REQUEST.RESPONSE.redirect(displayedObjects[0][1].absolute_url())              return self.REQUEST.RESPONSE.redirect(displayedObjects[0][1].absolute_url())
                   
         if 'index.html' in self.__dict__.keys():          if 'index.html' in self.__dict__.keys():
Line 950  class ECHO_group(ECHO_collection): Line 952  class ECHO_group(ECHO_collection):
             return self.showOverview()              return self.showOverview()
         elif hasattr(self,'group_index_template'):          elif hasattr(self,'group_index_template'):
             return self.group_index_template()                 return self.group_index_template()   
         elif hasattr(self,'main_index_template'):          elif hasattr(self,'collection_index_template'):
             return self.collection_index_template()                  return self.collection_index_template()    
           elif hasattr(self,'main_index_template'):
               return self.main_index_template()    
   
         pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_main_index_template_standard.zpt').__of__(self)          pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_main_index_template_standard.zpt').__of__(self)
         pt.content_type="text/html"          pt.content_type="text/html"
Line 1182  class ECHO_root(Folder,Persistent,Implic Line 1186  class ECHO_root(Folder,Persistent,Implic
     def getPartnersXML(self):      def getPartnersXML(self):
         """partner liste als xml"""           """partner liste als xml""" 
         partners=self.getPartners()          partners=self.getPartners()
         ret="<partners>"          ret="""<?xml version="1.0" encoding="utf-8" ?>
       <partners>"""
           
         for partner in partners:          for partner in partners:
             ret+="""<partner id="%s" title="%s"/>\n"""%(partner.getId(),partner.title)              ret+="""<partner id="%s" title="%s"/>\n"""%(partner.getId(),unicode(partner.title,'utf-8','replace'))
   
         return ret+"\n</partners>"          return ret+"\n</partners>"
           

Removed from v.1.54  
changed lines
  Added in v.1.60


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>