- <%!
- from django.conf import settings
-
- partner_email = settings.PARTNER_SUPPORT_EMAIL
-
- links = [{
- 'href': 'http://docs.edx.org',
- 'sr_mouseover_text': _('Access documentation on http://docs.edx.org'),
- 'text': _('edX Documentation'),
- 'condition': True
- }, {
- 'href': 'https://open.edx.org',
- 'sr_mouseover_text': _('Access the Open edX Portal'),
- 'text': _('Open edX Portal'),
- 'condition': True
- }, {
- 'href': 'https://www.edx.org/course/overview-creating-edx-course-edx-edx101#.VO4eaLPF-n1',
- 'sr_mouseover_text': _('Enroll in edX101: Overview of Creating an edX Course'),
- 'text': _('Enroll in edX101'),
- 'condition': True
- }, {
- 'href': 'https://www.edx.org/course/creating-course-edx-studio-edx-studiox',
- 'sr_mouseover_text': _('Enroll in StudioX: Creating a Course with edX Studio'),
- 'text': _('Enroll in StudioX'),
- 'condition': True
- }, {
- 'href': 'mailto:{email}'.format(email=partner_email),
- 'sr_mouseover_text': _('Send an email to {email}').format(email=partner_email),
- 'text': _('Contact Us'),
- 'condition': bool(partner_email)
- }]
- %>
-
- % for link in links:
+ % for link in get_sock_links():
% if link['condition']:
-
${link['text']}
diff --git a/cms/templates/widgets/sock_links.html b/cms/templates/widgets/sock_links.html
new file mode 100644
index 0000000000..f9c1e4b433
--- /dev/null
+++ b/cms/templates/widgets/sock_links.html
@@ -0,0 +1,40 @@
+<%page expression_filter="h" />
+<%!
+from django.conf import settings
+from django.utils.translation import ugettext as _
+%>
+
+<%def name="get_sock_links()">
+ <%
+ partner_email = settings.PARTNER_SUPPORT_EMAIL
+ links = [
+ {
+ 'href': 'http://docs.edx.org',
+ 'sr_mouseover_text': _('Access documentation on http://docs.edx.org'),
+ 'text': _('edX Documentation'),
+ 'condition': True
+ }, {
+ 'href': 'https://open.edx.org',
+ 'sr_mouseover_text': _('Access the Open edX Portal'),
+ 'text': _('Open edX Portal'),
+ 'condition': True
+ }, {
+ 'href': 'https://www.edx.org/course/overview-creating-edx-course-edx-edx101#.VO4eaLPF-n1',
+ 'sr_mouseover_text': _('Enroll in edX101: Overview of Creating an edX Course'),
+ 'text': _('Enroll in edX101'),
+ 'condition': True
+ }, {
+ 'href': 'https://www.edx.org/course/creating-course-edx-studio-edx-studiox',
+ 'sr_mouseover_text': _('Enroll in StudioX: Creating a Course with edX Studio'),
+ 'text': _('Enroll in StudioX'),
+ 'condition': True
+ }, {
+ 'href': 'mailto:{email}'.format(email=partner_email),
+ 'sr_mouseover_text': _('Send an email to {email}').format(email=partner_email),
+ 'text': _('Contact Us'),
+ 'condition': bool(partner_email)
+ }
+ ]
+ return links
+ %>
+%def>