mò -á¸Ec@stdZdkZdkZdkZdkZdkZdkZdklZdk l Z dk l Z dk lZdk lZdk lZdfd „ƒYZd eiieiifd „ƒYZeeƒdZd eiieiifd„ƒYZeeƒd„Zdeiieiieiifd„ƒYZdd„Z deiiei!fd„ƒYZ"ee"ƒdS(s6Provide management of common instance property sheets N(sInitializeClass(sClassSecurityInfo(spname(smanage_zclasses(smanage_properties(saccess_contents_informationtClassCaretakercBs,tZd„Zd„Zd„Zd„ZRS(NcCs||id(titemRt _propertiest ValueError(RR"t container((Rtmanage_afterAddBs  cCs|iiiii}t|ƒS(N(Rtaq_innert aq_parentt_zclass_RR(RR((Rtv_selfIscCs|S(N(R(R((Rtp_selfMscCs'|djo d|Snd||fS(Ntlinesttokenss sX (slinesstokens(ttR(RR.R((Rt_view_widget_for_typeOs  tc Cs|djo|i|||ƒSnddg}|i}xp|i ƒD]b}|d}|d i ƒ|d}|d|ƒ|d|i |d|dƒƒ|d ƒqFW|d ƒ|d ƒd i|ƒ}|iiii|||ƒ|dj o|d i|ddƒndS(s*Create a view of a property sheet tEditssRis' s' ttypes s
%s%s
ss tRESPONSEtURL3s/methods/manageN(t ps_view_typeRtmanage_createEditorRR tREQUESTtrtappendtat propertyMaptptpidtupperR/tjoinR(tmethodstmanage_addDTMLMethodR tredirect( RRR R5R7R:R=R<R8((Rtmanage_createViewXs$     "   cCsÛ|djo5|djo d}nd}d||||fSn|d jod ||fSn|d jod ||fSn|d jod||fSn|djod||fSn|djo d|SndS(Ntinttlongtfloattdatetstrings html_quoteR0sV tbooleansn CHECKED>R-s‚ ttexts^ R,s t selections¼ No value for %(id)s (sintslongsfloatRGsstring(R.tqRR<(RR.RR<RL((Rt_edit_widget_for_typeps         cCs:||jo)x&|iD]}|i|dƒqWndS(NR(RR"R#tdt delClassAttr(RR"R%RN((Rtmanage_beforeDelete©s  cCsdddd|ig}|i}xU|iƒD]G}|d|dƒ|d|i|d|d|ƒƒ|d ƒq/W|d ƒ|d ƒ|d ƒ|d ƒ|dƒ|dƒdi|ƒ}|i i i i |||ƒ|dj o|di|ddƒndS(s6Create an edit interface for a property sheet s8<dtml-var title_or_id>s7ss>
s' Rs' R2s s s
%s%s
s( s& s
ss R3R4s/methods/manageN(RRR8R9R:R;R<RMR?R(R@RAR R7R RB(RRR R7R:R<R8((RR6®s$  %       cCs |iƒS(N(Rt#classDefinedAndInheritedPermissions(R((RtpermissionMappingPossibleValuesÈssAccessControl/dtml/methodAccesscCs©|idƒ}t||iƒ}h}x$|iƒD]}||t|ƒ2s(R RRtvalueR'R(t_zclass_propertysheets_classtpcRnttupletmapt_objectst__propset_attrs__R|(RRR‚R„((Rt_setOb.s cCsft||ƒ|iiii}yt||ƒWnnXttd„|i ƒƒ|_ t |ƒdS(NcCs|dS(NR(R€(R€((RR;s( RRRR'R(RƒR„R…R†R‡RˆR|(RRR„((Rt_delOb6s RRtmanage_addCommonSheetFormcCs|iS(N(Rt meta_types(R((Rtall_meta_typesCss OFS/dtml/maintmanagement_viewsProperty Sheetst manage_mainsdtml/addCommonSheetcCsDt||ƒ}|i||ƒ|dj o|i||ƒSndS(sAdd a property sheetN( RRR R€Rt _setObjectR7R R(RRR R7R€((Rtmanage_addCommonSheetMs  (RRRdRtisPrincipiaFolderishticontdontAllowCopyAndPasteRR‰RŠRlt DictionaryRReRŒRRmRRt_setNametglobalsR‹R R‘(((RR} s$          cCsw|djo h}nt||ƒoLx!t||ƒD]}d||