From 6379ee921abc4fa86b7cd35584c999e9fdaf6033 Mon Sep 17 00:00:00 2001 From: Bertrand Marron Date: Sat, 1 Feb 2014 16:12:27 +0100 Subject: [PATCH] Add '' default to bodyclass in courseware templates This prevents from having a 'None' CSS class in the tag when no css_class is defined for the course. --- lms/templates/courseware/courseware.html | 2 +- lms/templates/courseware/info.html | 2 +- lms/templates/courseware/static_tab.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lms/templates/courseware/courseware.html b/lms/templates/courseware/courseware.html index a4fb15a69f..e99a0456b7 100644 --- a/lms/templates/courseware/courseware.html +++ b/lms/templates/courseware/courseware.html @@ -6,7 +6,7 @@ <% return _("{course_number} Courseware").format(course_number=course.display_number_with_default) %> -<%block name="bodyclass">courseware ${course.css_class} +<%block name="bodyclass">courseware ${course.css_class or ''} <%block name="title"> % if section_title: ${page_title_breadcrumbs(section_title, course_name())} diff --git a/lms/templates/courseware/info.html b/lms/templates/courseware/info.html index 612ac5c08b..4422fc5526 100644 --- a/lms/templates/courseware/info.html +++ b/lms/templates/courseware/info.html @@ -26,7 +26,7 @@ $(document).ready(function(){ </script> </%block> -<%block name="bodyclass">${course.css_class}</%block> +<%block name="bodyclass">${course.css_class or ''}</%block> <section class="container"> <div class="info-wrapper"> % if user.is_authenticated(): diff --git a/lms/templates/courseware/static_tab.html b/lms/templates/courseware/static_tab.html index 2efc351cc4..4f8f54fc8d 100644 --- a/lms/templates/courseware/static_tab.html +++ b/lms/templates/courseware/static_tab.html @@ -1,5 +1,5 @@ <%inherit file="/main.html" /> -<%block name="bodyclass">${course.css_class}</%block> +<%block name="bodyclass">${course.css_class or ''}</%block> <%namespace name='static' file='/static_content.html'/> <%block name="headextra">