improved quality of multiple files

This commit is contained in:
noraiz-anwar
2019-07-17 11:32:45 +05:00
committed by Noraiz Anwar
parent 85be57b64a
commit 1c4f9da92d
14 changed files with 127 additions and 96 deletions

View File

@@ -1,9 +1,11 @@
<%page expression_filter="h"/>
<%inherit file="base.html" />
<%def name="online_help_token()"><% return "certificates" %></%def>
<%namespace name='static' file='static_content.html'/>
<%!
from contentstore import utils
from django.utils.translation import ugettext as _
from openedx.core.djangolib.markup import HTML, Text
from openedx.core.djangolib.js_utils import (
dump_js_escaped_json, js_escaped_string
)
@@ -25,8 +27,8 @@ from openedx.core.djangolib.js_utils import (
window.CMS = window.CMS || {};
CMS.URL = CMS.URL || {};
CMS.User = CMS.User || {};
CMS.URL.UPLOAD_ASSET = '${upload_asset_url}';
CMS.User.isGlobalStaff = '${is_global_staff}'=='True' ? true : false;
CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}';
CMS.User.isGlobalStaff = '${is_global_staff | n, js_escaped_string}'=='True' ? true : false;
</script>
</%block>
@@ -88,13 +90,13 @@ CMS.User.isGlobalStaff = '${is_global_staff}'=='True' ? true : false;
<h3 class="title-3">${_("Working with Certificates")}</h3>
<p>${_("Specify a course title to use on the certificate if the course's official title is too long to be displayed well.")}</p>
<p>${_("For verified certificates, specify between one and four signatories and upload the associated images.")}</p>
<p>${_("To edit or delete a certificate before it is activated, hover over the top right corner of the form and select {em_start}Edit{em_end} or the delete icon.").format(em_start="<strong>", em_end="</strong>")}</p>
<p>${_("To view a sample certificate, choose a course mode and select {em_start}Preview Certificate{em_end}.").format(em_start='<strong>', em_end="</strong>")}</p>
<p>${Text(_("To edit or delete a certificate before it is activated, hover over the top right corner of the form and select {em_start}Edit{em_end} or the delete icon.")).format(em_start=HTML("<strong>"), em_end=HTML("</strong>"))}</p>
<p>${Text(_("To view a sample certificate, choose a course mode and select {em_start}Preview Certificate{em_end}.")).format(em_start=HTML('<strong>'), em_end=HTML("</strong>"))}</p>
<h3 class="title-3">${_("Issuing Certificates to Learners")}</h3>
<p>${_("To begin issuing course certificates, a course team member with either the Staff or Admin role selects {em_start}Activate{em_end}. Only course team members with these roles can edit or delete an activated certificate.").format(em_start="<strong>", em_end="</strong>")}</p>
<p>${_("{em_start}Do not{em_end} delete certificates after a course has started; learners who have already earned certificates will no longer be able to access them.").format(em_start="<strong>", em_end="</strong>")}</p>
<p><a href="${get_online_help_info(online_help_token())['doc_url']}" target="_blank" class="button external-help-button">${_("Learn more about certificates")}</a></p>
<p>${Text(_("To begin issuing course certificates, a course team member with either the Staff or Admin role selects {em_start}Activate{em_end}. Only course team members with these roles can edit or delete an activated certificate.")).format(em_start=HTML("<strong>"), em_end=HTML("</strong>"))}</p>
<p>${Text(_("{em_start}Do not{em_end} delete certificates after a course has started; learners who have already earned certificates will no longer be able to access them.")).format(em_start=HTML("<strong>"), em_end=HTML("</strong>"))}</p>
<p><a href="${get_online_help_info(online_help_token())['doc_url']}" rel="noopener" target="_blank" class="button external-help-button">${_("Learn more about certificates")}</a></p>
</div>
</div>
<div class="bit">
@@ -108,7 +110,7 @@ CMS.User.isGlobalStaff = '${is_global_staff}'=='True' ? true : false;
<h2 class="title-3">${_("Other Course Settings")}</h2>
<nav class="nav-related" aria-label="${_('Other Course Settings')}">
<ul>
<li class="nav-item"><a href="${details_url}">${_("Details &amp; Schedule")}</a></li>
<li class="nav-item"><a href="${details_url}">${_("Details & Schedule")}</a></li>
<li class="nav-item"><a href="${grading_url}">${_("Grading")}</a></li>
<li class="nav-item"><a href="${course_team_url}">${_("Course Team")}</a></li>
<li class="nav-item"><a href="${advanced_settings_url}">${_("Advanced Settings")}</a></li>

View File

@@ -155,7 +155,7 @@ from openedx.core.djangolib.markup import HTML, Text
<h5 class="title">${_("Location ID")}</h5>
<p class="unit-id">
<span class="unit-id-value" id="unit-location-id-input">${unit.location.block_id}</span>
<span class="tip"><span class="sr">Tip: </span>${_('To create a link to this unit from an HTML component in this course, enter "/jump_to_id/<location ID>" as the URL value.')}</span>
<span class="tip"><span class="sr">Tip: </span>${Text(_('To create a link to this unit from an HTML component in this course, enter "/jump_to_id/<location ID>" as the URL value.'))}</span>
</p>
</div>
<div class="wrapper-unit-tree-location bar-mod-content">

View File

@@ -1,17 +1,17 @@
<label for="course-modes"><%= gettext("Choose mode") %></label>
<label for="course-modes"><%- gettext("Choose mode") %></label>
<select id="course-modes">
<% _.each(course_modes, function(course_mode) { %>
<option value= "<%= course_mode %>"><%= course_mode %></option>
<option value= "<%- course_mode %>"><%- course_mode %></option>
<% }); %>
</select>
<a href=<%= certificate_web_view_url %> class="button preview-certificate-link" target="_blank">
<%= gettext("Preview Certificate") %>
<a href=<%- certificate_web_view_url %> class="button preview-certificate-link" rel="noopener" target="_blank">
<%- gettext("Preview Certificate") %>
</a>
<button class="button activate-cert">
<span>
<% if(!is_active) { %>
<%= gettext("Activate") %></span>
<%- gettext("Activate") %></span>
<% } else { %>
<%= gettext("Deactivate") %></span>
<%- gettext("Deactivate") %></span>
<% } %>
</button>

View File

@@ -1,6 +1,6 @@
<div class="wrapper-license">
<h3 class="label setting-label">
<%= gettext("License Type") %>
<%- gettext("License Type") %>
</h3>
<ul class="license-types">
<% var link_start_tpl = '<a href="{url}" target="_blank">'; %>
@@ -14,8 +14,8 @@
</button>
<p class="tip">
<% if(license.url) { %>
<a href="<%- license.url %>" target="_blank">
<%= gettext("Learn more about {license_name}")
<a href="<%- license.url %>" rel="noopener" target="_blank">
<%- gettext("Learn more about {license_name}")
.replace("{license_name}", license.name)
%>
</a>
@@ -71,15 +71,15 @@
<% if (showPreview) { %>
<div class="wrapper-license-preview">
<h4 class="label setting-label">
<%= gettext("License Display") %>
<%- gettext("License Display") %>
</h4>
<p class="tip">
<%= gettext("The following message will be displayed at the bottom of the courseware pages within your course:") %>
<%- gettext("The following message will be displayed at the bottom of the courseware pages within your course:") %>
</p>
<div class="license-preview">
<% // keep this synchronized with the contents of common/templates/license.html %>
<% if (model.type === "all-rights-reserved") { %>
© <span class="license-text"><%= gettext("All Rights Reserved") %></span>
© <span class="license-text"><%- gettext("All Rights Reserved") %></span>
<% } else if (model.type === "creative-commons") {
var possible = ["by", "nc", "nd", "sa"];
var enabled = _.filter(possible, function(option) {
@@ -98,16 +98,16 @@
/>
<% } else { %>
<% //<span> must come before <i> icon or else spacing gets messed up %>
<span class="sr"><%= gettext("Creative Commons licensed content, with terms as follow:") %>&nbsp;</span><span aria-hidden="true" class="icon-cc"></span>
<span class="sr"><%- gettext("Creative Commons licensed content, with terms as follow:") %>&nbsp;</span><span aria-hidden="true" class="icon-cc"></span>
<% _.each(enabled, function(option) { %>
<span class="sr"><%- license.options[option.toUpperCase()].name %>&nbsp;</span><span aria-hidden="true" class="icon-cc-<%- option %>"></span>
<% }); %>
<span class="license-text"><%= gettext("Some Rights Reserved") %></span>
<span class="license-text"><%- gettext("Some Rights Reserved") %></span>
<% } %>
<% } else { %>
<%= typeof licenseString == "string" ? licenseString : "" %>
<%- typeof licenseString == "string" ? licenseString : "" %>
<% // Default to ARR license %>
© <span class="license-text"><%= gettext("All Rights Reserved") %></span>
© <span class="license-text"><%- gettext("All Rights Reserved") %></span>
<% } %>
</a>
</div>

View File

@@ -1,3 +1,3 @@
<a href="#" class="upload-action upload-setting"><%= model.get('value') ? gettext('Replace') : gettext('Upload') %>
</a><% if (model.get('value')) { %><a href="<%= model.get("value") %>" target="_blank" class="download-action download-setting"><%= gettext("Download") %>
<a href="#" class="upload-action upload-setting"><%- model.get('value') ? gettext('Replace') : gettext('Upload') %>
</a><% if (model.get('value')) { %><a href="<%- model.get("value") %>" rel="noopener" target="_blank" class="download-action download-setting"><%- gettext("Download") %>
</a><% } %>

View File

@@ -1,9 +1,10 @@
<%page expression_filter="h"/>
<%inherit file="base.html" />
<%def name="online_help_token()"><% return "textbooks" %></%def>
<%namespace name='static' file='static_content.html'/>
<%!
from django.utils.translation import ugettext as _
from openedx.core.djangolib.js_utils import dump_js_escaped_json
from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string
%>
<%block name="title">${_("Textbooks")}</%block>
@@ -21,9 +22,9 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json
<script type="text/javascript">
window.CMS = window.CMS || {};
CMS.URL = CMS.URL || {};
CMS.URL.UPLOAD_ASSET = "${upload_asset_url}"
CMS.URL.TEXTBOOKS = "${textbook_url}"
CMS.URL.LMS_BASE = "${settings.LMS_BASE}"
CMS.URL.UPLOAD_ASSET = "${upload_asset_url | n, js_escaped_string}"
CMS.URL.TEXTBOOKS = "${textbook_url | n, js_escaped_string}"
CMS.URL.LMS_BASE = "${settings.LMS_BASE | n, js_escaped_string}"
</script>
</%block>