X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=trash%2Fsliceview.py;h=a1048bd0390e488558843b8e57923238399ae3d2;hb=45273da0859095cd4e7565f7ea0fc1496ef2f2de;hp=a410a71ee6512aaf952632fd250c94ec65ec4f52;hpb=72e1b6fd2be568712a4be6eb5805e0f686030ea3;p=unfold.git diff --git a/trash/sliceview.py b/trash/sliceview.py index a410a71e..a1048bd0 100644 --- a/trash/sliceview.py +++ b/trash/sliceview.py @@ -9,6 +9,7 @@ from unfold.page import Page from manifold.manifoldquery import ManifoldQuery from plugins.stack.stack import Stack +from plugins.tabs.tabs import Tabs from plugins.hazelnut.hazelnut import Hazelnut from plugins.lists.slicelist import SliceList from plugins.querycode.querycode import QueryCode @@ -41,31 +42,47 @@ def slice_view (request, slicename=tmp_default_slice): main_plugin = Stack ( page=page, title="global container", - sons=[ - Hazelnut ( # setting visible attributes first + togglable=False, + sons=[Tabs ( page=page, - title='a sample and simple hazelnut', - # this is the query at the core of the slice list - query=main_query, - ), - QueryCode ( + title="different angles", + active_domid='with-checkboxes', + sons=[ + Hazelnut ( + page=page, + title='a sample and simple hazelnut', + togglable=False, + # this is the query at the core of the slice list + query=main_query, + ), + Hazelnut ( + page=page, + title='with checkboxes', + domid='with-checkboxes', + togglable=False, + checkboxes=True, + # this is the query at the core of the slice list + query=main_query, + ), + ]), + QueryCode ( page=page, title='xmlrpc code', query=main_query, toggled=False, ), - ]) + ]) # variables that will get passed to the view-plugin.html template template_env = {} - # define 'unfold1_main' to the template engine + # define 'unfold2_main' to the template engine template_env [ 'unfold1_main' ] = main_plugin.render(request) # more general variables expected in the template template_env [ 'title' ] = 'Test view for hazelnut' # the menu items on the top - template_env [ 'topmenu_items' ] = topmenu_items('hazelnut', request) + template_env [ 'topmenu_items' ] = topmenu_items('slice', request) # so we can sho who is logged template_env [ 'username' ] = the_user (request) @@ -81,7 +98,7 @@ def slice_view (request, slicename=tmp_default_slice): ### query=main_query, ### ) ### # likewise but on the side view -### template_env [ 'unfold1_margin' ] = related_plugin.render (request) +### template_env [ 'unfold2_margin' ] = related_plugin.render (request) ### ### # add our own css in the mix ### page.add_css_files ( 'css/hazelnut.css') @@ -96,5 +113,7 @@ def slice_view (request, slicename=tmp_default_slice): # define {js,css}_{files,chunks} prelude_env = page.prelude_env() template_env.update(prelude_env) - return render_to_response ('view-plugin.html',template_env, + result=render_to_response ('view-slice.html',template_env, context_instance=RequestContext(request)) + print 'result=',result + return result