From 4d08b70bb471ea780f62777f791d37ba92731af8 Mon Sep 17 00:00:00 2001 From: Matthew Piatetsky Date: Wed, 3 May 2017 14:05:03 -0400 Subject: [PATCH] Add view course button --- lms/static/sass/views/_program-details.scss | 26 +++++++++++++++++++ .../course_enroll_2017.underscore | 10 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/lms/static/sass/views/_program-details.scss b/lms/static/sass/views/_program-details.scss index dbde258c42..7ae8264982 100644 --- a/lms/static/sass/views/_program-details.scss +++ b/lms/static/sass/views/_program-details.scss @@ -303,6 +303,28 @@ } .course-enroll-view { + + .view-course-button { + background: palette(primary, dark); + border-color: palette(primary, dark); + height: 37px; + padding: 7px 18.5px 0 18.5px; + width: auto; + border-radius: 0; + text-align: center; + font-size: 0.9375em; + margin-top: 5px; + + /* IE11 CSS styles */ + @media(min-width: $bp-screen-md) and (-ms-high-contrast: none), (-ms-high-contrast: active) { + @include float(right); + } + + @media(min-width: $bp-screen-lg) { + margin-top: 0px; + } + } + .enroll-button { width: 100%; @@ -385,6 +407,10 @@ } + .section:not(:first-child) { + margin-top: 0; + } + .course-details { float: none; diff --git a/lms/templates/learner_dashboard/course_enroll_2017.underscore b/lms/templates/learner_dashboard/course_enroll_2017.underscore index 4f3d3eddec..b6769ce007 100644 --- a/lms/templates/learner_dashboard/course_enroll_2017.underscore +++ b/lms/templates/learner_dashboard/course_enroll_2017.underscore @@ -1,4 +1,12 @@ -<% if (!is_enrolled) { %> +<% if (is_enrolled && (typeof expired === 'undefined' || expired === false)) { %> + + <% if (is_course_ended) { %> + <%- gettext('View Archived Course') %> + <% } else { %> + <%- gettext('View Course') %> + <% } %> + +<% } else { %> <% if (enrollable_course_runs.length > 0) { %> <% if (enrollable_course_runs.length > 1) { %>