m๒
`7ซ=c           @   sq   d  k  Z  d k l Z d k l Z d k l Z d e i f d     YZ d d d  d  Z	 e d	 e
    Z d  S(
   N(   s   Folder(   s   DTMLFile(   s   ZCatalogt   zNotec           B   s0  t  Z d  Z d Z d k Td k l Z d k l Z d k	 l
 Z
 h  d d <d d	 <f e i i i d
 f Z d d
 d d  Z e d  Z e d  Z e d e    Z e d e    Z e d e    Z e d e    Z e d e    Z e d e    Z e d e    Z e d e    Z e d e    Z e d e    Z e d e    Z e d e    Z e d e    Z  e d e    Z! e d e    Z" e d e    Z# e d  e    Z$ e d! e    Z% e d" e    Z& e d# e    Z' e d$ e    Z( e d% e    Z) d&   Z* RS('   s   zNote Folder Classs   zNote Folder(   t   *(   s   newEntryMethod(   s   APA(   s   Chicagot   labelt   Managet   actiont   manage_editFormi    t   zNotest   APAc         C   sh   | |  _  | |  _ | |  _ | |  _ d |  _ d |  _ d |  _ d |  _	 g  |  _
 t i |  d d  d S(   s   # initialize new instances   #ffeebbs   #443377s   #eee4ees   #ffffeet   ZEntry_catalogs   zEntry ZCatalogN(   t   idt   selft   titlet
   initialNIDt   NIDt   stylet   colour1t   colour2t   colour3t   colour4t
   tempbuffert   ZCatalogt   manage_addZCatalog(   R
   R	   R   R   R   (    (    t:   /home2/kennisonb/webapps/zope/Zope/Products/zNote/zNote.pyt   __init__4   s     									c         C   sP   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ d |  _ | i	 d  d S(   s   basic management interfacei   s   ./manage_editFormN(
   R   R
   R   R   R   R   R   t
   _p_changedt   RESPONSEt   redirect(   R
   R   R   R   R   R   R   R   (    (    R   t   manage_editActionD   s     							c         C   s๛  |  i d i d d d d d d d |  d } |  i i } xd	 d
 d d d d g D]r}	 xi| i	 |	  D]X} d t i t |  i d  d  d } g  } | i } xX | D]P } | i d j p | i d j o* | i	 d  d } | i | i i  qญ qญ W| i	 d  d i i } | i	 d  d i i } | i d  d } | i   d | d } | i | | |  }
 |  i d i d | d |
 d d d d d t |   |  i d |  _ | d } qj WqT Wy |  i  d  Wn d Sn Xd t |  d S(   s-   form-handler to import from external XML filet	   ParsedXMLR	   t
   TempImportt   contentTypes   text/xmlt   useNamespacesi    t   filet   bookt   booksectiont   jarticlet   thesist   esourcet   proceedingst   zi   i   s   .xmlt   authort   editort   lastnamet   dateR   t   :s   couldn't delete the temp objects	   Imported s	    entries.N(!   R
   t   manage_addProductt   manage_addParsedXMLR    t   cR   t   documentElementt   roott   thisNamet   getElementsByTagNamet   myNodet   stringt   zfillt   strR   t   newIdt	   AuthsListt
   childNodest   AEst   AEt   nodeNamet   LNt   appendt
   firstChildt	   nodeValuet   Datet	   fullTitlet   splitt   Titlet   uppert   composeTitlet   myTitlet   manage_delObjects(   R
   R    R   R/   R<   RE   R>   R9   R;   R2   RH   R4   RB   R8   RC   R1   (    (    R   t   importEntriesP   sH     
  '	  s   www/index_htmls   www/zNoteCSSs   www/topFrames   www/tocFrames
   www/bibTocs	   www/abouts   www/todolists   www/biblio_dtds   www/search_forms   www/search_resultss   www/getNotess   www/exportAlls   www/newBookForms   www/newBookSectionForms   www/newJArticleForms   www/newThesisForms   www/newESourceForms   www/newProceedingsForms   www/importEntriesForms   www/manage_editForms   www/Views   www/viewCheckedc         C   s   |  i i |  d  S(   N(   R
   R   R?   t   line(   R
   RK   (    (    R   t   oprintจ   s    (+   t   __name__t
   __module__t   __doc__t	   meta_typet   formatt   formActionst   newEntryMethodt	   Style_APAR   t   Style_Chicagot   Chicagot   Foldert   ObjectManagert   manage_optionsR   t   NoneR   RJ   t   DTMLFilet   globalst
   index_htmlt   zNoteCSSt   topFramet   tocFramet   bibToct   aboutt   todolistt
   biblio_dtdt   search_formt   search_resultst   getNotest	   exportAllt   newBookFormt   newBookSectionFormt   newJArticleFormt   newThesisFormt   newESourceFormt   newProceedingsFormt   importEntriesFormR   t   Viewt   viewCheckedRL   (    (    (    R   R       sB    /7i    R   c         C   s[   | d j o
 d } n |  i | t | | | |   | d j	 o |  i	 |  |  Sn d S(   s   Add a new zNote Folder instancet    R   N(
   R   R
   t
   _setObjectR	   R    R   R   t   REQUESTRZ   t   manage_main(   R
   R	   R   R   R   Rt   (    (    R   t   manage_addzNoteActionฎ   s      
t   manage_addzNoteForm(   R5   t   OFSRW   t   GlobalsR[   t   Products.ZCatalogR   R    RZ   Rv   R\   Rw   (   R5   R    R[   Rw   RW   Rv   R   (    (    R   t   ?   s   	