Diff for /ECHO_content/VLPExtension.py between versions 1.2 and 1.3

version 1.2, 2004/05/27 09:31:25 version 1.3, 2004/05/28 15:01:43
Line 16  def getText(nodelist): Line 16  def getText(nodelist):
 class VLP_collection(ECHO_collection):  class VLP_collection(ECHO_collection):
     """VLP spezifische Erweiterung der Collection"""      """VLP spezifische Erweiterung der Collection"""
   
       meta_type="VLP_collection"
       manage_options=ECHO_collection.manage_options+(
           {'label':'Change Path','action':'VLP_path_configForm'},
           {'label':'Update Library','action':'updateCollection'},
           {'label':'Update Metadata','action':'updateCollectionMD'},
           )
   
       def VLP_path_configForm(self):
           """change path"""
           pt=PageTemplateFile('Products/ECHO_content/vlp/ChangeVLPPath.zpt').__of__(self)
           return pt()
   
       def VLP_path_config(self,path,RESPONSE=None):
           """config"""
           self.path=path
           if RESPONSE is not None:
               RESPONSE.redirect('manage_main')
   
       def updateCollection(self,RESPONSE=None):
           """liest verzeichnisse aus dem pfad und legt sie dann als objekte in den ordner"""
           files=os.listdir(self.path)
           for fileName in files:
               
               if fileName[0:3]=="lit":
                   
                   metalink=self.REQUEST['URL1']+"/"+fileName+"/index_meta"
                   newObj=VLP_resource(fileName,'',metalink,fileName,fileName,fileName,'generated','book','','','','','','')
                   self._setObject(fileName,newObj)
                   
                   genObj=getattr(self,fileName)
                   genObj.createIndexFile()
                   
                   
           if RESPONSE is not None:
               RESPONSE.redirect('manage_main')
   
       def updateCollectionMD(self,RESPONSE=None):
           """updateMD"""
           files=os.listdir(self.path)
           for fileName in files:
               if fileName[0:5]=="lit11":
                   genObj=getattr(self,fileName)
                   genObj.copyIndex_meta2echo_resource()
                   genObj.generate_title()
   
           if RESPONSE is not None:
               RESPONSE.redirect('manage_main')
   
   
 def manage_addVLP_collectionForm(self):  def manage_addVLP_collectionForm(self):
         """Form for adding a ressource"""          """Form for adding a ressource"""
Line 24  def manage_addVLP_collectionForm(self): Line 72  def manage_addVLP_collectionForm(self):
   
   
   
 def manage_addVLP_collection(self,id,title,label,description,contentType,responsible,weight,sortfield,coords="",secondaryLinkTitle="",secondaryLink="",credits=None,RESPONSE=None,imageTag="",bgcolour=""):  def manage_addVLP_collection(self,id,title,label,description,contentType,responsible,weight,sortfield,path,coords="",secondaryLinkTitle="",secondaryLink="",credits=None,RESPONSE=None,imageTag="",bgcolour=""):
     """add a echo collection"""      """add a echo collection"""
           
   
     newObj=VLP_collection(id,title,label,description,contentType,responsible,credits,weight,sortfield,coords,secondaryLinkTitle=secondaryLinkTitle,secondaryLink=secondaryLink,imageTag=imageTag,bgcolour="")      newObj=VLP_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)
       setattr(newObj,'path',path)
   
     if RESPONSE is not None:      if RESPONSE is not None:
         RESPONSE.redirect('manage_main')          RESPONSE.redirect('manage_main')
Line 83  class VLP_resource(ECHO_resource): Line 132  class VLP_resource(ECHO_resource):
         pt.content_type="text/html"          pt.content_type="text/html"
         return pt()          return pt()
           
       index_html=show
           
     def index_meta(self):      def index_meta(self):
         """index_meta"""          """index_meta"""

Removed from v.1.2  
changed lines
  Added in v.1.3


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