Revert remains of 'upgrade upsell to course info banner'.
TNL-6381 added an upgrade upsell to course info. In PR #15265, this was partially removed/moved, but some clean-up work remained. LEARNER-2026
This commit is contained in:
@@ -203,6 +203,7 @@ $btn-border-radius: $component-border-radius !default;
|
||||
$btn-large-padding-vertical: spacing-vertical(small);
|
||||
$btn-large-padding-horizontal: spacing-horizontal(mid-large);
|
||||
|
||||
|
||||
$btn-base-padding-vertical: spacing-vertical(x-small);
|
||||
$btn-base-padding-horizontal: spacing-horizontal(base);
|
||||
$btn-base-font-size: font-size(base);
|
||||
|
||||
@@ -30,7 +30,6 @@ from courseware.courses import (
|
||||
sort_by_announcement,
|
||||
sort_by_start_date
|
||||
)
|
||||
from courseware.date_summary import VerifiedUpgradeDeadlineDate
|
||||
from courseware.masquerade import setup_masquerade
|
||||
from courseware.model_data import FieldDataCache
|
||||
from courseware.models import BaseStudentModuleHistory, StudentModule
|
||||
@@ -404,9 +403,6 @@ def course_info(request, course_id):
|
||||
return render_to_response('courseware/info.html', context)
|
||||
|
||||
|
||||
UPGRADE_COOKIE_NAME = 'show_upgrade_notification'
|
||||
|
||||
|
||||
class StaticCourseTabView(EdxFragmentView):
|
||||
"""
|
||||
View that displays a static course tab with a given name.
|
||||
|
||||
@@ -11,12 +11,6 @@
|
||||
$('.date-summary-verified-upgrade-deadline .date-summary-link').on('click', function() {
|
||||
Logger.log('edx.course.enrollment.upgrade.clicked', {location: 'sidebar'});
|
||||
});
|
||||
$('.upgrade-banner-button').on('click', function() {
|
||||
Logger.log('edx.course.enrollment.upgrade.clicked', {location: 'notification'});
|
||||
});
|
||||
$('.view-verified-info').on('click', function() {
|
||||
Logger.log('edx.course.home.learn_about_verified.clicked', {location: 'notification'});
|
||||
});
|
||||
};
|
||||
});
|
||||
}).call(this, define || RequireJS.define);
|
||||
|
||||
@@ -1,21 +1,3 @@
|
||||
<div class="upgrade-banner">
|
||||
<div class="notification-color-border"></div>
|
||||
<div class="notification-content">
|
||||
<div class="upgrade-icon">
|
||||
<img src="${STATIC_URL}images/edx-verified-mini-cert.png">
|
||||
</div>
|
||||
<div class="upgrade-msg">
|
||||
<h4 class="upgrade-msg">Give yourself an additional incentive to complete</h4>
|
||||
<p class="view-verified-info">Earn a verified certificate
|
||||
<a href="https://www.edx.org/verified-certificate" target="_blank">Learn More</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="upgrade-banner-button">
|
||||
<a href="/verify_student/upgrade/course-v1:Test+TestX+2015" class="btn-upgrade">Upgrade Now</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="date-summary-container">
|
||||
<div class="date-summary date-summary-verified-upgrade-deadline">
|
||||
<h3 class="heading">Verification Upgrade Deadline</h3>
|
||||
|
||||
@@ -21,19 +21,5 @@ define(['jquery', 'logger', 'js/courseware/course_home_events'], function($, Log
|
||||
$('.date-summary-link').click();
|
||||
expect(Logger.log).toHaveBeenCalledWith('edx.course.enrollment.upgrade.clicked', {location: 'sidebar'});
|
||||
});
|
||||
|
||||
it('sends an event when "Upgrade Now" is clicked from the upsell notification', function() {
|
||||
$('.upgrade-banner-button').click();
|
||||
expect(Logger.log).toHaveBeenCalledWith(
|
||||
'edx.course.enrollment.upgrade.clicked', {location: 'notification'}
|
||||
);
|
||||
});
|
||||
|
||||
it('sends an event when "Learn More" is clicked from the upsell notification', function() {
|
||||
$('.view-verified-info').click();
|
||||
expect(Logger.log).toHaveBeenCalledWith(
|
||||
'edx.course.home.learn_about_verified.clicked', {location: 'notification'}
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -104,34 +104,6 @@ div.info-wrapper {
|
||||
min-width: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.upgrade-msg {
|
||||
flex: 5 1 60%; //This percentage was required to get the text
|
||||
// in the message to wrap when collapsed.
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
padding: $baseline/2 0;
|
||||
.msg-title {
|
||||
font-weight: font-weight(semi-bold);
|
||||
font-size: font-size(large);
|
||||
line-height: $base-line-height;
|
||||
margin: 0;
|
||||
}
|
||||
.view-verified-info {
|
||||
margin-top: $baseline/4;
|
||||
font-weight: font-weight(normal);
|
||||
font-size: font-size(base);
|
||||
}
|
||||
|
||||
a:link, a:hover, a:visited, a:active {
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
}
|
||||
|
||||
.upgrade-banner-button {
|
||||
@include margin(0, 0, 0, auto);
|
||||
padding: $baseline/2 $baseline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user