Back to index

plone3  3.1.7
tidata.py
Go to the documentation of this file.
00001 ModifyPortalContent = 'Modify portal content'
00002 View = 'View'
00003 
00004 FTIDATA_ACTIONS = (
00005       { 'id' : 'Action Tests'
00006       , 'meta_type' : 'Dummy'
00007       , 'aliases' : {}
00008       , 'actions' : (
00009             { 'id': 'view',
00010               'title': 'View',
00011               'action':'string:',
00012               'permissions':('View',),
00013               'category':'object',
00014               'visible':1 }
00015           , { 'id': 'edit',
00016               'title': 'Edit',
00017               'action':'string:${object_url}/foo_edit',
00018               'permissions':('Modify',),
00019               'category':'object',
00020               'visible':1 }
00021           , { 'id': 'objectproperties',
00022               'title': 'Object Properties',
00023               'action':'string:foo_properties',
00024               'permissions':('Modify',),
00025               'category':'object',
00026               'visible':1 }
00027           , { 'id': 'slot',
00028               'title': 'Slot',
00029               'action':'string:foo_slot',
00030               'category':'object',
00031               'visible':0 }
00032           )
00033       }
00034     ,
00035     )
00036 
00037 FTIDATA_DUMMY = (
00038       { 'id' : 'Dummy Content'
00039       , 'title' : 'Dummy Content Title'
00040       , 'meta_type' : 'Dummy'
00041       , 'product' : 'FooProduct'
00042       , 'factory' : 'addFoo'
00043       , 'aliases' : {}
00044       , 'actions' : (
00045             { 'id': 'view',
00046               'title': 'View',
00047               'action':'string:view',
00048               'permissions':('View',) }
00049           , { 'id': 'view2',
00050               'title': 'View2',
00051               'action':'string:view2',
00052               'permissions':('View',) }
00053           , { 'id': 'edit',
00054               'title': 'Edit',
00055               'action':'string:edit',
00056               'permissions':('forbidden permission',) }
00057           )
00058       }
00059     ,
00060     )
00061 
00062 FTIDATA_CMF15 = (
00063       { 'id' : 'Dummy Content 15'
00064       , 'meta_type' : 'Dummy'
00065       , 'description' : (
00066            'Dummy Content.')
00067       , 'icon' : 'dummy_icon.gif'
00068       , 'product' : 'FooProduct'
00069       , 'factory' : 'addFoo'
00070       , 'immediate_view' : 'metadata.html'
00071       , 'aliases' : {
00072            '(Default)':'dummy_view',
00073            'view':'dummy_view',
00074            'view.html':'dummy_view',
00075            'edit.html':'dummy_edit_form',
00076            'metadata.html':'metadata_edit_form',
00077            'gethtml':'source_html'}
00078       , 'actions' : (
00079             { 'id':'view',
00080               'title': 'View',
00081               'action':'string:${object_url}/view.html',
00082               'permissions':(View,) }
00083           , { 'id':'edit',
00084               'title': 'Edit',
00085               'action':'string:${object_url}/edit.html',
00086               'permissions':(ModifyPortalContent,) }
00087           , { 'id':'metadata',
00088               'title': 'Metadata',
00089               'action':'string:${object_url}/metadata.html',
00090               'permissions':(ModifyPortalContent,) }
00091           )
00092       }
00093     ,
00094     )
00095 
00096 
00097 STI_SCRIPT = """\
00098 ## Script (Python) "addBaz"
00099 ##bind container=container
00100 ##bind context=context
00101 ##bind namespace=
00102 ##bind script=script
00103 ##bind subpath=traverse_subpath
00104 ##parameters=folder, id
00105 ##title=
00106 ##
00107 product = folder.manage_addProduct['FooProduct']
00108 product.addFoo(id)
00109 item = getattr(folder, id)
00110 return item
00111 """