From 069aea8f4042fb47994ab763fbb7f8552b1f7911 Mon Sep 17 00:00:00 2001 From: Carla Duarte Date: Wed, 13 May 2020 13:18:35 -0400 Subject: [PATCH] Dates Intro Messaging Added a banner to introduce learners to the Dates Tab. The banner is hidden when the learner has missed deadlines. Refactored naming conventions in the dates sass file to better reflect the function of our banners. AA-156 --- lms/static/sass/course/_dates.scss | 11 +++++++---- lms/static/sass/course/_info.scss | 2 +- lms/templates/courseware/dates.html | 17 +++++++++++++---- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/lms/static/sass/course/_dates.scss b/lms/static/sass/course/_dates.scss index 743bcd18ac..4207a44e9f 100644 --- a/lms/static/sass/course/_dates.scss +++ b/lms/static/sass/course/_dates.scss @@ -9,7 +9,7 @@ border-bottom: 0; } - .upgrade-banner { + .dates-banner { border-radius: 4px; border: solid 1px #9cd2e6; background-color: #eff8fa; @@ -21,14 +21,17 @@ justify-content: space-between; max-width: $text-width-readability-max; - .upgrade-banner-text { + .dates-banner-text { font-size: 16px; line-height: 24px; color: #414141; - flex: 1 1 20em; - max-width: 70%; } + .banner-has-button { + flex: 1 1 20em; + max-width: 70%; + } + .upgrade-button { align-self: start; flex: none; diff --git a/lms/static/sass/course/_info.scss b/lms/static/sass/course/_info.scss index 4cacfa3316..ab6f6a4f17 100644 --- a/lms/static/sass/course/_info.scss +++ b/lms/static/sass/course/_info.scss @@ -58,7 +58,7 @@ div.info-wrapper { width: 100%; display: block; - div.upgrade-banner { + div.dates-banner { // This banner uses the Pattern Library's defined variables @include border-left(0); diff --git a/lms/templates/courseware/dates.html b/lms/templates/courseware/dates.html index 127e2a147d..6b13518f95 100644 --- a/lms/templates/courseware/dates.html +++ b/lms/templates/courseware/dates.html @@ -26,10 +26,19 @@ from openedx.core.djangolib.markup import HTML, Text

${_("Important Dates")}

+ % if not display_reset_dates_text: +
+
+ ${_("We've built a suggested schedule to help you stay on track.")} + ${_("But don't worry—it's flexible so you can learn at your own pace.")} + ${_("If you happen to fall behind on our suggested dates, you'll be able to adjust them to keep yourself on track.")} +
+
+ % endif <% has_locked_assignments = any(hasattr(block, 'contains_gated_content') and block.contains_gated_content for block in course_date_blocks if isinstance(block, CourseAssignmentDate)) %> % if has_locked_assignments and verified_upgrade_link: -
-
+
+ % endif % if display_reset_dates_text and learner_is_verified: -
-
+
+