renamed verticallayout into stack
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 19 Mar 2013 16:24:32 +0000 (17:24 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 19 Mar 2013 16:24:32 +0000 (17:24 +0100)
plugins/lists/simplelist.py
plugins/lists/staticlist.py
plugins/stack/__init__.py [moved from plugins/verticallayout/__init__.py with 100% similarity]
plugins/stack/stack.html [moved from plugins/verticallayout/verticallayout.html with 100% similarity]
plugins/stack/stack.py [new file with mode: 0644]
plugins/verticallayout/verticallayout.py [deleted file]
trash/dashboard.py
trash/pluginview.py
unfold/css/plugin.css
unfold/plugin.py

index b5a4faf..bf0120c 100644 (file)
@@ -14,6 +14,7 @@ class SimpleList (Plugin) :
     
     def template_env (self, request):
         env={}
+        # would need some cleaner means to set a header here
         header=getattr(self,'header',None)
         if header: env['header']=header
         env['with_datatables']= "yes" if self.with_datatables else ""
index 4655578..c5a254a 100644 (file)
@@ -14,9 +14,11 @@ class StaticList (Plugin) :
     
     def template_env (self, request):
         env={}
+        # would need some cleaner means to set a header here
         header=getattr(self,'header',None)
         if header: env['header']=header
         env['list']=self.list
+        env['with_datatables']= "yes" if self.with_datatables else ""
         return env
 
     def requirements (self):
diff --git a/plugins/stack/stack.py b/plugins/stack/stack.py
new file mode 100644 (file)
index 0000000..3ccfa54
--- /dev/null
@@ -0,0 +1,7 @@
+from django.template.loader import render_to_string
+
+from unfold.composite import Composite
+
+class Stack (Composite) :
+    
+    def template_file (self):        return "stack.html"
diff --git a/plugins/verticallayout/verticallayout.py b/plugins/verticallayout/verticallayout.py
deleted file mode 100644 (file)
index fe6ff45..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from django.template.loader import render_to_string
-
-from unfold.composite import Composite
-
-class VerticalLayout (Composite) :
-    
-    def template_file (self):        return "verticallayout.html"
index bf04ab4..969149c 100644 (file)
@@ -10,7 +10,7 @@ from django.contrib.auth.decorators import login_required
 from unfold.page import Page
 from manifold.manifoldquery import ManifoldQuery
 
-from plugins.verticallayout.verticallayout import VerticalLayout
+from plugins.stack.stack import Stack
 from plugins.lists.slicelist import SliceList
 from plugins.querycode.querycode import QueryCode
 from plugins.quickfilter.quickfilter import QuickFilter
@@ -36,7 +36,7 @@ def dashboard_view (request):
                                   sort='slice_hrn',)
     page.enqueue_query (slices_query)
 
-    main_plugin = VerticalLayout (
+    main_plugin = Stack (
         page=page,
         title="Putting stuff together",
         sons=[ 
index 214acff..5c996f8 100644 (file)
@@ -9,7 +9,7 @@ from django.contrib.auth.decorators import login_required
 
 from unfold.page import Page
 
-from plugins.verticallayout.verticallayout import VerticalLayout
+from plugins.stack.stack import Stack
 from plugins.tabs.tabs import Tabs
 from plugins.lists.staticlist import StaticList
 from plugins.quickfilter.quickfilter import QuickFilter
@@ -27,39 +27,39 @@ def test_plugin_view (request):
     template_env = {}
     
     main_plugin = \
-        VerticalLayout ( page=page,
-                         title='title for the vertical layout',
-                         sons = [ StaticList (page=page,
-                                              title='StaticList - with datatables - starts toggled off',
-                                              list=hard_wired_list, 
-                                              header='Hard wired header', 
-                                              foo='the value for foo',
-                                              with_datatables=True,
-                                              toggled=False),
-                                  Tabs (page=page,
-                                        title='Sample Tabs',
-                                        # *** we select this one to be the active tab ***
-                                        active='raw2',
-                                        sons = [ Raw (page=page,
-                                                      title='a raw plugin',domid='raw1',
-                                                      togglable=False,
-                                                      html= 3*lorem_p),
-                                                 StaticList(page=page,
-                                                            title='a slice list',
-                                                            togglable=False,
-                                                            header="static list but not togglable",
-                                                            list=hard_wired_slice_names),
-                                                 Raw (page=page,
-                                                      title='raw title',domid='raw2',
-                                                      togglable=False,html=lorem) ]),
-                                  StaticList (page=page,
-                                              title='SimpleList with slice names', 
-                                              list=hard_wired_slice_names,
-                                              ),
-                                  QuickFilter (page=page,
-                                               title='QuickFilter in main content',
-                                               criterias=quickfilter_criterias,
-                                               ) ] )
+        Stack ( page=page,
+                title='title for the vertical layout',
+                sons = [ StaticList (page=page,
+                                     title='StaticList - with datatables - starts toggled off',
+                                     list=hard_wired_list, 
+                                     header='Hard wired header', 
+                                     foo='the value for foo',
+                                     with_datatables=True,
+                                     toggled=False),
+                         Tabs (page=page,
+                               title='Sample Tabs',
+                               # *** we select this one to be the active tab ***
+                               active='raw2',
+                               sons = [ Raw (page=page,
+                                             title='a raw plugin',domid='raw1',
+                                             togglable=False,
+                                             html= 3*lorem_p),
+                                        StaticList(page=page,
+                                                   title='a slice list',
+                                                   togglable=False,
+                                                   header="static list but not togglable",
+                                                   list=hard_wired_slice_names),
+                                        Raw (page=page,
+                                             title='raw title',domid='raw2',
+                                             togglable=False,html=lorem) ]),
+                         StaticList (page=page,
+                                     title='SimpleList with slice names', 
+                                     list=hard_wired_slice_names,
+                                     ),
+                         QuickFilter (page=page,
+                                      title='QuickFilter in main content',
+                                      criterias=quickfilter_criterias,
+                                      ) ] )
     # define 'content_main' to the template engine
     template_env [ 'content_main' ] = main_plugin.render(request)
 
index 0c7aaa2..886ceb9 100644 (file)
@@ -1,5 +1,5 @@
 div.plugin-toggle {
-    padding:           10px;
+    padding:           4px;
     border-style:      dotted;
     border-width:      1px;
 }
@@ -9,3 +9,6 @@ p.plugin-show {
 p.plugin-hide { 
     cursor: n-resize;
 }
+p.plugin-show,i.icon-hand-right, p.plugin-hide,i.icon-hand-down {
+    padding-right: 4px;
+}
index c2bca29..7ae4745 100644 (file)
@@ -16,8 +16,8 @@ from unfold.prelude import Prelude
 # . True : to debug all plugin
 
 DEBUG= False
-#DEBUG= [ 'SliceList' ]
-#DEBUG=True
+DEBUG= [ 'SimpleList' ]
+DEBUG=True
 
 # decorator to deflect calls on Plugin to its Prelude through self.page.prelude
 def to_prelude (method):