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
1cc776ff
Commit
1cc776ff
authored
Jun 10, 2015
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove V2 of the EdX.org footer
parent
2e9759ee
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
3 additions
and
393 deletions
+3
-393
common/static/js/utils/rwd_header.js
+0
-4
lms/djangoapps/branding/api.py
+0
-7
lms/djangoapps/branding/context_processors.py
+0
-10
lms/djangoapps/courseware/tests/test_footer.py
+2
-8
lms/envs/common.py
+0
-5
lms/static/sass/shared/_footer.scss
+0
-228
lms/templates/footer-edx-v2.html
+0
-120
lms/templates/main.html
+0
-5
lms/templates/main_django.html
+1
-6
No files found.
common/static/js/utils/rwd_header.js
View file @
1cc776ff
...
...
@@ -10,9 +10,6 @@
var
_fn
=
{
header
:
'header.global-new'
,
// TODO (ECOM-1339): Remove this once the V3 footer is enabled permanently
footer
:
'.edx-footer-new'
,
resultsUrl
:
'course-search'
,
init
:
function
()
{
...
...
@@ -30,7 +27,6 @@
classes
:
function
()
{
// Add any RWD-specific classes
_fn
.
$header
.
addClass
(
'rwd'
);
_fn
.
$footer
.
addClass
(
'rwd'
);
// TODO (ECOM-1339): remove once the V3 footer is enabled permanently
},
elements
:
function
()
{
...
...
lms/djangoapps/branding/api.py
View file @
1cc776ff
...
...
@@ -29,13 +29,6 @@ log = logging.getLogger("edx.footer")
def
is_enabled
():
"""Check whether the branding API is enabled. """
# TODO (ECOM-1339): Remove this comment
# Currently, the branding API configuration controls two things:
# 1) whether we're using the new version of the footer
# 2) whether we're exposing footer information through the API.
#
# Once we've enabled the new footer, the feature flag will control
# only (2), but not (1).
return
BrandingApiConfig
.
current
()
.
enabled
...
...
lms/djangoapps/branding/context_processors.py
deleted
100644 → 0
View file @
2e9759ee
"""Context processors for Django templates. """
from
branding
import
api
as
branding_api
# TODO (ECOM-1339): Remove this module once we permanently enable the V3 footer.
def
branding_context_processor
(
request
):
# pylint: disable=unused-argument
"""Add the feature flag to Django template context. """
return
{
"ENABLE_BRANDING_API"
:
branding_api
.
is_enabled
()
}
lms/djangoapps/courseware/tests/test_footer.py
View file @
1cc776ff
...
...
@@ -43,10 +43,7 @@ class TestFooter(TestCase):
with
patch
.
dict
(
'django.conf.settings.FEATURES'
,
{
"IS_EDX_DOMAIN"
:
True
}):
resp
=
self
.
client
.
get
(
'/'
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
# assert that footer template has been properly overridden on homepage
# test the top-level element class; which is less likely to change than copy.
self
.
assertContains
(
resp
,
'edx-footer'
)
self
.
assertContains
(
resp
,
'footer-edx-v3'
)
def
test_openedx_footer
(
self
):
"""
...
...
@@ -56,10 +53,7 @@ class TestFooter(TestCase):
with
patch
.
dict
(
'django.conf.settings.FEATURES'
,
{
"IS_EDX_DOMAIN"
:
False
}):
resp
=
self
.
client
.
get
(
'/'
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
# assert that footer template has been properly overridden on homepage
# test the top-level element class; which is less likely to change than copy.
self
.
assertContains
(
resp
,
'wrapper-footer'
)
self
.
assertContains
(
resp
,
'footer-openedx'
)
@patch.dict
(
settings
.
FEATURES
,
{
'IS_EDX_DOMAIN'
:
True
})
@override_settings
(
...
...
lms/envs/common.py
View file @
1cc776ff
...
...
@@ -515,11 +515,6 @@ TEMPLATE_CONTEXT_PROCESSORS = (
# Allows the open edX footer to be leveraged in Django Templates.
'edxmako.shortcuts.open_source_footer_context_processor'
,
# TODO (ECOM-1339): Remove once the V3 version of the footer is enabled permanently
# This allows us to pass the appropriate feature flag to the main Django template
# that contains the footer.
'branding.context_processors.branding_context_processor'
,
# Shoppingcart processor (detects if request.user has a cart)
'shoppingcart.context_processor.user_has_cart_context_processor'
,
...
...
lms/static/sass/shared/_footer.scss
View file @
1cc776ff
...
...
@@ -285,231 +285,3 @@ $edx-footer-bg-color: rgb(252,252,252);
}
}
}
// TODO (ECOM-1339): Remove the "new" (v2) footer once the v3 footer
// is permanently enabled.
.edx-footer-new
{
background
:
$edx-footer-bg-color
;
@media
print
{
@include
padding
(
10px
,
10px
,
0
,
10px
);
}
// NOTE: resetting older footer styles - can be removed once not needed
box-shadow
:
none
;
padding
:
(
$baseline
*
2
)
$baseline
;
// about
// --------------------
.footer-about
{
@extend
%edx-footer-reset
;
@extend
%edx-footer-section
;
width
:
flex-grid
(
6
,
12
);
@media
print
{
@include
margin-right
(
0
);
@include
padding-right
(
0
);
width
:
flex-grid
(
12
,
12
);
border
:
none
;
min-height
:
0
;
}
}
.footer-about-title
{
@extend
%edx-footer-title
;
@extend
%ui-print-excluded
;
}
.footer-about-logo
,
.footer-about-openedx
{
margin-bottom
:
$edx-footer-spacing
;
img
{
height
:
47px
;
}
a
{
display
:
block
;
&
:hover
{
border-bottom
:
0
;
}
}
}
.footer-about-logo
{
@include
float
(
left
);
@extend
%ui-print-excluded
;
}
.footer-about-openedx-logo
{
@include
float
(
right
);
@media
print
{
@include
float
(
left
);
}
}
.footer-about-copy
{
@extend
%t-copy-sub1
;
@extend
%ui-print-excluded
;
margin-bottom
:
$edx-footer-spacing
;
color
:
rgb
(
61
,
62
,
63
);
clear
:
both
;
p
{
// NOTE: needed for poor LMS span styling
color
:
inherit
;
}
}
.footer-about-copyright
{
@extend
%t-copy-sub1
;
margin-bottom
:
$edx-footer-spacing
;
color
:
rgb
(
138
,
140
,
143
);
p
{
// NOTE: needed for poor LMS span styling
color
:
inherit
;
}
a
{
@extend
%edx-footer-link
;
display
:
inline-block
;
margin-bottom
:
(
$edx-footer-spacing
/
2
);
}
@media
print
{
margin-bottom
:
0
;
}
}
.footer-about-links
{
@extend
%ui-print-excluded
;
a
{
@extend
%edx-footer-link
;
margin-bottom
:
(
$edx-footer-spacing
/
2
);
}
.note
{
color
:
rgb
(
138
,
140
,
143
);
}
}
// nav (learn more links)
// --------------------
.footer-nav
{
@extend
%edx-footer-reset
;
@extend
%edx-footer-section
;
@extend
%ui-print-excluded
;
width
:
flex-grid
(
3
,
12
);
}
.footer-nav-title
{
@extend
%edx-footer-title
;
margin-top
:
$baseline
;
}
.footer-nav-links
{
margin-bottom
:
(
$edx-footer-spacing
*
2
.25
);
a
{
@extend
%edx-footer-link
;
}
}
// follow (social media)
// --------------------
.footer-follow
{
@extend
%edx-footer-reset
;
@extend
%edx-footer-section
;
@extend
%ui-print-excluded
;
width
:
flex-grid
(
3
,
12
);
}
.footer-follow-title
{
@extend
%edx-footer-title
;
margin-top
:
$baseline
;
}
.footer-follow-links
{
a
{
@extend
%edx-footer-link
;
margin-top
:
$baseline
;
.icon
,
.copy
{
display
:
inline-block
;
vertical-align
:
middle
;
}
.icon
{
@extend
%t-icon3
;
margin-right
:
(
$baseline
/
4
);
text-align
:
center
;
min-width
:
(
$baseline
*
1
.5
);
}
.copy
{
// NOTE: needed for poor LMS span styling
color
:
inherit
;
}
}
}
&
.rwd
{
@include
box-sizing
(
border-box
);
@include
outer-container
;
&
.wrapper-footer
footer
{
min-width
:
0
;
}
.footer-about
,
.footer-nav
,
.footer-follow
{
@include
span-columns
(
12
);
}
@include
media
(
$edx-bp-medium
)
{
}
@include
media
(
$edx-bp-large
)
{
.footer-about
{
@include
span-columns
(
6
);
}
.footer-nav
,
.footer-follow
{
@include
span-columns
(
3
);
}
}
}
// App links
// --------------------
.footer-mobile-apps
{
padding-top
:
20px
;
.mobile-app-wrapper
{
margin
:
0
0
10px
0
;
}
a
{
display
:
inline-block
;
&
:hover
{
border
:
none
;
}
}
.app-store
{
height
:
auto
;
width
:
129px
;
}
.google-play
{
height
:
auto
;
width
:
129px
;
}
}
}
lms/templates/footer-edx-v2.html
deleted
100644 → 0
View file @
2e9759ee
## mako
## TODO (ECOM-1339): Delete this template once the V3 footer is enabled
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
## WARNING: These files are specific to edx.org and are not used in installations outside of that domain. Open edX users will want to use the file "footer.html" for any changes or overrides.
<div
class=
"wrapper wrapper-footer edx-footer edx-footer-new"
>
<footer
id=
"footer-global"
class=
"footer-global"
role=
"contentinfo"
aria-label=
"Footer"
>
<div
class=
"footer-about"
>
<h2
class=
"sr footer-about-title"
>
${_("About edX")}
</h2>
<div
class=
"footer-about-logo"
>
<img
alt=
"edX logo"
src=
"${static.url('images/edx-theme/edx-header-logo.png')}"
>
</div>
<div
class=
"footer-about-copy"
>
<p>
${_(
"{EdX} offers interactive online classes and MOOCs from the world's best universities. "
"Online courses from {MITx}, {HarvardX}, {BerkeleyX}, {UTx} and many other universities. "
"Topics include biology, business, chemistry, computer science, economics, finance, "
"electronics, engineering, food and nutrition, history, humanities, law, literature, "
"math, medicine, music, philosophy, physics, science, statistics and more. {EdX} is a "
"non-profit online initiative created by founding partners {Harvard} and {MIT}."
).format(
EdX="EdX", Harvard="Harvard", MIT="MIT", HarvardX="HarvardX", MITx="MITx",
BerkeleyX="BerkeleyX", UTx="UTx"
)}
</p>
</div>
<div
class=
"footer-about-copyright"
>
## Using "edX Inc." explicitly here for copyright purposes (settings.PLATFORM_NAME is just "edX", and this footer is only used on edx.org)
<p>
©
${settings.COPYRIGHT_YEAR} edX Inc.
</p>
## Site operators: Please do not remove this paragraph! This attributes back to edX and makes your acknowledgement of edX's trademarks clear.
<p>
## Translators: 'EdX', 'edX', and 'Open edX' are trademarks of 'edX Inc.'. Please do not translate any of these trademarks and company names.
${_("EdX, Open edX, and the edX and Open edX logos are registered trademarks or trademarks of {link_start}edX Inc.{link_end}").format(
link_start=u"
<a
href=
'https://www.edx.org/'
><span
class=
'copy'
>
",
link_end=u"
</span></a>
"
)}
</p>
</div>
<div
class=
"footer-about-openedx"
>
<a
href=
"http://open.edx.org"
title=
"${_("
Powered
by
Open
edX
")}"
>
<img
alt=
"${_("
Powered
by
Open
edX
")}"
src=
"https://files.edx.org/openedx-logos/edx-openedx-logo-tag.png"
>
</a>
</div>
<div
class=
"footer-about-links"
>
<a
href=
"${marketing_link('TOS_AND_HONOR')}"
><span
class=
"copy"
>
${_("Terms of Service and Honor Code")}
</span></a>
<a
href=
"${marketing_link('PRIVACY')}"
><span
class=
"copy"
>
${_("Privacy Policy")}
</span>
<span
class=
"note"
>
## Translators: {date} will be an abbreviated date, indicating when the privacy policy was most recently revised.
${_("(Revised {date})").format(
## Translators: 10/22/2014 is a US-style date representing October 22, 2014. Please convert to use your local date system.
date=_("10/22/2014")
)}
</span></a>
</div>
</div>
<nav
class=
"footer-nav"
role=
"navigation"
aria-label=
"About edX"
>
<h2
class=
"footer-nav-title"
>
${_("About edX")}
</h2>
<div
class=
"footer-nav-links"
>
<a
href=
"${marketing_link('ABOUT')}"
><span
class=
"copy"
>
${_("About")}
</span></a>
<a
href=
"${marketing_link('NEWS')}"
><span
class=
"copy"
>
${_("News")}
</span></a>
<a
href=
"${marketing_link('CONTACT')}"
><span
class=
"copy"
>
${_("Contact")}
</span></a>
<a
href=
"${marketing_link('FAQ')}"
><span
class=
"copy"
>
${_("FAQ")}
</span></a>
<a
href=
"${marketing_link('BLOG')}"
><span
class=
"copy"
>
${_("edX Blog")}
</span></a>
<a
href=
"${marketing_link('DONATE')}"
><span
class=
"copy"
>
${_("Donate to edX")}
</span></a>
<a
href=
"${marketing_link('JOBS')}"
><span
class=
"copy"
>
${_("Jobs at edX")}
</span></a>
</div>
</nav>
<div
class=
"footer-follow"
>
<h2
class=
"footer-follow-title"
>
${_("Follow Us")}
</h2>
<div
class=
"footer-follow-links"
>
% for social_name in settings.SOCIAL_MEDIA_FOOTER_NAMES:
<
%
social_url
,
social_title
,
social_icon =
(
settings
.
SOCIAL_MEDIA_FOOTER_URLS
.
get
(
social_name
,
"#"),
unicode
(
settings
.
SOCIAL_MEDIA_FOOTER_DISPLAY
.
get
(
social_name
,
{}).
get
("
title
",
"")),
settings
.
SOCIAL_MEDIA_FOOTER_DISPLAY
.
get
(
social_name
).
get
("
icon
",
"")
)
%
>
<a
href=
"${social_url}"
title=
"${social_title}"
rel=
"noreferrer"
>
<i
class=
"icon fa ${social_icon} element-invisible"
></i>
<span
class=
"copy"
>
${social_title}
</span>
</a>
% endfor
</div>
% if settings.FEATURES.get('ENABLE_FOOTER_MOBILE_APP_LINKS'):
<div
class=
"footer-mobile-apps"
>
<h2
class=
"footer-nav-title"
>
${_("Mobile Apps")}
</h2>
<div
class=
"mobile-app-wrapper"
>
<a
href=
"${settings.MOBILE_STORE_URLS.get('apple', '#')}"
>
<img
class=
"app-store"
alt=
"${_("
Apple
app
on
Apple
Store
")}"
src=
"${static.url('images/app/app_store_badge_135x40.svg')}"
>
</a>
</div>
<div
class=
"mobile-app-wrapper"
>
<a
href=
"${settings.MOBILE_STORE_URLS.get('google', '#')}"
>
<img
class=
"google-play"
alt=
"${_("
Android
app
on
Google
Play
")}"
src=
"${static.url('images/app/google_play_badge_45.png')}"
>
</a>
</div>
</div>
% endif
</div>
</footer>
</div>
<script
type=
"text/javascript"
src=
"/static/js/vendor/noreferrer.js"
charset=
"utf-8"
></script>
lms/templates/main.html
View file @
1cc776ff
...
...
@@ -149,12 +149,7 @@ from branding import api as branding_api
% if theme_enabled() and not is_microsite():
<
%
include
file=
"theme-footer.html"
/>
% elif settings.FEATURES.get('IS_EDX_DOMAIN', False) and not is_microsite():
## TODO (ECOM-1339): Remove this check to permanently enable the V3 footer.
% if branding_api.is_enabled():
<
%
include
file=
"footer-edx-v3.html"
/>
% else:
<
%
include
file=
"footer-edx-v2.html"
/>
% endif
% else:
<
%
include
file=
"${microsite.get_template_path('footer.html')}"
/>
% endif
...
...
lms/templates/main_django.html
View file @
1cc776ff
...
...
@@ -42,12 +42,7 @@
{% if IS_REQUEST_IN_MICROSITE %}
{# For now we don't support overriden Django templates in microsites. Leave footer blank for now which is better than saying Edx.#}
{% elif IS_EDX_DOMAIN %}
{# TODO (ECOM-1339): Remove this check once we switch to the v3 footer permanently. #}
{% if ENABLE_BRANDING_API %}
{% include "footer-edx-v3.html" %}
{% else %}
{% include "footer-edx-v2.html" %}
{% endif %}
{% include "footer-edx-v3.html" %}
{% else %}
{% include "footer.html" %}
{% endif %}
...
...
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