cosmetic
[unfold.git] / trash / sliceview.py
index 7796a14..8f8a8ba 100644 (file)
@@ -8,6 +8,7 @@ from django.contrib.auth.decorators import login_required
 from unfold.page import Page
 from manifold.manifoldquery import ManifoldQuery
 
+from plugins.raw.raw import Raw
 from plugins.stack.stack import Stack
 from plugins.tabs.tabs import Tabs
 from plugins.lists.slicelist import SliceList
@@ -22,7 +23,7 @@ from myslice.viewutils import quickfilter_criterias
 
 from myslice.viewutils import topmenu_items, the_user
 
-tmp_default_slice='ple.inria.sfatest'
+tmp_default_slice='ple.inria.heartbeat'
 
 @login_required
 def slice_view (request, slicename=tmp_default_slice):
@@ -43,11 +44,12 @@ def slice_view (request, slicename=tmp_default_slice):
         domid='thestack',
         togglable=False,
         sons=[
+            Raw (page=page,togglable=False, toggled=True,html="<h2> Slice page for %s</h2>"%slicename),
             Messages (
                 page=page,
-                title="Runtime messages",
+                title="Runtime messages for slice %s"%slicename,
                 domid="msgs-pre",
-                toggled=False,
+                levels="ALL",
                 ),
             Tabs (
                 page=page,
@@ -89,19 +91,31 @@ def slice_view (request, slicename=tmp_default_slice):
                         # tab's sons preferably turn this off
                         togglable=False,
                         query=main_query,
+                        # center on Paris
+                        latitude=49.,
+                        longitude=2.2,
+                        zoom=3,
                         ),
-                    SensLabMap (
+                    Raw (
+#                    SensLabMap (
                         page=page,
-                        title='3D view',
+                        title='3D view (disabled)',
                         domid='smap',
-                        # tab's sons preferably turn this off
+#                        # tab's sons preferably turn this off
                         togglable=False,
-                        query=main_query,
+#                        query=main_query,
+                        html="""<p class='well'>
+Thierry: I am commeting off the use of <button class="btn btn-danger">SensLabMap</button> which,
+ although rudimentarily ported to the django framework, 
+causes a weird behaviour especially wrt scrolling. 
+On my Mac <button class="btn btn-warning"> I cannot use the mouse to scroll</button> any longer
+if I keep this active, so for now it's disabled
+</p>""",
                         ),
                     ]),
             Hazelnut ( 
                 page=page,
-                title='not in tabs',
+                title='a hazelnut not in tabs',
                 domid='standalone',
                 # this is the query at the core of the slice list
                 query=main_query,
@@ -137,14 +151,14 @@ def slice_view (request, slicename=tmp_default_slice):
     template_env [ 'unfold1_main' ] = main_plugin.render(request)
 
     # more general variables expected in the template
-    template_env [ 'title' ] = 'Test view for hazelnut'
+    template_env [ 'title' ] = 'Test view that combines various plugins'
     # the menu items on the top
     template_env [ 'topmenu_items' ] = topmenu_items('slice', request) 
     # so we can sho who is logged
     template_env [ 'username' ] = the_user (request) 
 
     # don't forget to run the requests
-    page.exec_queue_asynchroneously ()
+    page.expose_queries ()
 
     # xxx create another plugin with the same query and a different layout (with_datatables)
     # show that it worls as expected, one single api call to backend and 2 refreshed views