diff --git a/lms/static/js/learner_dashboard/views/certificate_status_view.js b/lms/static/js/learner_dashboard/views/certificate_status_view.js index ec1b43cea8..7f55e5a3d2 100644 --- a/lms/static/js/learner_dashboard/views/certificate_status_view.js +++ b/lms/static/js/learner_dashboard/views/certificate_status_view.js @@ -5,7 +5,8 @@ 'underscore', 'gettext', 'edx-ui-toolkit/js/utils/html-utils', - 'text!../../../templates/learner_dashboard/certificate_status.underscore' + 'text!../../../templates/learner_dashboard/certificate_status.underscore', + 'text!../../../templates/learner_dashboard/certificate_icon.underscore' ], function( Backbone, @@ -13,10 +14,12 @@ _, gettext, HtmlUtils, - certificateStatusTpl + certificateStatusTpl, + certificateIconTpl ) { return Backbone.View.extend({ - tpl: HtmlUtils.template(certificateStatusTpl), + statusTpl: HtmlUtils.template(certificateStatusTpl), + iconTpl: HtmlUtils.template(certificateIconTpl), initialize: function(options) { this.$el = options.$el; @@ -24,8 +27,13 @@ }, render: function() { - var data = this.model.toJSON(); - HtmlUtils.setHtml(this.$el, this.tpl(data)); + var data = this.model.toJSON(), + $icons; + + HtmlUtils.setHtml(this.$el, this.statusTpl(data)); + + $icons = this.$('.certificate-icon'); + HtmlUtils.setHtml($icons, this.iconTpl()); } }); } diff --git a/lms/static/sass/elements/_icons.scss b/lms/static/sass/elements/_icons.scss index da6e511a14..4a2a7f5ee0 100644 --- a/lms/static/sass/elements/_icons.scss +++ b/lms/static/sass/elements/_icons.scss @@ -1,11 +1,22 @@ -.verified-cert-icon { +.certificate-icon .certificate-body { @include float(left); @include margin-right($baseline*0.4); - margin-top: ($baseline/4); - background: url('#{$static-path}/images/icon-sm-verified.png') no-repeat; - background-position: -4px -5px; + margin-top: ($baseline/10); + width: 23px; + height: 20px; + padding: 2px; background-color: palette(grayscale, white-t); - width: 20px; - height: 18px; + border-style: solid; + border-width: 2px; +} + +.green-certificate-icon .certificate-body { + fill: palette(success, dark); + border-color: palette(success, dark); +} + +.blue-certificate-icon .certificate-body { + fill: palette(primary, dark); + border-color: palette(primary, dark); } diff --git a/lms/templates/learner_dashboard/certificate_icon.underscore b/lms/templates/learner_dashboard/certificate_icon.underscore new file mode 100644 index 0000000000..09e0a7e7a5 --- /dev/null +++ b/lms/templates/learner_dashboard/certificate_icon.underscore @@ -0,0 +1,6 @@ + + + + + + diff --git a/lms/templates/learner_dashboard/certificate_status.underscore b/lms/templates/learner_dashboard/certificate_status.underscore index efd86b5c36..59cc7ec207 100644 --- a/lms/templates/learner_dashboard/certificate_status.underscore +++ b/lms/templates/learner_dashboard/certificate_status.underscore @@ -1,10 +1,10 @@
- + <%- gettext('Congratulations! You have earned a certificate for this course.') %>
- + <%- gettext('View/Share Certificate') %>