- # having html tags right here is not a real use case
- hard_wired_list=[]
- hard_wired_list.append("this hard-wired list")
- hard_wired_list.append("is defined")
- hard_wired_list.append("in plugins.simplelist.py")
- hard_wired_list.append("which in turn relies on")
- hard_wired_list.append("template widget-template.html")
- hard_wired_list.append("while it should of course")
- hard_wired_list.append("instead issue a query")
- hard_wired_list.append("and fill the DOM in js from there")
- hard_wired_list.append("it would however maybe make sense")
- hard_wired_list.append("to offer the option to 'datatablify'")
- hard_wired_list.append("the list from the python code")
- hard_wired_list.append("just like a standard plugin can be set as visible or not")
- hard_wired_list.append("")
- hard_wired_list.append("OTOH and IMHO, there should be two separate and explicit subclasses of SimpleList for slices or testbeds")
-
- plugin_main1 = SimpleList (list=hard_wired_list,
- header='Hard wired',
- foo='the value for foo')
- plugin_main2 = SimpleList (hidable=True,
- list=hard_wired_slice_names,
- headers='Slices in main content')
- layout = VerticalLayout (hidable=True, visible=True,
- sons=[plugin_main1, plugin_main2]
- )
-# layout.inspect_request (request,"before first render")
- content_main = layout.render (request)
-# layout.inspect_request (request,"after first render")
- # this will be rendered as the main content - as per view-plugin.html and thus layout-myslice.html
- template_env [ 'content_main' ] = content_main
+ main_plugin = \
+ VerticalLayout ( title='title for the vertical layout',
+ sons = [ SimpleList (title='SimpleList and dataTables',
+ list=hard_wired_list,
+ header='Hard wired',
+ foo='the value for foo',
+ with_datatables=True,
+ toggled=False),
+ Tabs (title='Sample Tabs',
+ # *** we select this one to be the active tab ***
+ active='raw2',
+ sons = [ Raw (title='a raw plugin',domid='raw1',
+ togglable=False,
+ html= 3*lorem_p),
+ SliceList(title='a slice list',
+ togglable=False,
+ list=hard_wired_slice_names),
+ Raw (title='raw title',domid='raw2',
+ togglable=False,html=lorem) ]),
+ SimpleList (title='SimpleList with slice names',
+ list=hard_wired_slice_names,
+ ),
+ QuickFilter (list=quickfilter_criterias,
+ title='QuickFilter in main content') ] )
+ # define 'content_main' to the template engine
+ template_env [ 'content_main' ] = main_plugin.render(request)