Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
157c6850
Commit
157c6850
authored
Jun 23, 2016
by
Renzo Lucioni
Committed by
GitHub
Jun 23, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12836 from edx/renzo/switch-cert-icon
Use SVG cert icon for program detail page certificate section
parents
d3128f4d
c151761e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
13 deletions
+38
-13
lms/static/js/learner_dashboard/views/certificate_status_view.js
+13
-5
lms/static/sass/elements/_icons.scss
+17
-6
lms/templates/learner_dashboard/certificate_icon.underscore
+6
-0
lms/templates/learner_dashboard/certificate_status.underscore
+2
-2
No files found.
lms/static/js/learner_dashboard/views/certificate_status_view.js
View file @
157c6850
...
...
@@ -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
());
}
});
}
...
...
lms/static/sass/elements/_icons.scss
View file @
157c6850
.
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
);
}
lms/templates/learner_dashboard/certificate_icon.underscore
0 → 100644
View file @
157c6850
<svg class="certificate-body" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12.9 9.2">
<rect y="5.8" width="12.9" height="1.1" rx="0.5" ry="0.5"/>
<rect y="8.1" width="12.9" height="1.1" rx="0.5" ry="0.5"/>
<rect y="1.5" width="6.3" height="1.1" rx="0.5" ry="0.5"/>
<circle cx="10.5" cy="2" r="2"/>
</svg>
lms/templates/learner_dashboard/certificate_status.underscore
View file @
157c6850
<div class="message col-12 md-col-8">
<span class="
verified-cert
-icon" aria-hidden="true"></span>
<span class="
certificate-icon green-certificate
-icon" aria-hidden="true"></span>
<span class="card-msg"><%- gettext('Congratulations! You have earned a certificate for this course.') %></span>
</div>
<div class="action col-12 md-col-4">
<a href="<%- certificate_url %>" class="btn-brand cta-secondary">
<span class="
verified-cert
-icon" aria-hidden="true"></span>
<span class="
certificate-icon blue-certificate
-icon" aria-hidden="true"></span>
<%- gettext('View/Share Certificate') %>
</a>
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment