diff --git a/lms/djangoapps/branding/__init__.py b/lms/djangoapps/branding/__init__.py index afa590552d..a9d5742bb2 100644 --- a/lms/djangoapps/branding/__init__.py +++ b/lms/djangoapps/branding/__init__.py @@ -63,11 +63,15 @@ def get_logo_url(): # otherwise, use the legacy means to configure this university = microsite.get_value('university') - if university is None: - return '{static_url}images/logo-edX-77x36.png'.format( + if university is None and settings.FEATURES.get('IS_EDX_DOMAIN', False): + return '{static_url}images/edx-logo-77x36.png'.format( + static_url=settings.STATIC_URL + ) + elif university: + return '{static_url}images/{uni}-on-edx-logo.png'.format( + static_url=settings.STATIC_URL, uni=university + ) + else: + return '{static_url}images/logo-placeholder.png'.format( static_url=settings.STATIC_URL ) - - return '{static_url}images/{uni}-on-edx-logo.png'.format( - static_url=settings.STATIC_URL, uni=university - ) diff --git a/lms/envs/common.py b/lms/envs/common.py index e8da3006f8..e785c78f8b 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -186,7 +186,8 @@ FEATURES = { # Enable legacy instructor dashboard 'ENABLE_INSTRUCTOR_LEGACY_DASHBOARD': True, - # Is this an edX-owned domain? (used on instructor dashboard) + + # Is this an edX-owned domain? (used for edX specific messaging and images) 'IS_EDX_DOMAIN': False, # Toggle to enable certificates of courses on dashboard diff --git a/lms/static/images/header-logo.png b/lms/static/images/edx-header-logo.png similarity index 100% rename from lms/static/images/header-logo.png rename to lms/static/images/edx-header-logo.png diff --git a/lms/static/images/logo-edX-77x36.png b/lms/static/images/edx-logo-77x36.png similarity index 100% rename from lms/static/images/logo-edX-77x36.png rename to lms/static/images/edx-logo-77x36.png diff --git a/lms/static/images/logo-placeholder-large.png b/lms/static/images/logo-placeholder-large.png new file mode 100644 index 0000000000..f762f3bc9e Binary files /dev/null and b/lms/static/images/logo-placeholder-large.png differ diff --git a/lms/templates/courseware/courses.html b/lms/templates/courseware/courses.html index 695ab9a5d3..5f8a0c80fe 100644 --- a/lms/templates/courseware/courses.html +++ b/lms/templates/courseware/courses.html @@ -17,12 +17,17 @@ 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 + + if settings.FEATURES.get('IS_EDX_DOMAIN', False): + # For some reason, `static.url('images/edx-logo-bw.png')` breaks template rendering. + default_image_url = settings.STATIC_URL + 'images/edx-logo-bw.png' + else: + default_image_url = settings.STATIC_URL + 'images/logo-placeholder-large.png' logo_file = microsite.get_value( - 'course_index_overlay_logo_file', settings.STATIC_URL + 'images/edx-logo-bw.png' + 'course_index_overlay_logo_file', default_image_url ) + logo_alt_text = _("{platform_name} Logo").format(platform_name=platform_name) %> diff --git a/lms/templates/footer-edx-new.html b/lms/templates/footer-edx-new.html index ee2189542f..ade89a574d 100644 --- a/lms/templates/footer-edx-new.html +++ b/lms/templates/footer-edx-new.html @@ -11,7 +11,7 @@