qU_varsq}qu. K((U#Products.PythonScripts.PythonScriptqUPythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature
FuncCode
qoq}q(Uco_varnamesq (Utunnusq
UsisuqU _getattr_qU_getattrq
U containerqUmUtUxUgetattrqtUco_argcountqKubU_paramsqUtunnus, sisuqUidqU
otsiKirjedqU__ac_local_roles__q}qUadminq]qUOwnerqasU_bind_namesq(cShared.DC.Scripts.Bindings
NameAssignments
qoq}qU_asgnsq}q(Uname_containerq hUname_subpathq!Utraverse_subpathq"Uname_m_selfq#Uscriptq$Uname_contextq%Ucontextq&usbU
func_defaultsq'NU_codeq(TS c s d Z d S( Nc s t } | t d d } g } xO | d rB } | t | | d | o | | d | n q3 W | Sd S( Ns objectValuess Filei s
startswiths append( s _getattr_s _getattrs containers ms ts xs getattrs tunnuss sisu( s tunnuss sisus _getattr_s _getattrs containers ms ts xs getattr( ( s Script (Python)s
otsiKirjed s
"( s
otsiKirjed( s
otsiKirjed( ( s Script (Python)s s q)U_bodyq*Uum=container.objectValues('File')
t=[]
for x in m:
if getattr(x, tunnus).startswith(sisu):
t.append(x)
return t
q+UScript_magicq,KUwarningsq-)Uerrorsq.)UPython_magicq/U*
q0u. ((U OFS.ImageqUFileqtqNt.}q(UsizeqK UruumqU3-IIIqUdataqU U_EtagSupport__etagq U
ts73470078.72q
U__name__qUplaan5qU_propertiesq
(}q(UidqUtitleqUtypeqUstringqu}q(hUcontent_typeqhhu}q(hUgruppqhhu}q(hUaineqhhu}q(hhhhu}q(hUalgusqhhu}q(hUkestusqhhuthUtext/x-unknown-content-typeqhU45qhUkeemiaq U__ac_local_roles__q!}q"Uadminq#]q$UOwnerq%ashU12.00q&hU hUAUpreconditionq'U u. ((U OFS.ImageqUFileqtqNt.}q(UsizeqK UruumqU1-IqUdataqU U_EtagSupport__etagq U
ts73475237.71q
U__name__qUplaan6qU_propertiesq
(}q(UidqUtitleqUtypeqUstringqu}q(hUcontent_typeqhhu}q(hUgruppqhhu}q(hUaineqhhu}q(hhhhu}q(hUalgusqhhu}q(hUkestusqhhuthUtext/x-unknown-content-typeqhU90qhUmuusikaq U__ac_local_roles__q!}q"Uadminq#]q$UOwnerq%ashU10.00q&hU hUCUpreconditionq'U u. ((U OFS.ImageqUFileqtqNt.}q(UsizeqK UruumqU2-IIIqUdataqU U_EtagSupport__etagq U
ts73466192.47q
U__name__qUplaan3qU_propertiesq
(}q(UidqUtitleqUtypeqUstringqu}q(hUcontent_typeqhhu}q(hUgruppqhhu}q(hUaineqhhu}q(hhhhu}q(hUalgusqhhu}q(hUkestusqhhuthUtext/x-unknown-content-typeqhU45qhUfsikaq U__ac_local_roles__q!}q"Uadminq#]q$UOwnerq%ashU8.00q&hU hUBUpreconditionq'U u. ((UOFS.DTMLMethodqU
DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q
UkustutusvormqUtitleqU Uglobalsq
}qUrawqT/
tunniplaan
TAGASIqU_varsq}qu. ((U#Products.PythonScripts.PythonScriptqUPythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature
FuncCode
qoq}q(Uco_varnamesq (U kirjenimiq
UgruppqUaineqUruumq
UalgusqUkestusqU _getattr_qU_getattrqUgetattrqUcontextqUdocqtqUco_argcountqKubU_paramsqU+kirjenimi, grupp, aine, ruum, algus, kestusqUidqU
muutmisSkriptqU__ac_local_roles__q}qUadminq]qUOwnerqasU_bind_namesq (cShared.DC.Scripts.Bindings
NameAssignments
q!oq"}q#U_asgnsq$}q%(Uname_containerq&U containerq'Uname_subpathq(Utraverse_subpathq)Uname_contextq*Ucontextq+Uname_m_selfq,Uscriptq-usbU
func_defaultsq.NU_codeq/TA c s d Z d S( s
Muutmine
c s t } d t t | }
| |
d d d d d d f | |
d d | d | |
d d | d |
|
d d | d | |
d d | d | |
d d | d d S(
s
Muutmine
s manage_delPropertiess grupps aines ruums alguss kestuss manage_addPropertys stringN( s _getattr_s _getattrs getattrs contexts kirjenimis docs grupps aines ruums alguss kestus( s kirjenimis grupps aines ruums alguss kestuss _getattr_s _getattrs getattrs contexts doc( ( s Script (Python)s
muutmisSkript s %N( s
muutmisSkript( s
muutmisSkript( ( s Script (Python)s s q0U_proxy_rolesq1(UManagerq2tq3U_bodyq4T """
Muutmine
"""
#Ksitakse ligips kirjele
doc=getattr(context, kirjenimi)
# Andmed atribuutideks
doc.manage_delProperties(('grupp', 'aine', 'ruum', 'algus', 'kestus'))
doc.manage_addProperty('grupp', grupp, 'string')
doc.manage_addProperty('aine', aine, 'string')
doc.manage_addProperty('ruum', ruum, 'string')
doc.manage_addProperty('algus', algus, 'string')
doc.manage_addProperty('kestus', kestus, 'string')
q5UScript_magicq6KUwarningsq7)Uerrorsq8)UPython_magicq9U*
q:u. ((U OFS.ImageqUFileqtqNt.}q(UsizeqK UruumqU3-IIqUdataqU U_EtagSupport__etagq U
ts73466098.88q
U__name__qUplaan2qU_propertiesq
(}q(UidqUtitleqUtypeqUstringqu}q(hUcontent_typeqhhu}q(hUgruppqhhu}q(hUaineqhhu}q(hhhhu}q(hUalgusqhhu}q(hUkestusqhhuthUtext/x-unknown-content-typeqhU90qhUmatemaatikaq U__ac_local_roles__q!}q"Uadminq#]q$UOwnerq%ashU10.00q&hU hUAUpreconditionq'U u. W((UOFS.DTMLMethodqU
DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q
UlisamislehtqUtitleqU Uglobalsq
}qUrawqU
TAGASI
qU_varsq}qu. ((U#Products.PythonScripts.PythonScriptqUPythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature
FuncCode
qoq}q(Uco_varnamesq (U _getattr_q
U_getattrqU containerqUmUtUxtUco_argcountq
K ubU_paramsqU UidqU
leidmisSkriptqU__ac_local_roles__q}qUadminq]qUOwnerqasU_bind_namesq(cShared.DC.Scripts.Bindings
NameAssignments
qoq}qU_asgnsq}q(Uname_containerqU containerqUname_subpathqUtraverse_subpathqUname_contextq Ucontextq!Uname_m_selfq"Uscriptq#usbU
func_defaultsq$NU_codeq%T0 c s d Z d S( Nc s t } | t d d } g } xR | d rE } | | | d d d o | | d | n q3 W | Sd S( Ns objectValuess Filei s ids
startswiths plaans append( s _getattr_s _getattrs containers ms ts x( s _getattr_s _getattrs containers ms ts x( ( s Script (Python)s
leidmisSkript s
"( s
leidmisSkript( s
leidmisSkript( ( s Script (Python)s s q&U_bodyq'Umm=container.objectValues('File')
t=[]
for x in m:
if x.id().startswith('plaan'):
t.append(x)
return t
q(UScript_magicq)KUwarningsq*)Uerrorsq+)UPython_magicq,U*
q-u. ((UOFS.DTMLMethodqU
DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q
UstyleqUtitleqU Uglobalsq
}qUrawqT] body {
font-family: courier new;
font-size: 12px
}
p {
font-family: courier new;
font-size: 12px
}
h2 {
font-family: courier new;
font-size: 16px
}
td {
font-family: courier new;
font-size: 12px
}
a.five:link {color: #000000; text-decoration: none}
a.five:visited {color: #000000; text-decoration: none}
a.five:hover {text-decoration: underline}qU_varsq}qu. Y((UOFS.DTMLMethodqU
DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q
UvaatamislehtqUtitleqU Uglobalsq
}qUrawqT
TAGASI
qU_varsq}qu.
J((U#Products.PythonScripts.PythonScriptqUPythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature
FuncCode
qoq}q(Uco_varnamesq (Ugruppq
UaineqUruumqUalgusq
UkestusqU _getitem_qU_getitemqU _getattr_qU_getattrqU containerqUnrqUstrqUidqUcontextqUgetattrqUdocqtUco_argcountqKubU_paramsqU grupp, aine, ruum, algus, kestusqUidqU
lisamisSkriptqU__ac_local_roles__q}q Uadminq!]q"UOwnerq#asU_bind_namesq$(cShared.DC.Scripts.Bindings
NameAssignments
q%oq&}q'U_asgnsq(}q)(Uname_containerq*U containerq+Uname_subpathq,Utraverse_subpathq-Uname_contextq.Ucontextq/Uname_m_selfq0Uscriptq1usbU
func_defaultsq2NU_codeq3T c s d Z d S( Nc
s` t } t } | t d d d }
d t |
} |
d j o | t d d d d n | t d d |
d | | |
t d d
d | d d
d d
t t | } | | d d | d | | d d | d | | d d | d | | d d | d | | d d | d d S( Ns getPropertys loenduri s plaans manage_addPropertyi s ints manage_changePropertiess manage_addProducts OFSPs manage_addFiles titles s files grupps strings aines ruums alguss kestus( s _getitem_s _getitems _getattr_s _getattrs containers nrs strs ids contexts getattrs docs grupps aines ruums alguss kestus( s grupps aines ruums alguss kestuss _getitem_s _getitems _getattr_s _getattrs containers nrs strs ids contexts getattrs doc( ( s Script (Python)s
lisamisSkript s #+( s
lisamisSkript( s
lisamisSkript( ( s Script (Python)s s q4U_bodyq5T # Faili nime loomine,
nr=container.getProperty('loendur', 0) #Kui omadust pole, siis vrtuseks 0
id='plaan'+ str(nr)
if nr==0:
container.manage_addProperty('loendur', 1, 'int')
else:
container.manage_changeProperties(loendur=nr+1)
# Faili loomine
context.manage_addProduct['OFSP'].manage_addFile(id,
title="", file="")
#Ksitakse ligips loodud failile
doc=getattr(context, id)
# Andmed atribuutideks
doc.manage_addProperty('grupp', grupp, 'string')
doc.manage_addProperty('aine', aine, 'string')
doc.manage_addProperty('ruum', ruum, 'string')
doc.manage_addProperty('algus', algus, 'string')
doc.manage_addProperty('kestus', kestus, 'string')
q6UScript_magicq7KUwarningsq8)Uerrorsq9)UPython_magicq:U*
q;u. ((UOFS.DTMLMethodqU
DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q
UavalehtqUtitleqU Uglobalsq
}qUrawqT
vaata
qU_varsq}qu. Z((U#Products.PythonScripts.PythonScriptqUPythonScriptqtqNt.}q(U func_codeq(cShared.DC.Scripts.Signature
FuncCode
qoq}q(Uco_varnamesq (UREQUESTq
U _getitem_qU_getitemqU _getattr_q
U_getattrqUhasattrqU containerqtUco_argcountqKubU_paramsqUREQUESTqUidqUkustutusSkriptqU__ac_local_roles__q}qUadminq]qUOwnerqasU_bind_namesq(cShared.DC.Scripts.Bindings
NameAssignments
qoq}qU_asgnsq}q (Uname_containerq!U containerq"Uname_subpathq#Utraverse_subpathq$Uname_contextq%Ucontextq&Uname_m_selfq'Uscriptq(usbU
func_defaultsq)NU_codeq*TJ c s d Z d S( Nc se t } t } t | d o# | t d | | d n | | | d d d d S( Ns kirjenimis manage_delObjectss RESPONSEs redirects avaleht( s _getitem_s _getitems _getattr_s _getattrs hasattrs REQUESTs container( s REQUESTs _getitem_s _getitems _getattr_s _getattrs hasattrs container( ( s Script (Python)s kustutusSkript s "&( s kustutusSkript( s kustutusSkript( ( s Script (Python)s s q+U_bodyq,Uzif hasattr(REQUEST, 'kirjenimi'):
container.manage_delObjects(REQUEST['kirjenimi'])
REQUEST.RESPONSE.redirect('avaleht')
q-UScript_magicq.KUwarningsq/)Uerrorsq0)UPython_magicq1U*
q2u. p((UOFS.DTMLMethodqU
DTMLMethodqtqNt.}q(U__ac_local_roles__q}qUadminq]qUOwnerq asU__name__q
UmuutmislehtqUtitleqU Uglobalsq
}qUrawqU