From f055c6f9893439bdae6148eb313124ef32dc6ae5 Mon Sep 17 00:00:00 2001 From: Nate Hardison Date: Fri, 31 May 2013 15:37:00 -0700 Subject: [PATCH] Inject theming hooks into navigation bar Allow themes to inherit from the default navigation bar and override pieces of it, including the main logo, the links that display to the right of the logo, and the links inside the dropdown menu (with the exception of the `Log Out` link. In addition, this adds an empty block at the very top so that themes can place a branding bar at the top of the page. (Stanford identity guidelines require this: see https://identity.stanford.edu.) --- lms/templates/navigation.html | 51 ++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html index 13c461173b..104366c8c4 100644 --- a/lms/templates/navigation.html +++ b/lms/templates/navigation.html @@ -1,6 +1,6 @@ ## mako <%namespace name='static' file='static_content.html'/> -<%namespace file='main.html' import="login_query"/> +<%namespace file='main.html' import="login_query, stanford_theme_enabled"/> <%! from django.core.urlresolvers import reverse @@ -10,6 +10,9 @@ import branding from status.status import get_site_status_msg %> +## Provide a hook for themes to inject branding on top. +<%block name="navigation_top" /> + <%block cached="False"> <% try: @@ -38,9 +41,12 @@ site_status_msg = get_site_status_msg(course_id)