Diff for /ECHO_content/ECHO_collection.py between versions 1.41 and 1.44

version 1.41, 2004/04/16 09:45:32 version 1.44, 2004/04/16 14:09:15
Line 742  class ECHO_collection(Folder, Persistent Line 742  class ECHO_collection(Folder, Persistent
             self.coords=None              self.coords=None
                           
         setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew)          setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew)
       try:
               self.coords=coordsnew[0:] # HACK fehler in setECHO_collection
           except:
           """none"""
                   
         self.sortfield=sortfield          self.sortfield=sortfield
   
Line 815  class ECHO_collection(Folder, Persistent Line 817  class ECHO_collection(Folder, Persistent
   
         return ids          return ids
           
 <<<<<<< ECHO_collection.py  
     getSubCols = ECHO_helpers.getSubCols  
 =======  
     def getSubCols(self,sortfield="weight"):  
   
         subColTypes=['ECHO_group','ECHO_collection','ECHO_externalLink','ECHO_resource']  
         ids=[]  
         for entry in self.__dict__.keys():  
             object=getattr(self,entry)  
             try:  
                 if object.meta_type in subColTypes:  
                     ids.append(object)  
                                           
             except:  
                 """nothing"""  
         try:  
             sortfield=self.sortfield  
         except:  
             """nothing"""  
                           
         tmplist=[]      getSubCols = ECHO_helpers.getSubCols
         for x in ids:  
             if hasattr(x,sortfield):  
                 try:  
                     x=int(x)  
                 except:  
                     """nothing"""  
                 tmp=getattr(x,sortfield)  
             else:  
                 tmp=10000000  
             tmplist.append((tmp,x))  
         tmplist.sort()  
         return [x for (key,x) in tmplist]  
             
                                   
           
Line 893  class ECHO_group(ECHO_collection): Line 866  class ECHO_group(ECHO_collection):
         pt=PageTemplateFile('Products/ECHO_content/zpt/ChangeECHO_group.zpt').__of__(self)          pt=PageTemplateFile('Products/ECHO_content/zpt/ChangeECHO_group.zpt').__of__(self)
         return pt()          return pt()
   
     def changeECHO_group(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour=""):      def changeECHO_group(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour="",logo=""):
         """Änderung der Properties"""          """Änderung der Properties"""
   
         self.secondaryLink=secondaryLink          self.secondaryLink=secondaryLink
         self.secondaryLinkTitle=secondaryLinkTitle          self.secondaryLinkTitle=secondaryLinkTitle
         self.imageTag=imageTag          self.imageTag=imageTag
         self.bgcolour=bgcolour          self.bgcolour=bgcolour
                   self.logo=logo
   
         if coords:          if coords:
             coordsnew=[ string.split(x,",") for x in coords]              coordsnew=[ string.split(x,",") for x in coords]
Line 919  class ECHO_group(ECHO_collection): Line 893  class ECHO_group(ECHO_collection):
   
     def getLogo(self):          def getLogo(self):    
         """logo ausgeben"""          """logo ausgeben"""
                   try:
                       return self.logo
                   except:
         return "ECHO_groups"          return "ECHO_groups"
   
     def content_html(self):      def content_html(self):
Line 933  def manage_addECHO_groupForm(self): Line 910  def manage_addECHO_groupForm(self):
         return pt()          return pt()
   
   
 def manage_addECHO_group(self,id,title,label,description,contentType,responsible,weight,sortfield,coords="",secondaryLinkTitle="",secondaryLink="",credits=None,RESPONSE=None,imageTag="",bgcolour=""):  def manage_addECHO_group(self,id,title,label,description,contentType,responsible,weight,sortfield,coords="",secondaryLinkTitle="",secondaryLink="",credits=None,RESPONSE=None,imageTag="",bgcolour="",logo=""):
     """add a echo group"""      """add a echo group"""
           
   
     newObj=ECHO_group(id,title,label,description,contentType,responsible,credits,weight,sortfield,coords,secondaryLinkTitle=secondaryLinkTitle,secondaryLink=secondaryLink,imageTag=imageTag,bgcolour="")      newObj=ECHO_group(id,title,label,description,contentType,responsible,credits,weight,sortfield,coords,secondaryLinkTitle=secondaryLinkTitle,secondaryLink=secondaryLink,imageTag=imageTag,bgcolour="")
   
       setattr(newObj,'logo',logo)
     self._setObject(id,newObj)      self._setObject(id,newObj)
   
     if RESPONSE is not None:      if RESPONSE is not None:

Removed from v.1.41  
changed lines
  Added in v.1.44


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