From: Thierry Parmentelat Date: Wed, 20 Mar 2013 10:01:37 +0000 (+0100) Subject: how to tweak e.g. a given plugin's background color X-Git-Tag: myslice-django-0.1-2~54 X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=483267926b9e1d3dd0583a86b8e0c4f2b1ac9998 how to tweak e.g. a given plugin's background color --- diff --git a/plugins/stack/stack.html b/plugins/stack/stack.html index f765cd17..00863e4d 100644 --- a/plugins/stack/stack.html +++ b/plugins/stack/stack.html @@ -1,7 +1,7 @@
{% for son in sons %} {#

{{ son.title }}

#} -
+
{{ son.rendered }}
{% endfor %} diff --git a/plugins/stack/stack.py b/plugins/stack/stack.py index 3ccfa54f..c8ddbea7 100644 --- a/plugins/stack/stack.py +++ b/plugins/stack/stack.py @@ -5,3 +5,7 @@ from unfold.composite import Composite class Stack (Composite) : def template_file (self): return "stack.html" + def template_env (self, request): + env = Composite.template_env (self, request) + env['domid'] = self.domid + return env diff --git a/trash/css/dashboard.css b/trash/css/dashboard.css index 598d944a..3bd686be 100644 --- a/trash/css/dashboard.css +++ b/trash/css/dashboard.css @@ -1,3 +1,7 @@ div#sidelist table.with-datatables { font-size: 130%; } +# demo to show how to tweak a given section by setting its domid +#complete-quickfilter { + background-color: #f080f0; +} diff --git a/trash/dashboard.py b/trash/dashboard.py index 74493af9..719210ce 100644 --- a/trash/dashboard.py +++ b/trash/dashboard.py @@ -47,6 +47,7 @@ def dashboard_view (request): toggled=False, ), QuickFilter ( + domid='quickfilter', page=page, title='play with filters', criterias=quickfilter_criterias, diff --git a/unfold/plugin.py b/unfold/plugin.py index 7ae4745f..e56690b3 100644 --- a/unfold/plugin.py +++ b/unfold/plugin.py @@ -16,8 +16,8 @@ from unfold.prelude import Prelude # . True : to debug all plugin DEBUG= False -DEBUG= [ 'SimpleList' ] -DEBUG=True +#DEBUG= [ 'SimpleList' ] +#DEBUG=True # decorator to deflect calls on Plugin to its Prelude through self.page.prelude def to_prelude (method): diff --git a/unfold/templates/plugin.html b/unfold/templates/plugin.html index c77ad6f0..56ec1660 100644 --- a/unfold/templates/plugin.html +++ b/unfold/templates/plugin.html @@ -1,6 +1,6 @@ {##} {% if visible %} -
+
{% if togglable %}