Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
6adca0ff
Commit
6adca0ff
authored
Jun 19, 2017
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a link to edx.org in the default Open edX footer
parent
be23aa47
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
lms/djangoapps/branding/api.py
+6
-2
lms/djangoapps/branding/tests/test_api.py
+5
-1
lms/templates/footer.html
+1
-0
No files found.
lms/djangoapps/branding/api.py
View file @
6adca0ff
...
...
@@ -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 Open
EdX and E
dX.org versions
This will handle both the Open
edX and e
dX.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 OpenE
dX".
"""Return the image link for "
Powered by Open e
dX".
Args:
is_secure (bool): Whether the request is using TLS.
...
...
lms/djangoapps/branding/tests/test_api.py
View file @
6adca0ff
...
...
@@ -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
)
lms/templates/footer.html
View file @
6adca0ff
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment