From 682d3d0eae470ea58caaea8c68c6fcce6bee9940 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Fri, 19 Dec 2014 08:26:16 -0800 Subject: [PATCH] Organize logic on Find Courses view. --- lms/templates/courseware/courses.html | 50 ++++++++++++++------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/lms/templates/courseware/courses.html b/lms/templates/courseware/courses.html index 9f5d2b1ef1..695ab9a5d3 100644 --- a/lms/templates/courseware/courses.html +++ b/lms/templates/courseware/courses.html @@ -1,39 +1,40 @@ -<%! from django.utils.translation import ugettext as _ %> +<%! + from django.utils.translation import ugettext as _ + from microsite_configuration import microsite +%> <%inherit file="../main.html" /> <%namespace name='static' file='../static_content.html'/> <%block name="pagetitle">${_("Courses")} -<%! from microsite_configuration import microsite %> +<% + platform_name = microsite.get_value('platform_name', settings.PLATFORM_NAME) + + if self.stanford_theme_enabled(): + course_index_overlay_text = _("Explore free courses from {university_name}.").format(university_name="Stanford University") + logo_file = static.url('themes/stanford/images/seal.png') + logo_alt_text = "Stanford Seal Logo" + + else: + course_index_overlay_text = microsite.get_value('course_index_overlay_text', _("Explore courses from {platform_name}.").format(platform_name=platform_name)) + # not sure why this is, but if I use static.url('images/edx-logo-bw.png') then the HTML rendering + # of this template goes wonky + + logo_file = microsite.get_value( + 'course_index_overlay_logo_file', settings.STATIC_URL + 'images/edx-logo-bw.png' + ) + logo_alt_text = _("{platform_name} Logo").format(platform_name=platform_name) +%>
-<% - course_index_overlay_text = microsite.get_value('course_index_overlay_text', _("Explore free courses from leading universities.")) - - # not sure why this is, but if I use static.url('images/edx-logo-bw.png') then the HTML rendering - # of this template goes wonky - - logo_file = microsite.get_value( - 'course_index_overlay_logo_file', settings.STATIC_URL + 'images/edx-logo-bw.png' - ) -%> - @@ -41,7 +42,7 @@
    - %for course in courses: + %for course in courses:
  • <%include file="../course.html" args="course=course" />
  • @@ -49,4 +50,5 @@
+