Merge pull request #15033 from edx/minor_tweaks2
Add view course button
This commit is contained in:
@@ -143,7 +143,7 @@ define([
|
||||
singleCourseRunList[0].is_enrolled = true;
|
||||
|
||||
setupView(singleCourseRunList);
|
||||
expect(view.$el.html().trim()).toEqual('');
|
||||
expect(view.$('.view-course-button').text().trim()).toEqual('View Course');
|
||||
expect(view.$('.run-select').length).toBe(0);
|
||||
});
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
<% if (!is_enrolled) { %>
|
||||
<% if (is_enrolled && (typeof expired === 'undefined' || expired === false)) { %>
|
||||
<a href="<%- course_url %>" class="view-course-button btn-brand btn cta-primary">
|
||||
<% if (is_course_ended) { %>
|
||||
<%- gettext('View Archived Course') %>
|
||||
<% } else { %>
|
||||
<%- gettext('View Course') %>
|
||||
<% } %>
|
||||
</a>
|
||||
<% } else { %>
|
||||
<% if (enrollable_course_runs.length > 0) { %>
|
||||
<% if (enrollable_course_runs.length > 1) { %>
|
||||
<div class="run-select-container">
|
||||
|
||||
Reference in New Issue
Block a user