From 60d9b7a34adeb94f051cb7a10cd720ce54e874d8 Mon Sep 17 00:00:00 2001 From: Gust Date: Thu, 5 Mar 2015 10:03:01 -0300 Subject: [PATCH] Improve menu links from plugins --- colab/proxy/templates/proxy/menu_template.html | 20 ++++++++++++++------ colab/proxy/templatetags/proxy.py | 3 ++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/colab/proxy/templates/proxy/menu_template.html b/colab/proxy/templates/proxy/menu_template.html index 226a95e..f24f797 100644 --- a/colab/proxy/templates/proxy/menu_template.html +++ b/colab/proxy/templates/proxy/menu_template.html @@ -1,10 +1,18 @@ {% for title, links in menu_links.items %} - + {% else %} + + {% endif %} {% endfor %} diff --git a/colab/proxy/templatetags/proxy.py b/colab/proxy/templatetags/proxy.py index e2251bf..6d032a6 100644 --- a/colab/proxy/templatetags/proxy.py +++ b/colab/proxy/templatetags/proxy.py @@ -1,3 +1,4 @@ +from collections import OrderedDict from django.core.urlresolvers import reverse from django import template @@ -19,7 +20,7 @@ def proxy_menu(context): if menu_from_cache: return menu_from_cache - menu_links = {} + menu_links = OrderedDict() proxied_apps = context.get('proxy', {}) for app_name, app in proxied_apps.items(): -- libgit2 0.21.2