Add a link to edx.org in the default Open edX footer
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user