moksha/api/widgets/containers/templates/tabbedcontainer_panes.mak | 22 ++++++---- moksha/api/widgets/containers/templates/tabbedcontainer_tabs.mak | 16 ++++++- moksha/lib/helpers.py | 3 - 3 files changed, 31 insertions(+), 10 deletions(-)
New commits: commit df98e36d4a960f982633af096bf3761410855aa4 Author: John (J5) Palmieri johnp@redhat.com Date: Tue Mar 24 19:14:35 2009 -0400
allow tabbed navigation to contain category seperators
* ConfigWrapper's output hash now has a type member so templates can change state based on the type of wrapper they are dealing with
diff --git a/moksha/api/widgets/containers/templates/tabbedcontainer_panes.mak b/moksha/api/widgets/containers/templates/tabbedcontainer_panes.mak index 5bc58b7..5b3abd1 100644 --- a/moksha/api/widgets/containers/templates/tabbedcontainer_panes.mak +++ b/moksha/api/widgets/containers/templates/tabbedcontainer_panes.mak @@ -1,7 +1,15 @@ -% for t in tabs: - <div id="${t['content_id']}"> - % if t.has_key('widget'): - ${t['widget'](**t['params'])} - % endif - </div> -% endfor \ No newline at end of file +<%def name="add_panel(tabgroup)"> + % for t in tabgroup: + % if t['type'] == 'Category': + ${add_panel(t['apps'])} + % else: + <div id="${t['content_id']}"> + % if t.has_key('widget'): + ${t['widget'](**t['params'])} + % endif + </div> + % endif + % endfor +</%def> + +${add_panel(tabs)} \ No newline at end of file diff --git a/moksha/api/widgets/containers/templates/tabbedcontainer_tabs.mak b/moksha/api/widgets/containers/templates/tabbedcontainer_tabs.mak index 9d58943..a31202f 100644 --- a/moksha/api/widgets/containers/templates/tabbedcontainer_tabs.mak +++ b/moksha/api/widgets/containers/templates/tabbedcontainer_tabs.mak @@ -1,9 +1,21 @@ -<ul id="${root_id}"> - % for t in tabs: + +<div id="${root_id}"> +<%def name="display_tabs(tabgroup)"> +<ul> + % for t in tabgroup: <li> + % if t['type'] == 'Category': + <H3>${t['label']}</H3> + ${display_tabs(t['apps'])} + % else: <a href="${t['url']}${t['query_string']}" title="${t['content_id']}"> ${t['label']} </a> + % endif </li> % endfor </ul> +</%def> + +${display_tabs(tabs)} +</div> diff --git a/moksha/lib/helpers.py b/moksha/lib/helpers.py index 13f04b4..b181d20 100644 --- a/moksha/lib/helpers.py +++ b/moksha/lib/helpers.py @@ -106,7 +106,8 @@ class ConfigWrapper(object): the configuration option """ default_values = dict(query_string='', - id = self.uuid) + id = self.uuid, + type = self.__class__.__name__)
return default_values
moksha-commits@lists.fedorahosted.org