Add a link to edx.org in the default Open edX footer

This commit is contained in:
Ned Batchelder
2017-06-19 10:50:43 -04:00
parent be23aa47ed
commit 6adca0ff11
3 changed files with 12 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ def is_enabled():
def get_footer(is_secure=True):
"""Retrieve information used to render the footer.
This will handle both the OpenEdX and EdX.org versions
This will handle both the Open edX and edX.org versions
of the footer. All user-facing text is internationalized.
Currently, this does NOT support theming.
@@ -101,6 +101,10 @@ def get_footer(is_secure=True):
"mobile_links": _footer_mobile_links(is_secure),
"legal_links": _footer_legal_links(),
"openedx_link": _footer_openedx_link(),
"edx_org_link": {
"url": "https://www.edx.org/?utm_medium=affiliate_partner&utm_source=opensource-partner&utm_content=open-edx-partner-footer-link&utm_campaign=open-edx-footer",
"text": _("Take free online courses at edX.org"),
},
}
@@ -120,7 +124,7 @@ def _footer_copyright():
def _footer_openedx_link():
"""Return the image link for "powered by OpenEdX".
"""Return the image link for "Powered by Open edX".
Args:
is_secure (bool): Whether the request is using TLS.

View File

@@ -90,6 +90,10 @@ class TestFooter(TestCase):
'url': 'http://open.edx.org',
'image': 'https://files.edx.org/openedx-logos/edx-openedx-logo-tag.png',
'title': 'Powered by Open edX'
}
},
'edx_org_link': {
'url': 'https://www.edx.org/?utm_medium=affiliate_partner&utm_source=opensource-partner&utm_content=open-edx-partner-footer-link&utm_campaign=open-edx-footer',
'text': 'Take free online courses at edX.org',
},
}
self.assertEqual(actual_footer, expected_footer)

View File

@@ -58,6 +58,7 @@
<a href="${link['url']}">${link['title']}</a>
</li>
% endfor
<li><a href="${footer['edx_org_link']['url']}">${footer['edx_org_link']['text']}</a></li>
</ul>
</nav>
</div>