m -Ec @sdZdkZdkZdkZdkZdklZdkZdkZdk Z dk Z dk Z dk l Z dklZdklZdklZdklZdklZd klZd klZd klZlZdkZdk Z!dk"Z"dk#Z#e$ed  o fe_%ne$ed  ohe_&he_'ne(e(dZ)dk*l+Z+ei,de-e+_.deei/i/fdYZ0ei1de-ddddddZ2dZ3e i4di5Z6dgdde(ddZ7dfdYZ8e(e(d Z9gZ:d!eei/i/ei;i;fd"YZ<ee<d#ei=i=fd$YZ>d%fd&YZ?e?Z@d'ZAd(ZBd)ZCdS(*s Zope Classes N(sInitializeClass(sClassSecurityInfo(screate_class_instances(smapply(sBase(saq_base(sFactoryDispatcher(sComputedAttribute(s PythonScript(s BadRequestsRedirectt meta_typest meta_classesc Bsh}d|i}|d jo |}nd||U||} eii| _ || _ f| _ y0|i| _ e||| e||| Wn4ej o(|d| _ | ||<| ||s cCs|S(N(R (R ((Rt _getZClassFscCsf}|ii}t|do|ip|idd|ifnxd|D]\\}}yt i |i |}Wn d}nX|dj o|||ff}qSqSWt i|S(sDirectory listing for FTPt$isTopLevelPrincipiaApplicationObjectis..N(toutR RctitemstfilesRRtinsertR,tktvtmarshaltloadstmanage_FTPstatRXtstatR tdumps(R RXRRRRR((Rtmanage_FTPlistKs   c CsQddB}|ii}d}}ti|ddd||d|||f S(s!Psuedo stat used for FTP listingsi@itZopeiiN( tmodeR tbobobase_modification_timettimeTimetmtimetownertgroupRR(R RXRRRR((RRZs   cCs||ig}|dj o_t|tdjo |g}nx6|D]*}|ii|jo|i|qFqFWn|S(s R1N( R RtvaluestfilterR RwRRtremove(R RRR((Rt objectValueses   (4RRR`RR_tinstance__meta_typetinstance__icont __propsets__tisPrincipiaFolderishtClassSecurityInfotsecuritytdeclareObjectProtectedtcreate_class_instancesRRt cb_isMoveableRRtdeclarePrivateR RRRRRRRRRtComputedAttributetdeclareProtectedRRRRRRRRRRRRt declarePublicRRRRRRtisAnObjectManagerR(((RRJsf    L                             RscBsqtZdZdZeidZeidZei dZ dZ dZ dZ dZed ZRS( sEManage a collection of property sheets that provide ZClass managementcCst|ddS(s2Emulate standard interface for use with navigations/manage_workspaceN(tRedirecttURL2(R R ((Rtmanage_workspacezstviewstbasicRUcCs(tid|_tid|_dS(NRR(RtZClassMethodsSheetR RRttZInstanceSheetsSheetR(R ((RRscCsf}|ii}t|do|ip|idd|ifnxd|D]\\}}yt i |i |}Wn d}nX|dj o|||ff}qSqSWt i|S(sDirectory listing for FTPRis..N(RR RcRRRRRR,RRRRRRXRR R(R RXRRRRR((RRs   c CsQddB}|ii}d}}ti|ddd||d|||f S(s!Psuedo stat used for FTP listingsi@iRiiN( RR RRRRRRR(R RXRRRR((RRs   icCs|i|igS(N(R RR(R R((RRs(RRR`R tBasictZClassViewsSheetR tZClassBasicSheetR tZClassPermissionsSheetRURRRRR R(((RRsts     tZObjectc BstZhdd<dd<dd Add %(meta_type)s

Add %(meta_type)s

Id
s## Script (Python) "%(id)s_add" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=redirect=1 ##title=%(title)s ## # Add a new instance of the ZClass request = context.REQUEST instance = container.%(id)s.createInObjectManager(request['id'], request) # ***************************************************************** # Perform any initialization of the new instance here. # For example, to update a property sheet named "Basic" from the # form values, uncomment the following line of code: # instance.propertysheets.Basic.manage_editProperties(request) # ***************************************************************** if redirect: # redirect to the management view of the instance's container request.RESPONSE.redirect(instance.aq_parent.absolute_url() + '/manage_main') else: # If we aren't supposed to redirect (ie, we are called from a script) # then just return the ZClass instance to the caller return instance (DR`RytOFS.SimpleItemR tOFS.PropertySheetsRtInitializeClassRRRttAccessControl.RoleRtreRtAccessControl.PermissionsRtZPublisher.mapplyRtExtensionClasstBaset AcquisitionRtApp.FactoryDispatcherRRt#Products.PythonScripts.PythonScriptRNt zExceptionsR@Rtwebdav.Collectiontwebdavt ZClasses._pmcR"RRRRRRR Rt OFS.misc_tp_t ImageFileRt ZClass_Icont CollectionRtDTMLFiletmanage_addZClassFormR0tcompiletsearchR?RZR[ReRRrRJR RsRRmRRMRQ((RR,R/RR[RRR@R?RQRRZRJR"R&RRRRRRsRNRRR R RR0RtRRRRMR"RRyReR4RRm((Rt?sX$ -               6   < ( 4