Diff for /ECHO_content/ECHO_collection.py between versions 1.32 and 1.38

version 1.32, 2004/04/05 15:38:19 version 1.38, 2004/04/14 23:44:52
Line 337  class ECHO_resource(Folder): Line 337  class ECHO_resource(Folder):
     def changeECHO_resource(self,metalink,link,title,label,description,contentType,responsible,weight,viewClassification="",coords=None,credits=None,RESPONSE=None):      def changeECHO_resource(self,metalink,link,title,label,description,contentType,responsible,weight,viewClassification="",coords=None,credits=None,RESPONSE=None):
         """Änderung der Properties"""          """Änderung der Properties"""
                   
               try:        
         coordsnew=[ string.split(x,",") for x in coords]          coordsnew=[ string.split(x,",") for x in coords]
                   except:
           coordsnew=[]    
                   
         setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew)          setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew)
   
Line 479  class ECHO_externalLink(Folder): Line 480  class ECHO_externalLink(Folder):
     def changeECHO_externalLink(self,link,title,label,description,contentType,responsible,weight,coords=None,credits=None,RESPONSE=None):      def changeECHO_externalLink(self,link,title,label,description,contentType,responsible,weight,coords=None,credits=None,RESPONSE=None):
   
         """Änderung der Properties"""          """Änderung der Properties"""
       try:
         coordsnew=[ string.split(x,",") for x in coords]          coordsnew=[ string.split(x,",") for x in coords]
       except:
           coordsnew=[]
   
         setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coords)          setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coords)
   
Line 645  class ECHO_collection(Folder, Persistent Line 649  class ECHO_collection(Folder, Persistent
   
             return []              return []
                   
     def __init__(self,id,title,label,description,contentType,responsible,credits,weight,sortfield,coords,secondaryLinkTitle,secondaryLink,imageTag=""):      def __init__(self,id,title,label,description,contentType,responsible,credits,weight,sortfield,coords,secondaryLinkTitle,secondaryLink,imageTag="",bgcolour=""):
         #print "CO",coords          #print "CO",coords
   
         self.id = id          self.id = id
Line 663  class ECHO_collection(Folder, Persistent Line 667  class ECHO_collection(Folder, Persistent
         self.coords=coordsnew          self.coords=coordsnew
         self.secondaryLinkTitle=secondaryLinkTitle          self.secondaryLinkTitle=secondaryLinkTitle
         self.secondaryLink=secondaryLink          self.secondaryLink=secondaryLink
       self.bgcolour=bgcolour
                   
   
     manage_options = Folder.manage_options+(      manage_options = Folder.manage_options+(
Line 721  class ECHO_collection(Folder, Persistent Line 726  class ECHO_collection(Folder, Persistent
     security.declarePublic('changeECHO_collection')      security.declarePublic('changeECHO_collection')
   
   
     def changeECHO_collection(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag=""):      def getBgcolour(self):
           """colour"""
           if hasattr(self,'bgcolour') and not (self.bgcolour==""):
               return self.bgcolour
           else:
               return "#dddddd"
           
       def changeECHO_collection(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour=""):
         """Ä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
       
         if coords:          if coords:
             coordsnew=[ string.split(x,",") for x in coords]              coordsnew=[ string.split(x,",") for x in coords]
             self.coords=coordsnew[0:]              self.coords=coordsnew[0:]
Line 850  def manage_addECHO_collectionForm(self): Line 864  def manage_addECHO_collectionForm(self):
         return pt()          return pt()
   
   
 def manage_addECHO_collection(self,id,title,label,description,contentType,responsible,weight,sortfield,coords="",secondaryLinkTitle="",secondaryLink="",credits=None,RESPONSE=None,imageTag=""):  def manage_addECHO_collection(self,id,title,label,description,contentType,responsible,weight,sortfield,coords="",secondaryLinkTitle="",secondaryLink="",credits=None,RESPONSE=None,imageTag="",bgcolour=""):
     """add a echo collection"""      """add a echo collection"""
           
   
     newObj=ECHO_collection(id,title,label,description,contentType,responsible,credits,weight,sortfield,coords,secondaryLinkTitle=secondaryLinkTitle,secondaryLink=secondaryLink,imageTag=imageTag)      newObj=ECHO_collection(id,title,label,description,contentType,responsible,credits,weight,sortfield,coords,secondaryLinkTitle=secondaryLinkTitle,secondaryLink=secondaryLink,imageTag=imageTag,bgcolour="")
   
     self._setObject(id,newObj)      self._setObject(id,newObj)
   
     if RESPONSE is not None:      if RESPONSE is not None:
         RESPONSE.redirect('manage_main')          RESPONSE.redirect('manage_main')
   
   class ECHO_group(ECHO_collection):
       """ECHO Gruppe"""
       meta_type="ECHO_group"
   
       manage_options = Folder.manage_options+(
           {'label':'Main Config','action':'ECHO_group_config'},
           {'label':'Rerender Links','action':'ECHO_rerenderLinksMD'},
           {'label':'Graphics','action':'ECHO_graphicEntry'},
           )
       def ECHO_group_config(self):
           """Main configuration"""
           
           if not hasattr(self,'weight'):
               self.weight=""
               
           if not hasattr(self,'sortfield'):
               self.sortfield="weight"
                   
           if not hasattr(self,'coords'):
               self.coords=[]
   
           pt=PageTemplateFile('Products/ECHO_content/zpt/ChangeECHO_group.zpt').__of__(self)
           return pt()
   
       def changeECHO_group(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour=""):
           """Änderung der Properties"""
   
           self.secondaryLink=secondaryLink
           self.secondaryLinkTitle=secondaryLinkTitle
           self.imageTag=imageTag
           self.bgcolour=bgcolour
   
           if coords:
               coordsnew=[ string.split(x,",") for x in coords]
               self.coords=coordsnew[0:]
           else:
               coordsnew=None
               self.coords=None
   
           setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew)
   
   
   
           self.sortfield=sortfield
   
           if RESPONSE is not None:
               RESPONSE.redirect('manage_main')
               
       def content_html(self):
           """template fuer content"""
           return content_html(self,'group')
       
   
   
   def manage_addECHO_groupForm(self):
           """Add group form"""
           pt=PageTemplateFile('Products/ECHO_content/zpt/AddECHO_groupForm.zpt').__of__(self)
           return pt()
   
   
   def manage_addECHO_group(self,id,title,label,description,contentType,responsible,weight,sortfield,coords="",secondaryLinkTitle="",secondaryLink="",credits=None,RESPONSE=None,imageTag="",bgcolour=""):
       """add a echo group"""
       
   
       newObj=ECHO_group(id,title,label,description,contentType,responsible,credits,weight,sortfield,coords,secondaryLinkTitle=secondaryLinkTitle,secondaryLink=secondaryLink,imageTag=imageTag,bgcolour="")
   
       self._setObject(id,newObj)
   
       if RESPONSE is not None:
           RESPONSE.redirect('manage_main')
   
   
       
 class ECHO_root(Folder,Persistent,Implicit):  class ECHO_root(Folder,Persistent,Implicit):
     """ECHO Root Folder"""      """ECHO Root Folder"""
     meta_type="ECHO_root"      meta_type="ECHO_root"
   
       def getBgcolour(self):
       """hack"""
       return "#dddddd"
   
     def contentTypeSelector_HTML(self,selected=None):      def contentTypeSelector_HTML(self,selected=None):
         """give type selector"""          """give type selector"""

Removed from v.1.32  
changed lines
  Added in v.1.38


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