From deddb20b812d8a0318acbcbc258ab63290b02a64 Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Mon, 12 May 2014 11:11:11 -0700 Subject: [PATCH] Make default showcase, sidebar, and footer templates generic. --- .../Managed Software Center/msuhtml.py | 8 ++++++ .../templates/footer_template.html | 4 +-- .../templates/showcase_template.html | 6 ++--- .../templates/sidebar_template.html | 25 ++----------------- 4 files changed, 15 insertions(+), 28 deletions(-) diff --git a/code/Managed Software Center/Managed Software Center/msuhtml.py b/code/Managed Software Center/Managed Software Center/msuhtml.py index 77b67316..8613c3b9 100644 --- a/code/Managed Software Center/Managed Software Center/msuhtml.py +++ b/code/Managed Software Center/Managed Software Center/msuhtml.py @@ -218,6 +218,7 @@ def build_list_page(category=None, developer=None, filter=None): item_html = build_list_page_items_html( category=category, developer=developer, filter=filter) + # make HTML for Categories pop-up menu if category: categories_html = u'\n' else: @@ -229,9 +230,16 @@ def build_list_page(category=None, developer=None, filter=None): else: categories_html += u'\n' % item + categories_html_list = '' + # make HTML for list of categories + for item in sorted(category_list): + categories_html_list += u'\n' % ( + quote(item), item) + page = {} page['list_items'] = item_html page['category_items'] = categories_html + page['category_list'] = categories_html_list page['header_text'] = header if category or filter or developer: showcase = '' diff --git a/code/Managed Software Center/Managed Software Center/templates/footer_template.html b/code/Managed Software Center/Managed Software Center/templates/footer_template.html index 7b3aa8d6..b8cd78b1 100644 --- a/code/Managed Software Center/Managed Software Center/templates/footer_template.html +++ b/code/Managed Software Center/Managed Software Center/templates/footer_template.html @@ -1,7 +1,7 @@ diff --git a/code/Managed Software Center/Managed Software Center/templates/showcase_template.html b/code/Managed Software Center/Managed Software Center/templates/showcase_template.html index 8db619c6..a6634e72 100644 --- a/code/Managed Software Center/Managed Software Center/templates/showcase_template.html +++ b/code/Managed Software Center/Managed Software Center/templates/showcase_template.html @@ -40,8 +40,8 @@ window.onload=function(){
- Branding - Branding - Branding + Branding + Branding + Branding
diff --git a/code/Managed Software Center/Managed Software Center/templates/sidebar_template.html b/code/Managed Software Center/Managed Software Center/templates/sidebar_template.html index 9f8bb374..c494f6c3 100644 --- a/code/Managed Software Center/Managed Software Center/templates/sidebar_template.html +++ b/code/Managed Software Center/Managed Software Center/templates/sidebar_template.html @@ -1,30 +1,9 @@