Commit 14cd7d77 by louyihua

Translation & secure-aware changes to studio's settings page

1. Change the link of course's about page secure aware, which displays 'https' or 'http' prefix according to the current protocol.
2. Make the email in this page translatable.
parent 70d47fb5
......@@ -7,6 +7,7 @@
<%!
from django.utils.translation import ugettext as _
from contentstore import utils
import urllib
%>
<%block name="header_extras">
......@@ -93,13 +94,26 @@ require(["domReady!", "jquery", "js/models/settings/course_details", "js/views/s
<div class="note note-promotion note-promotion-courseURL has-actions">
<h3 class="title">${_("Course Summary Page")} <span class="tip">${_("(for student enrollment and access)")}</span></h3>
<div class="copy">
<p><a class="link-courseURL" rel="external" href="https:${lms_link_for_about_page}">https:${lms_link_for_about_page}</a></p>
<%
link_for_about_page = ("https:" if is_secure else "http:") + lms_link_for_about_page
%>
<p><a class="link-courseURL" rel="external" href="${link_for_about_page}">${link_for_about_page}</a></p>
</div>
<ul class="list-actions">
<li class="action-item">
<%
email_subject = urllib.quote(_("Enroll in {course_display_name}").format(
course_display_name = context_course.display_name_with_default
).encode("utf-8"))
email_body = urllib.quote(_('The course "{course_display_name}", provided by {platform_name}, is open for enrollment. Please navigate to this course at {link_for_about_page} to enroll.').format(
course_display_name = context_course.display_name_with_default,
platform_name = settings.PLATFORM_NAME,
link_for_about_page = link_for_about_page
).encode("utf-8"))
%>
<a title="${_('Send a note to students via email')}"
href="mailto:someone@domain.com?Subject=Enroll%20in%20${context_course.display_name_with_default}&body=The%20course%20&quot;${context_course.display_name_with_default}&quot;,%20provided%20by%20edX,%20is%20open%20for%20enrollment.%20Please%20navigate%20to%20this%20course%20at%20https:${lms_link_for_about_page}%20to%20enroll." class="action action-primary">
href="mailto:someone@domain.com?Subject=${email_subject}&body=${email_body}" class="action action-primary">
<i class="icon-envelope-alt icon-inline"></i>${_("Invite your students")}</a>
</li>
</ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment