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
9b49059e
Commit
9b49059e
authored
Mar 17, 2015
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7383 from edx/will/ecom-1134
Update social media links in EdX footer.
parents
40ae5d2e
1529c1e9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
106 additions
and
39 deletions
+106
-39
lms/djangoapps/courseware/tests/test_footer.py
+21
-0
lms/envs/aws.py
+3
-5
lms/envs/common.py
+71
-5
lms/templates/footer-edx-new.html
+11
-29
No files found.
lms/djangoapps/courseware/tests/test_footer.py
View file @
9b49059e
...
@@ -5,11 +5,23 @@ edx.org uses an edx footer but other instances use an Open edX footer.
...
@@ -5,11 +5,23 @@ edx.org uses an edx footer but other instances use an Open edX footer.
from
mock
import
patch
from
mock
import
patch
from
django.conf
import
settings
from
django.test
import
TestCase
from
django.test
import
TestCase
class
TestFooter
(
TestCase
):
class
TestFooter
(
TestCase
):
SOCIAL_MEDIA_URLS
=
{
"facebook"
:
"http://www.facebook.com/"
,
"google_plus"
:
"https://plus.google.com/"
,
"twitter"
:
"https://twitter.com/"
,
"linkedin"
:
"http://www.linkedin.com/"
,
"tumblr"
:
"http://www.tumblr.com/"
,
"meetup"
:
"http://www.meetup.com/"
,
"reddit"
:
"http://www.reddit.com/"
,
"youtube"
:
"https://www.youtube.com/"
}
def
test_edx_footer
(
self
):
def
test_edx_footer
(
self
):
"""
"""
Verify that the homepage, when accessed at edx.org, has the edX footer
Verify that the homepage, when accessed at edx.org, has the edX footer
...
@@ -34,3 +46,12 @@ class TestFooter(TestCase):
...
@@ -34,3 +46,12 @@ class TestFooter(TestCase):
# assert that footer template has been properly overridden on homepage
# assert that footer template has been properly overridden on homepage
# test the top-level element class; which is less likely to change than copy.
# test the top-level element class; which is less likely to change than copy.
self
.
assertContains
(
resp
,
'wrapper-footer'
)
self
.
assertContains
(
resp
,
'wrapper-footer'
)
@patch.dict
(
settings
.
FEATURES
,
{
'IS_EDX_DOMAIN'
:
True
})
@override_settings
(
SOCIAL_MEDIA_FOOTER_URLS
=
SOCIAL_MEDIA_URLS
)
def
test_edx_footer_social_links
(
self
):
resp
=
self
.
client
.
get
(
'/'
)
for
name
,
url
in
self
.
SOCIAL_MEDIA_URLS
.
iteritems
():
self
.
assertContains
(
resp
,
url
)
self
.
assertContains
(
resp
,
settings
.
SOCIAL_MEDIA_FOOTER_DISPLAY
[
name
][
'title'
])
self
.
assertContains
(
resp
,
settings
.
SOCIAL_MEDIA_FOOTER_DISPLAY
[
name
][
'icon'
])
lms/envs/aws.py
View file @
9b49059e
...
@@ -135,11 +135,9 @@ PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', PLATFORM_NAME)
...
@@ -135,11 +135,9 @@ PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', PLATFORM_NAME)
# For displaying on the receipt. At Stanford PLATFORM_NAME != MERCHANT_NAME, but PLATFORM_NAME is a fine default
# For displaying on the receipt. At Stanford PLATFORM_NAME != MERCHANT_NAME, but PLATFORM_NAME is a fine default
PLATFORM_TWITTER_ACCOUNT
=
ENV_TOKENS
.
get
(
'PLATFORM_TWITTER_ACCOUNT'
,
PLATFORM_TWITTER_ACCOUNT
)
PLATFORM_TWITTER_ACCOUNT
=
ENV_TOKENS
.
get
(
'PLATFORM_TWITTER_ACCOUNT'
,
PLATFORM_TWITTER_ACCOUNT
)
PLATFORM_FACEBOOK_ACCOUNT
=
ENV_TOKENS
.
get
(
'PLATFORM_FACEBOOK_ACCOUNT'
,
PLATFORM_FACEBOOK_ACCOUNT
)
PLATFORM_FACEBOOK_ACCOUNT
=
ENV_TOKENS
.
get
(
'PLATFORM_FACEBOOK_ACCOUNT'
,
PLATFORM_FACEBOOK_ACCOUNT
)
# Used for social media links.
PLATFORM_TWITTER_URL
=
ENV_TOKENS
.
get
(
'PLATFORM_TWITTER_URL'
,
PLATFORM_TWITTER_URL
)
# Social media links for the page footer
PLATFORM_MEETUP_URL
=
ENV_TOKENS
.
get
(
'PLATFORM_MEETUP_URL'
,
PLATFORM_MEETUP_URL
)
SOCIAL_MEDIA_FOOTER_URLS
=
ENV_TOKENS
.
get
(
'SOCIAL_MEDIA_FOOTER_URLS'
,
SOCIAL_MEDIA_FOOTER_URLS
)
PLATFORM_LINKEDIN_URL
=
ENV_TOKENS
.
get
(
'PLATFORM_LINKEDIN_URL'
,
PLATFORM_LINKEDIN_URL
)
PLATFORM_GOOGLE_PLUS_URL
=
ENV_TOKENS
.
get
(
'PLATFORM_GOOGLE_PLUS_URL'
,
PLATFORM_GOOGLE_PLUS_URL
)
CC_MERCHANT_NAME
=
ENV_TOKENS
.
get
(
'CC_MERCHANT_NAME'
,
PLATFORM_NAME
)
CC_MERCHANT_NAME
=
ENV_TOKENS
.
get
(
'CC_MERCHANT_NAME'
,
PLATFORM_NAME
)
EMAIL_BACKEND
=
ENV_TOKENS
.
get
(
'EMAIL_BACKEND'
,
EMAIL_BACKEND
)
EMAIL_BACKEND
=
ENV_TOKENS
.
get
(
'EMAIL_BACKEND'
,
EMAIL_BACKEND
)
...
...
lms/envs/common.py
View file @
9b49059e
...
@@ -51,11 +51,6 @@ COPYRIGHT_YEAR = "2015"
...
@@ -51,11 +51,6 @@ COPYRIGHT_YEAR = "2015"
PLATFORM_FACEBOOK_ACCOUNT
=
"http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_FACEBOOK_ACCOUNT
=
"http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_TWITTER_ACCOUNT
=
"@YourPlatformTwitterAccount"
PLATFORM_TWITTER_ACCOUNT
=
"@YourPlatformTwitterAccount"
PLATFORM_TWITTER_URL
=
"https://twitter.com/YourPlatformTwitterAccount"
PLATFORM_MEETUP_URL
=
"http://www.meetup.com/YourMeetup"
PLATFORM_LINKEDIN_URL
=
"http://www.linkedin.com/company/YourPlatform"
PLATFORM_GOOGLE_PLUS_URL
=
"https://plus.google.com/YourGooglePlusAccount/"
COURSEWARE_ENABLED
=
True
COURSEWARE_ENABLED
=
True
ENABLE_JASMINE
=
False
ENABLE_JASMINE
=
False
...
@@ -1700,6 +1695,77 @@ MKTG_URL_LINK_MAP = {
...
@@ -1700,6 +1695,77 @@ MKTG_URL_LINK_MAP = {
'WHAT_IS_VERIFIED_CERT'
:
'verified-certificate'
,
'WHAT_IS_VERIFIED_CERT'
:
'verified-certificate'
,
}
}
################# Social Media Footer Links #######################
# The names list controls the order of social media
# links in the footer.
SOCIAL_MEDIA_FOOTER_NAMES
=
[
"facebook"
,
"twitter"
,
"linkedin"
,
"google_plus"
,
"tumblr"
,
"meetup"
,
"reddit"
,
"youtube"
,
]
# The footer URLs dictionary maps social footer names
# to URLs defined in configuration.
SOCIAL_MEDIA_FOOTER_URLS
=
{}
# The display dictionary defines the title
# and icon class for each social media link.
SOCIAL_MEDIA_FOOTER_DISPLAY
=
{
"facebook"
:
{
# Translators: This is the website name of www.facebook.com. Please
# translate this the way that Facebook advertises in your language.
"title"
:
_
(
"Facebook"
),
"icon"
:
"fa-facebook-square"
},
"twitter"
:
{
# Translators: This is the website name of www.twitter.com. Please
# translate this the way that Twitter advertises in your language.
"title"
:
_
(
"Twitter"
),
"icon"
:
"fa-twitter"
},
"linkedin"
:
{
# Translators: This is the website name of www.linkedin.com. Please
# translate this the way that LinkedIn advertises in your language.
"title"
:
_
(
"LinkedIn"
),
"icon"
:
"fa-linkedin-square"
},
"google_plus"
:
{
# Translators: This is the website name of plus.google.com. Please
# translate this the way that Google+ advertises in your language.
"title"
:
_
(
"Google+"
),
"icon"
:
"fa-google-plus-square"
},
"tumblr"
:
{
# Translators: This is the website name of www.tumblr.com. Please
# translate this the way that Tumblr advertises in your language.
"title"
:
_
(
"Tumblr"
),
"icon"
:
"fa-tumblr-square"
},
"meetup"
:
{
# Translators: This is the website name of www.meetup.com. Please
# translate this the way that MeetUp advertises in your language.
"title"
:
_
(
"Meetup"
),
"icon"
:
"fa-calendar"
},
"reddit"
:
{
# Translators: This is the website name of www.reddit.com. Please
# translate this the way that Reddit advertises in your language.
"title"
:
_
(
"Reddit"
),
"icon"
:
"fa-reddit-square"
},
"youtube"
:
{
# Translators: This is the website name of www.youtube.com. Please
# translate this the way that YouTube advertises in your language.
"title"
:
_
(
"Youtube"
),
"icon"
:
"fa-youtube-square"
}
}
################# Mobile URLS ##########################
################# Mobile URLS ##########################
# These are URLs to the app store for mobile.
# These are URLs to the app store for mobile.
...
...
lms/templates/footer-edx-new.html
View file @
9b49059e
...
@@ -74,36 +74,18 @@
...
@@ -74,36 +74,18 @@
<h2
class=
"footer-follow-title"
>
${_("Follow Us")}
</h2>
<h2
class=
"footer-follow-title"
>
${_("Follow Us")}
</h2>
<div
class=
"footer-follow-links"
>
<div
class=
"footer-follow-links"
>
## Translators: This is the website name of www.twitter.com. Please
% for social_name in settings.SOCIAL_MEDIA_FOOTER_NAMES:
## translate this the way that Twitter advertises in your language.
<
%
social_url
,
social_title
,
social_icon =
(
<a
href=
"${settings.PLATFORM_TWITTER_URL}"
title=
"${_("
Twitter
")}"
rel=
"noreferrer"
>
settings
.
SOCIAL_MEDIA_FOOTER_URLS
.
get
(
social_name
,
"#"),
<i
class=
"icon fa fa-twitter element-invisible"
></i>
unicode
(
settings
.
SOCIAL_MEDIA_FOOTER_DISPLAY
.
get
(
social_name
,
{}).
get
("
title
",
"")),
<span
class=
"copy"
>
${_("Twitter")}
</span>
settings
.
SOCIAL_MEDIA_FOOTER_DISPLAY
.
get
(
social_name
).
get
("
icon
",
"")
</a>
)
## Translators: This is the website name of www.facebook.com. Please
%
>
## translate this the way that Facebook advertises in your language.
<a
href=
"${social_url}"
title=
"${social_title}"
rel=
"noreferrer"
>
<a
href=
"${settings.PLATFORM_FACEBOOK_ACCOUNT}"
title=
"${_("
Facebook
")}"
rel=
"noreferrer"
>
<i
class=
"icon fa ${social_icon} element-invisible"
></i>
<i
class=
"icon fa fa-facebook element-invisible"
></i>
<span
class=
"copy"
>
${social_title}
</span>
<span
class=
"copy"
>
${_("Facebook")}
</span>
</a>
## Translators: This is the website name of www.meetup.com. Please
## translate this the way that Meetup advertises in your language.
<a
href=
"${settings.PLATFORM_MEETUP_URL}"
title=
"${_("
Meetup
")}"
rel=
"noreferrer"
>
<i
class=
"icon fa fa-calendar element-invisible"
></i>
<span
class=
"copy"
>
${_("Meetup")}
</span>
</a>
## Translators: This is the website name of www.linked.com. Please
## translate this the way that LinkedIn advertises in your language.
<a
href=
"${settings.PLATFORM_LINKEDIN_URL}"
title=
"${_("
LinkedIn
")}"
rel=
"noreferrer"
>
<i
class=
"icon fa fa-linkedin element-invisible"
></i>
<span
class=
"copy"
>
${_("LinkedIn")}
</span>
</a>
## Translators: This is the website name of plus.google.com. Please
## translate this the way that Google+ advertises in your language.
<a
href=
"${settings.PLATFORM_GOOGLE_PLUS_URL}"
title=
"${_("
Google
+")}"
rel=
"noreferrer"
>
<i
class=
"icon fa fa-google-plus element-invisible"
></i>
<span
class=
"copy"
>
${_("Google+")}
</span>
</a>
</a>
% endfor
</div>
</div>
% if settings.FEATURES.get('ENABLE_FOOTER_MOBILE_APP_LINKS'):
% if settings.FEATURES.get('ENABLE_FOOTER_MOBILE_APP_LINKS'):
...
...
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