From 0a726a467924309845eb0ae6ebe0ed19f6d6d440 Mon Sep 17 00:00:00 2001 From: Uman Shahzad Date: Tue, 24 Oct 2017 20:12:27 +0500 Subject: [PATCH] Show the Enterprise tagline on the logistration page. --- lms/djangoapps/student_account/views.py | 3 ++- lms/static/sass/views/_login-register.scss | 16 ++++++++++++++++ lms/templates/header/brand.html | 7 +++++++ lms/templates/header/navbar-logo-header.html | 7 +++++++ lms/templates/navigation/navbar-logo-header.html | 7 +++++++ 5 files changed, 39 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/student_account/views.py b/lms/djangoapps/student_account/views.py index 49b90e2b9d..e454cc12df 100644 --- a/lms/djangoapps/student_account/views.py +++ b/lms/djangoapps/student_account/views.py @@ -267,7 +267,8 @@ def enterprise_sidebar_context(request): platform_name = configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME) - logo_url = enterprise_customer.get('branding_configuration', {}).get('logo', '') + branding_configuration = enterprise_customer.get('branding_configuration', {}) + logo_url = branding_configuration.get('logo', '') if isinstance(branding_configuration, dict) else '' branded_welcome_template = configuration_helpers.get_value( 'ENTERPRISE_SPECIFIC_BRANDED_WELCOME_TEMPLATE', diff --git a/lms/static/sass/views/_login-register.scss b/lms/static/sass/views/_login-register.scss index a26235a7c1..7c25ec9fb9 100644 --- a/lms/static/sass/views/_login-register.scss +++ b/lms/static/sass/views/_login-register.scss @@ -32,6 +32,22 @@ } } +.enterprise-tagline { + width: 300px; + font-size: 14px; + text-align: left; + display: inline-block; + vertical-align: middle; + line-height: normal; + margin-left: -30px; +} + +@media (max-width: $bp-screen-sm) { + .enterprise-tagline { + width: 200px + } +} + .window-wrap { background: $white; } diff --git a/lms/templates/header/brand.html b/lms/templates/header/brand.html index 8bd713938b..cd6cf61a13 100644 --- a/lms/templates/header/brand.html +++ b/lms/templates/header/brand.html @@ -7,6 +7,7 @@ <%! from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ +from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers # App that handles subdomain specific branding from branding import api as branding_api @@ -18,6 +19,12 @@ from branding import api as branding_api ${_( + % if enable_enterprise_sidebar: + + <% tagline = configuration_helpers.get_value('ENTERPRISE_TAGLINE', settings.ENTERPRISE_TAGLINE) %> + ${tagline} + + % endif % if course and not disable_courseware_header:
${course.display_org_with_default}: diff --git a/lms/templates/header/navbar-logo-header.html b/lms/templates/header/navbar-logo-header.html index 576a9a8ed5..caaa81e6c4 100644 --- a/lms/templates/header/navbar-logo-header.html +++ b/lms/templates/header/navbar-logo-header.html @@ -7,6 +7,7 @@ from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from lms.djangoapps.ccx.overrides import get_current_ccx +from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers # App that handles subdomain specific branding from branding import api as branding_api @@ -18,6 +19,12 @@ from branding import api as branding_api + % if enable_enterprise_sidebar: + + <% tagline = configuration_helpers.get_value('ENTERPRISE_TAGLINE', settings.ENTERPRISE_TAGLINE) %> + ${tagline} + + % endif % if course:
${course.display_org_with_default}: diff --git a/lms/templates/navigation/navbar-logo-header.html b/lms/templates/navigation/navbar-logo-header.html index fa9ca45d38..834ab7f17a 100644 --- a/lms/templates/navigation/navbar-logo-header.html +++ b/lms/templates/navigation/navbar-logo-header.html @@ -7,6 +7,7 @@ from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from lms.djangoapps.ccx.overrides import get_current_ccx +from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers # App that handles subdomain specific branding from branding import api as branding_api @@ -20,6 +21,12 @@ from branding import api as branding_api
+ % if enable_enterprise_sidebar: + + <% tagline = configuration_helpers.get_value('ENTERPRISE_TAGLINE', settings.ENTERPRISE_TAGLINE) %> + ${tagline} + + % endif % if course:
${course.display_org_with_default}: