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
f1e75d03
Commit
f1e75d03
authored
Nov 22, 2016
by
Matthew Piatetsky
Committed by
GitHub
Nov 22, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14008 from edx/ECOM-5537
ECOM-5537 Add Media Kit and move sitemap in footer
parents
ac2b5bcc
ae7020cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
2 deletions
+71
-2
lms/djangoapps/branding/api.py
+2
-1
lms/djangoapps/branding/tests/test_api.py
+69
-1
No files found.
lms/djangoapps/branding/api.py
View file @
f1e75d03
...
...
@@ -178,7 +178,7 @@ def _footer_navigation_links():
(
"contact"
,
marketing_link
(
"CONTACT"
),
_
(
"Contact"
)),
(
"careers"
,
marketing_link
(
"CAREERS"
),
_
(
"Careers"
)),
(
"donate"
,
marketing_link
(
"DONATE"
),
_
(
"Donate"
)),
(
"
sitemap"
,
marketing_link
(
"SITE_MAP"
),
_
(
"Sitemap"
)),
(
"
media_kit"
,
marketing_link
(
"MEDIA_KIT"
),
_
(
"Media Kit"
))
]
if
link_url
and
link_url
!=
"#"
]
...
...
@@ -191,6 +191,7 @@ def _footer_legal_links():
(
"terms_of_service_and_honor_code"
,
marketing_link
(
"TOS_AND_HONOR"
),
_
(
"Terms of Service & Honor Code"
)),
(
"privacy_policy"
,
marketing_link
(
"PRIVACY"
),
_
(
"Privacy Policy"
)),
(
"accessibility_policy"
,
marketing_link
(
"ACCESSIBILITY"
),
_
(
"Accessibility Policy"
)),
(
"sitemap"
,
marketing_link
(
"SITE_MAP"
),
_
(
"Sitemap"
)),
]
# Backwards compatibility: If a combined "terms of service and honor code"
...
...
lms/djangoapps/branding/tests/test_api.py
View file @
f1e75d03
# encoding: utf-8
"""Tests of Branding API """
from
__future__
import
unicode_literals
from
django.test
import
TestCase
import
mock
from
branding.api
import
get_logo_url
from
branding.api
import
get_logo_url
,
get_footer
class
TestHeader
(
TestCase
):
...
...
@@ -21,3 +22,70 @@ class TestHeader(TestCase):
logo_url
=
get_logo_url
()
self
.
assertEqual
(
logo_url
,
cdn_url
)
class
TestFooter
(
TestCase
):
"""Test retrieving the footer. """
@mock.patch.dict
(
'django.conf.settings.FEATURES'
,
{
'ENABLE_MKTG_SITE'
:
True
})
@mock.patch.dict
(
'django.conf.settings.MKTG_URLS'
,
{
"ROOT"
:
"https://edx.org"
,
"ABOUT"
:
"/about-us"
,
"NEWS"
:
"/news-announcements"
,
"CONTACT"
:
"/contact"
,
"FAQ"
:
"/student-faq"
,
"BLOG"
:
"/edx-blog"
,
"DONATE"
:
"/donate"
,
"JOBS"
:
"/jobs"
,
"SITE_MAP"
:
"/sitemap"
,
"TOS_AND_HONOR"
:
"/edx-terms-service"
,
"PRIVACY"
:
"/edx-privacy-policy"
,
"ACCESSIBILITY"
:
"/accessibility"
,
"MEDIA_KIT"
:
"/media-kit"
})
def
test_get_footer
(
self
):
actual_footer
=
get_footer
(
is_secure
=
True
)
expected_footer
=
{
'copyright'
:
'
\xa9
\xe9
dX. All rights reserved except where noted. EdX, Open edX and the edX and Open'
' EdX logos are registered trademarks or trademarks of edX Inc.'
,
'navigation_links'
:
[
{
'url'
:
'https://edx.org/about-us'
,
'name'
:
'about'
,
'title'
:
'About'
},
{
'url'
:
'https://edx.org/edx-blog'
,
'name'
:
'blog'
,
'title'
:
'Blog'
},
{
'url'
:
'https://edx.org/news-announcements'
,
'name'
:
'news'
,
'title'
:
'News'
},
{
'url'
:
'https://support.example.com'
,
'name'
:
'help-center'
,
'title'
:
'Help Center'
},
{
'url'
:
'https://edx.org/contact'
,
'name'
:
'contact'
,
'title'
:
'Contact'
},
{
'url'
:
'https://edx.org/donate'
,
'name'
:
'donate'
,
'title'
:
'Donate'
},
{
'url'
:
'https://edx.org/media-kit'
,
'name'
:
'media_kit'
,
'title'
:
'Media Kit'
}
],
'legal_links'
:
[
{
'url'
:
'https://edx.org/edx-terms-service'
,
'name'
:
'terms_of_service_and_honor_code'
,
'title'
:
'Terms of Service & Honor Code'
},
{
'url'
:
'https://edx.org/edx-privacy-policy'
,
'name'
:
'privacy_policy'
,
'title'
:
'Privacy Policy'
},
{
'url'
:
'https://edx.org/accessibility'
,
'name'
:
'accessibility_policy'
,
'title'
:
'Accessibility Policy'
},
{
'url'
:
'https://edx.org/sitemap'
,
'name'
:
'sitemap'
,
'title'
:
'Sitemap'
}
],
'social_links'
:
[
{
'url'
:
'#'
,
'action'
:
'Like
\xe9
dX on Facebook'
,
'name'
:
'facebook'
,
'icon-class'
:
'fa-facebook-square'
,
'title'
:
'Facebook'
},
{
'url'
:
'#'
,
'action'
:
'Follow
\xe9
dX on Twitter'
,
'name'
:
'twitter'
,
'icon-class'
:
'fa-twitter'
,
'title'
:
'Twitter'
},
{
'url'
:
'#'
,
'action'
:
'Subscribe to the
\xe9
dX YouTube channel'
,
'name'
:
'youtube'
,
'icon-class'
:
'fa-youtube'
,
'title'
:
'Youtube'
},
{
'url'
:
'#'
,
'action'
:
'Follow
\xe9
dX on LinkedIn'
,
'name'
:
'linkedin'
,
'icon-class'
:
'fa-linkedin-square'
,
'title'
:
'LinkedIn'
},
{
'url'
:
'#'
,
'action'
:
'Follow
\xe9
dX on Google+'
,
'name'
:
'google_plus'
,
'icon-class'
:
'fa-google-plus-square'
,
'title'
:
'Google+'
},
{
'url'
:
'#'
,
'action'
:
'Subscribe to the
\xe9
dX subreddit'
,
'name'
:
'reddit'
,
'icon-class'
:
'fa-reddit'
,
'title'
:
'Reddit'
}
],
'mobile_links'
:
[],
'logo_image'
:
'https://edx.org/static/images/logo.png'
,
'openedx_link'
:
{
'url'
:
'http://open.edx.org'
,
'image'
:
'https://files.edx.org/openedx-logos/edx-openedx-logo-tag.png'
,
'title'
:
'Powered by Open edX'
}
}
self
.
assertEqual
(
actual_footer
,
expected_footer
)
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