diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index a7a389359e..effbbe11e4 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -148,10 +148,6 @@ def embargo(_request): return render_to_response("static_templates/embargo.html") -def press(request): - return render_to_response('static_templates/press.html') - - def process_survey_link(survey_link, user): """ If {UNIQUE_ID} appears in the link, replace it with a unique id for the user. diff --git a/common/djangoapps/third_party_auth/tests/specs/base.py b/common/djangoapps/third_party_auth/tests/specs/base.py index 3135032975..4eb40fff3d 100644 --- a/common/djangoapps/third_party_auth/tests/specs/base.py +++ b/common/djangoapps/third_party_auth/tests/specs/base.py @@ -123,8 +123,8 @@ class IntegrationTest(testutil.TestCase, test.TestCase): assert_duplicate_presence_fn = self.assertIn if duplicate else self.assertNotIn self.assertEqual(200, response.status_code) - self.assertIn(user.email, response.content) - self.assertIn(user.username, response.content) + self.assertIn(user.email, response.content.decode('UTF-8')) + self.assertIn(user.username, response.content.decode('UTF-8')) assert_duplicate_presence_fn(duplicate_account_error_needle, response.content) if linked is not None: diff --git a/lms/djangoapps/courseware/features/homepage.feature b/lms/djangoapps/courseware/features/homepage.feature index c4df77842d..c66d06694a 100644 --- a/lms/djangoapps/courseware/features/homepage.feature +++ b/lms/djangoapps/courseware/features/homepage.feature @@ -20,4 +20,4 @@ Feature: LMS.Homepage for web users | jobs | Jobs | | faq | FAQ | | contact | Contact| - | press | Press | + | press | News | diff --git a/lms/djangoapps/courseware/features/homepage.py b/lms/djangoapps/courseware/features/homepage.py index fc5a249cba..3c17ed4f3c 100644 --- a/lms/djangoapps/courseware/features/homepage.py +++ b/lms/djangoapps/courseware/features/homepage.py @@ -2,7 +2,7 @@ # pylint: disable=W0621 from lettuce import world, step -from nose.tools import assert_in, assert_equals # pylint: disable=E0611 +from nose.tools import assert_equals, assert_greater # pylint: disable=E0611 @step(u'I should see the following links and ids') @@ -11,5 +11,9 @@ def should_see_a_link_called(step): link_id = link_id_pair['id'] text = link_id_pair['Link'] link = world.browser.find_by_id(link_id) - assert len(link) > 0 + assert_greater( + len(link), + 0, + "Link length is less than 1. ID: {id} Text: {text}".format(id=link_id, text=text) + ) assert_equals(link.text, text) diff --git a/lms/djangoapps/courseware/tests/test_footer.py b/lms/djangoapps/courseware/tests/test_footer.py index 25d7d2f453..1d1a705f8d 100644 --- a/lms/djangoapps/courseware/tests/test_footer.py +++ b/lms/djangoapps/courseware/tests/test_footer.py @@ -18,8 +18,9 @@ class TestFooter(TestCase): resp = self.client.get('/') self.assertEqual(resp.status_code, 200) - # assert that footer template has been properly overriden on homepage - self.assertContains(resp, 'EdX is a non-profit created by founding partners Harvard and MIT') + # 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') @override_settings(SITE_NAME="example.com") def test_openedx_footer(self): @@ -31,5 +32,6 @@ class TestFooter(TestCase): resp = self.client.get('/') self.assertEqual(resp.status_code, 200) - # assert that footer template has been properly overriden on homepage - self.assertContains(resp, 'Powered by Open edX') + # 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') diff --git a/lms/djangoapps/dashboard/tests/test_sysadmin.py b/lms/djangoapps/dashboard/tests/test_sysadmin.py index 091f452553..f4c802b059 100644 --- a/lms/djangoapps/dashboard/tests/test_sysadmin.py +++ b/lms/djangoapps/dashboard/tests/test_sysadmin.py @@ -538,8 +538,7 @@ class TestSysAdminMongoCourseImport(SysadminBaseTestCase): with (override_settings(TIME_ZONE=timezone)): date_text = get_time_display(date, tz_format, settings.TIME_ZONE) response = self.client.get(reverse('gitlogs')) - - self.assertIn(date_text, response.content) + self.assertIn(date_text, response.content.decode('UTF-8')) self._rm_edx4edx() diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index 7f63fe6b71..cfb6205e71 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -758,7 +758,7 @@ class CSVReportViewsTest(ModuleStoreTestCase): self.assertEqual(template, 'shoppingcart/download_report.html') self.assertFalse(context['total_count_error']) self.assertFalse(context['date_fmt_error']) - self.assertIn(_("Download CSV Reports"), response.content) + self.assertIn(_("Download CSV Reports"), response.content.decode('UTF-8')) @patch('shoppingcart.views.render_to_response', render_mock) def test_report_csv_bad_date(self): @@ -771,7 +771,7 @@ class CSVReportViewsTest(ModuleStoreTestCase): self.assertFalse(context['total_count_error']) self.assertTrue(context['date_fmt_error']) self.assertIn(_("There was an error in your date input. It should be formatted as YYYY-MM-DD"), - response.content) + response.content.decode('UTF-8')) CORRECT_CSV_NO_DATE_ITEMIZED_PURCHASE = ",1,purchased,1,40,40,usd,Registration for Course: Robot Super Course," diff --git a/lms/envs/common.py b/lms/envs/common.py index e22692d2b1..0ca6bd2ffb 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -41,8 +41,14 @@ from lms.lib.xblock.mixin import LmsBlockMixin # The display name of the platform to be used in templates/emails/etc. PLATFORM_NAME = "Your Platform Name Here" CC_MERCHANT_NAME = PLATFORM_NAME -PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount" + PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount" +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 ENABLE_JASMINE = False @@ -264,6 +270,10 @@ FEATURES = { # Default to false here b/c dev environments won't have the api, will override in aws.py 'ENABLE_ANALYTICS_ACTIVE_COUNT': False, + # TODO: ECOM-136 remove this feature flag when new styles are available on main site.for + # Enable the new edX footer to be rendered. Defaults to false. + 'ENABLE_NEW_EDX_FOOTER': False, + # TODO: ECOM-136 # Enables the new navigation template and styles. This should be enabled # when the styles appropriately match the edX.org website. @@ -1381,7 +1391,10 @@ MKTG_URL_LINK_MAP = { 'HONOR': 'honor', 'PRIVACY': 'privacy_edx', 'JOBS': 'jobs', + 'NEWS': 'news', 'PRESS': 'press', + 'BLOG': 'edx-blog', + 'DONATE': 'donate', # Verified Certificates 'WHAT_IS_VERIFIED_CERT': 'verified-certificate', diff --git a/lms/static/images/footer-seal.png b/lms/static/images/footer-seal.png new file mode 100644 index 0000000000..7a5544a4cb Binary files /dev/null and b/lms/static/images/footer-seal.png differ diff --git a/lms/static/sass/base/_variables.scss b/lms/static/sass/base/_variables.scss index ad610a5135..870162e6ed 100644 --- a/lms/static/sass/base/_variables.scss +++ b/lms/static/sass/base/_variables.scss @@ -12,6 +12,15 @@ $fg-max-columns: 12; $fg-max-width: 1400px; $fg-min-width: 810px; +// Card Sizes +// breakpoints for course cards +$bp-xl-min: 1180px; +$bp-l-min: 980px; +$bp-m-min: 768px; +$bp-s-min: 320px; +$bp-s-max: 320px; +$bp-m-max: 768px; + // ==================== // FONTS diff --git a/lms/static/sass/shared/_footer.scss b/lms/static/sass/shared/_footer.scss index 49428868a8..b03f6eee38 100644 --- a/lms/static/sass/shared/_footer.scss +++ b/lms/static/sass/shared/_footer.scss @@ -1,3 +1,305 @@ +//--------------------------------- +// edX.org specific footer styles. +//--------------------------------- + +.region-footer { + border: 1px solid #f1f1f1; + padding-top: 16px; + background: none; + background-color: #fcfcfc; + .container { + background: none !important; + max-width: 1180px !important; + padding: 15px 20px; + width: calc(100% - 40px) !important; + } +} +.region-footer-columns { + padding: 0!important; + background: none; + border: none; + + > .region-container-inner { + width: 100%; + margin: auto; + border: none; + background: none; + } + + .region-footer-first { + width: 100% ; + float: none ; + + .region-inner { + padding-right: 10px; + } + + nav { + margin-bottom: 1em; + } + } + h2{ + color: #3f4041; + font-size: 13px; + font-weight: 600; + border-bottom: none; + } + ul.menu{ + padding: 0px; + margin-top: 1em; + li{ + list-style: none none; + color: #8a8c8f; + font-size: 14px; + float: none !important; + padding-top: 3px !important; + span{font-size: 0px; color: #fcfcfc;} + a{ + font-size: 14px; + color: #009ee7; + font-family: "Open Sans",Arial,Helvetica,sans-serif; + line-height: 24px; + span{font-size: 14px; font-weight: semibold;} + &.edx-bold{font-weight: 600;} + i{ + font-size: 24px; + width: 25px; + display: inline-block; + margin-right: 10px; + font-family: FontAwesome; + } + } + } + } + ul.menu li a.fa{ + line-height: 42px; + } + p.copyright{ + color: #8a8c8f !important; + } + + .region-footer-second { + width: 100% ; + float: none ; + nav { + margin-bottom: 1em; + width: 100%; + float: none; + padding-right: 0px; + padding-left: 0px; + border-left: none; + border-right: none; + margin-top: 30px; + } + .nav{ + clear: none; + } + + section.block-menu-social{ + width: 100%; + padding: 0px; + margin-top: 30px; + } + } + + .block-disclosure { + p{ + font-size: 14px; + font-weight: normal; + line-height: 21px; + color: #3d3e3f; + padding-right: 20px; + img{ + display: block; + padding: 15px 0px; + } + + } + + } + + .block-menu-business a { + color: #565656; + + &:hover { + color: #2F73BC; + } + } + + .block-menu-social { + a { + border: 0; + } + + ul.menu li { + margin: 0; + padding: 0; + float: right; + + .menu_icon { + display: block; + background-position: center top !important; + overflow: hidden; + text-indent: -9999px; + width: 45px; + margin: 0; + padding: 0 !important; + } + } + + li { + margin: 0; + padding: 0; + float: right; + } + } + + .block-menu-supplement { + + ul.menu li { + margin: 0; + padding: 0; + float: right; + + a:hover { + border-bottom: 1px dotted #2F73BC; + } + + span.separator { + padding: 0 10px; + } + } + + .block-menu-supplement li { + margin: 0; + padding: 0; + float: right; + + a:hover { + border-bottom: 1px dotted #2F73BC; + } + + span.separator { + padding: 0 10px; + } + } + } +} + +/* + * Smarthphone Portrait + */ + +@media only screen and ( min-width: $bp-s-min ) { + .region-footer { + background: none; + background-color: #fcfcfc; + } + .region-footer-columns { + .region-footer-first { + width: 100% ; + float: none ; + } + .region-footer-second { + width: 100% ; + float: none ; + nav{ + width: 100%; + padding-left: 0px; + padding-right: 0px; + border-left: none; + border-right: none; + margin-top: 30px; + } + section.block-menu-social{ + width: 100%; + padding: 0px; + margin-top: 30px; + } + } + ul.menu li a.fa{ + line-height: 42px; + } + } +} + + +/* + * Smartphone Landscape and up + */ +@media only screen and ( min-width: $bp-m-min ) { + .region-footer { + background: #fcfcfc url("../images/footer-seal.png") -310px 20px no-repeat; + } + .region-footer-columns { + .region-footer-first { + width: 50% ; + float: left ; + } + .region-footer-second { + width: 50% ; + float: left ; + nav{ + width: 43%; + padding-right: 20px; + padding-left: 25px; + border-left: 1px solid #e6e6e6; + border-right: 1px solid #e6e6e6; + margin-top: 15px; + float: left; + } + section.block-menu-social{ + width: 33%; + padding: 0px 15px 15px 20px; + margin-top: 15px; + float: left !important; + } + } + } +} + + +/* + * Tablet and up + */ +@media only screen and ( min-width: $bp-l-min ) { + .region-footer-columns { + .region-footer-second { + nav{ + width: 45%; + } + section.block-menu-social{ + width: 35%; + } + } + ul.menu li a.fa{ + line-height: 36px; + } + } +} + + +/* + * Desktops/laptops and up + */ +@media only screen and ( min-width: $bp-xl-min ) { + > .region-container-inner{margin:auto !important;} + .region-footer-columns { + .region-footer-second { + nav{ + width: 43%; + } + section.block-menu-social{ + width: 42%; + } + } + } +} + +//----------------------------------------- +// Open Source edX Footer Styling +//----------------------------------------- + .wrapper-footer { box-shadow: 0 -1px 5px 0 rgba(0,0,0, 0.1); border-top: 1px solid tint($m-gray,50%); diff --git a/lms/templates/edx_footer.html b/lms/templates/edx_footer.html index 606c689f5c..9ccbadf8d0 100644 --- a/lms/templates/edx_footer.html +++ b/lms/templates/edx_footer.html @@ -3,89 +3,78 @@ <%! from django.utils.translation import ugettext as _ %> <%namespace name='static' file='static_content.html'/> -