diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index a7a389359ede4f2d8db28311a6a34cadccbbba5a..effbbe11e4ec29397e4dafb72c00011d147e9022 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 313503297526bccc4675e6e78bbc564cfb896c5f..4eb40fff3d0d9df4959957f0983eea0cb6d23c38 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 c4df77842d6fc251e3f627d8fb500ac4784d6867..c66d06694aa757fb759d48471179d4763f4f3ff8 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 fc5a249cbaef1a7ee786e40518c6e2346ba79e2c..3c17ed4f3c8c54ff16fc685d5636a4f74c5147a8 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 25d7d2f453ca7b34565818ea70ded33c3af177fc..1d1a705f8d18a6635b05c34d8e4c29a16b7e8bea 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 091f4525531d7ebe37343d83bdf28f4378e7f958..f4c802b0597c6eb29dd60b81028a3a8b2cdfff22 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 7f63fe6b71a99a41a5dd93217580775ff0d61e3a..cfb6205e710bbdcdbd8213c299e069c5489dadc3 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 e22692d2b1b8b6fe388dfd48dde3c1151b879567..0ca6bd2ffbbb682a9526d38dfacea22ebe4373bc 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 0000000000000000000000000000000000000000..7a5544a4cbf01499b6376c57813ec28dfc65f9f8 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 ad610a5135fe4ed8a798a4961347a9b919d2ce93..870162e6edfa15bc1d04ae2d49607db3f307b8ac 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 49428868a808b613ce4781c80a7fcb3ef9b45086..b03f6eee387b008c8bd4b4cc37e86a889233ba7b 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 606c689f5cb6d4bab52ad72a8adbbb8ac7e28d73..9ccbadf8d017cd74c505e8143e4ed4a359056f39 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'/> -<div class="wrapper wrapper-footer edx-footer"> - <footer> - <div class="colophon"> - <nav class="nav-colophon"> - <ol> - <li class="nav-colophon-01"> - <a id="about" href="${marketing_link('ABOUT')}"> - ${_("About")} - </a> - </li> - <li class="nav-colophon-02"> - <a id="jobs" href="${marketing_link('JOBS')}"> - ${_("Jobs")} - </a> - </li> - <li class="nav-colophon-03"> - <a id="press" href="${marketing_link('PRESS')}"> - ${_("Press")} - </a> - </li> - <li class="nav-colophon-04"> - <a id="faq" href="${marketing_link('FAQ')}"> - ${_("FAQ")} - </a> - </li> - <li class="nav-colophon-05"> - <a id="contact" href="${marketing_link('CONTACT')}"> - ${_("Contact")} - </a> - </li> - </ol> - </nav> +<div class="edx-footer"> + <footer id="footer" class="clearfix region-footer" role="contentinfo"> + <div class="region-footer-columns region-container container"> + <div class="region-container-inner"> + <!-- regions: Footer first and Footer second --> + <div class="region region-footer-first"> + <div class="region-inner clearfix"> + <div class="region-container-inner"> + <div id="block-block-4" class="block block-block block-disclosure copy-detail no-title"> - <div class="colophon-about"> - <img src="${static.url('images/header-logo.png')}" alt="${_('edX Logo')}" /> + <p> + <img alt="edX" src="${static.url('images/header-logo.png')}">${_( + "{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> - <p>${_("{EdX} is a non-profit created by founding partners {Harvard} and {MIT} whose mission is to bring the best of higher education to students of all ages anywhere in the world, wherever there is Internet access. {EdX}'s free online MOOCs are interactive and subjects include computer science, public health, and artificial intelligence.").format(EdX="EdX", Harvard="Harvard", MIT="MIT")}</p> - </div> - </div> + ## Translators: The © symbol appears directly before this line. + <p class="copyright">© ${_("2014 edX, except where noted, all rights reserved.")}</p> - <div class="references"> - <nav class="nav-social"> - <ul> - <li class="nav-social-01"> - <a href="http://www.meetup.com/edX-Global-Community/" rel="external"> - <img src="${static.url('images/social/ico-social-meetup.png')}" alt="edX on Meetup" /> - </a> - </li> - <li class="nav-social-02"> - <a href="http://www.facebook.com/EdxOnline" rel="external"> - <img src="${static.url('images/social/ico-social-facebook.png')}" alt="edX on Facebook" /> - </a> - </li> - <li class="nav-social-03"> - <a href="https://twitter.com/edXOnline" rel="external"> - <img src="${static.url('images/social/ico-social-twitter.png')}" alt="edX on Twitter" /> - </a> - </li> - <li class="nav-social-04"> - <a href="https://plus.google.com/108235383044095082735/posts" rel="external"> - <img src="${static.url('images/social/ico-social-google.png')}" alt="edX on Google+" /> - </a> - </li> - <li class="nav-social-05"> - <a href="http://youtube.com/user/edxonline" rel="external"> - <img src="${static.url('images/social/ico-social-youtube.png')}" alt="edX on YouTube" /> - </a> - </li> - </ul> - </nav> - <p class="copyright">${_("© 2014 edX, some rights reserved.")}</p> + <ul class="menu"> + <li><a href="${marketing_link('TOS')}">${_("Terms of Service and Honor Code")}</a></li> + <li><a href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a></li> + </ul> + </div> + </div> + </div> + </div> + <div class="region region-footer-second"> + <div class="region-inner clearfix"> + <div class="region-container-inner"> + <nav id="block-menu-block-7" class="block block-menu-block" role="navigation"> + <h2 class="block-title">${_("About & Company Info")}</h2> - <nav class="nav-legal"> - <ul> - <li class="nav-legal-01"> - <a href="${marketing_link('TOS')}">${_("Terms of Service and Honor Code")}</a> - </li> - <li class="nav-legal-02"> - <a href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a> - </li> - </ul> - </nav> - </div> - </footer> + <div class="menu-block-wrapper menu-block-7 menu-name-menu-about-company-in-footer parent-mlid-0 menu-level-1"> + <ul class="menu clearfix"> + <li><a href="${marketing_link('ABOUT')}">${_("About")}</a></li> + <li><a href="${marketing_link('NEWS')}">${_("News")}</a></li> + <li><a href="${marketing_link('CONTACT')}">${_("Contact")}</a></li> + <li><span>-</span></li> + <li><a href="${marketing_link('FAQ')}">${_("FAQ")}</a></li> + <li><a href="${marketing_link('BLOG')}">${_("edX Blog")}</a></li> + <li><span>-</span></li> + <li><a href="${marketing_link('DONATE')}" class="edx-bold">${_("Donate to edX")}</a></li> + <li><a href="${marketing_link('JOBS')}" class="edx-bold">${_("Jobs at edX")}</a></li> + </ul> + </div> + + </nav> + <section id="block-menu-menu-social-menu" class="block block-menu nav block-menu-social" role="navigation"> + <h2 class="block-title">${_("Follow Us")}</h2> + + <ul class="menu clearfix"> + <li><a href="${settings.PLATFORM_TWITTER_URL}" title="Twitter"><i class="icon-twitter"></i>${_("Twitter")}</a></li> + <li><a href="${settings.PLATFORM_FACEBOOK_ACCOUNT}" title="Facebook"><i class="icon-facebook"></i>${_("Facebook")}</a></li> + <li><a href="${settings.PLATFORM_MEETUP_URL}" title="Meetup"><i class="icon-calendar"></i>${_("Meetup")}</a></li> + <li><a href="${settings.PLATFORM_LINKEDIN_URL}" title="LinkedIn"><i class="icon-linkedin"></i>${_("LinkedIn")}</a></li> + <li><a href="${settings.PLATFORM_GOOGLE_PLUS_URL}" title="Google+"><i class="icon-google-plus"></i>${_("Google+")}</a></li> + </ul> + </section> + </div> + </div> + </div> + </div> + </div> + </footer> </div> diff --git a/lms/templates/footer.html b/lms/templates/footer.html index 8f8391266a3b887f12869a1d8673e4011db21449..4f32bb282decc4f8202b1073410d6a63bee92f8d 100644 --- a/lms/templates/footer.html +++ b/lms/templates/footer.html @@ -20,8 +20,8 @@ </a> </li> <li class="nav-colophon-03"> - <a id="press" href="${marketing_link('PRESS')}"> - ${_("Press")} + <a id="press" href="${marketing_link('NEWS')}"> + ${_("News")} </a> </li> <li class="nav-colophon-04"> diff --git a/lms/templates/main.html b/lms/templates/main.html index e426937d3780e70a5391f6092fc843e0a7957fc4..844816e435a60562810927aca73665cabd3548d9 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -84,7 +84,10 @@ google_analytics_file = microsite.get_template_path('google_analytics.html') if getattr(settings, 'SITE_NAME', '').endswith('edx.org'): - footer_file = microsite.get_template_path('edx_footer.html') + if settings.FEATURES.get('ENABLE_NEW_EDX_FOOTER', False): + footer_file = microsite.get_template_path('edx_footer.html') + else: + footer_file = microsite.get_template_path('original_edx_footer.html') else: footer_file = microsite.get_template_path('footer.html') diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html index 03075917f5d0f4c31d5e662e2b8df2b2d93c29ec..bcaf320eae9527fb4053389c58615fb7d74e68db 100644 --- a/lms/templates/navigation.html +++ b/lms/templates/navigation.html @@ -36,7 +36,7 @@ site_status_msg = get_site_status_msg(course_id) % endif </%block> - <header class="global-new ${"slim" if course else ""}" aria-label="${_('Global Navigation')}"> + <header class="${"global slim" if course else "global-new"}" aria-label="${_('Global Navigation')}"> <nav> <h1 class="logo"> <a href="${marketing_link('ROOT')}"> diff --git a/lms/templates/original_edx_footer.html b/lms/templates/original_edx_footer.html new file mode 100644 index 0000000000000000000000000000000000000000..c733ad185df46a9f804ab8fa5294293f05dc92a8 --- /dev/null +++ b/lms/templates/original_edx_footer.html @@ -0,0 +1,96 @@ +## mako +<%! from django.core.urlresolvers import reverse %> +<%! from django.utils.translation import ugettext as _ %> +<%namespace name='static' file='static_content.html'/> + +<div class="wrapper wrapper-footer edx-footer"> + <footer> + <div class="colophon"> + <nav class="nav-colophon"> + <ol> + <li class="nav-colophon-01"> + <a id="about" href="${marketing_link('ABOUT')}"> + ${_("About")} + </a> + </li> + <li class="nav-colophon-02"> + <a id="jobs" href="${marketing_link('JOBS')}"> + ${_("Jobs")} + </a> + </li> + <li class="nav-colophon-03"> + <a id="press" href="${marketing_link('PRESS')}"> + ${_("Press")} + </a> + </li> + <li class="nav-colophon-04"> + <a id="faq" href="${marketing_link('FAQ')}"> + ${_("FAQ")} + </a> + </li> + <li class="nav-colophon-05"> + <a id="contact" href="${marketing_link('CONTACT')}"> + ${_("Contact")} + </a> + </li> + </ol> + </nav> + + <div class="colophon-about"> + <img src="${static.url('images/header-logo.png')}" alt="${_('edX Logo')}" /> + + <p> + ${_("{EdX} is a non-profit created by founding partners {Harvard} and {MIT} whose mission is to " + "bring the best of higher education to students of all ages anywhere in the world, wherever there is " + "Internet access. {EdX}'s free online MOOCs are interactive and subjects include computer science, public " + "health, and artificial intelligence.").format(EdX="EdX", Harvard="Harvard", MIT="MIT")} + </p> + </div> + </div> + + <div class="references"> + <nav class="nav-social"> + <ul> + <li class="nav-social-01"> + <a href="${settings.PLATFORM_MEETUP_URL}" rel="external"> + <img src="${static.url('images/social/ico-social-meetup.png')}" alt="edX on Meetup" /> + </a> + </li> + <li class="nav-social-02"> + <a href="${settings.PLATFORM_FACEBOOK_ACCOUNT}" rel="external"> + <img src="${static.url('images/social/ico-social-facebook.png')}" alt="edX on Facebook" /> + </a> + </li> + <li class="nav-social-03"> + <a href="${settings.PLATFORM_TWITTER_URL}" rel="external"> + <img src="${static.url('images/social/ico-social-twitter.png')}" alt="edX on Twitter" /> + </a> + </li> + <li class="nav-social-04"> + <a href="${settings.PLATFORM_GOOGLE_PLUS_URL}" rel="external"> + <img src="${static.url('images/social/ico-social-google.png')}" alt="edX on Google+" /> + </a> + </li> + <li class="nav-social-05"> + <a href="http://youtube.com/user/edxonline" rel="external"> + <img src="${static.url('images/social/ico-social-youtube.png')}" alt="edX on YouTube" /> + </a> + </li> + </ul> + </nav> + + <p class="copyright">${_("© 2014 edX, some rights reserved.")}</p> + + <nav class="nav-legal"> + <ul> + <li class="nav-legal-01"> + <a href="${marketing_link('TOS')}">${_("Terms of Service and Honor Code")}</a> + </li> + <li class="nav-legal-02"> + <a href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a> + </li> + </ul> + </nav> + </div> + </footer> +</div> \ No newline at end of file diff --git a/lms/templates/static_templates/blog.html b/lms/templates/static_templates/blog.html new file mode 100644 index 0000000000000000000000000000000000000000..5f7608ceb9c6abc83207a6b39d7ff46f3f0b97f0 --- /dev/null +++ b/lms/templates/static_templates/blog.html @@ -0,0 +1,9 @@ +<%! from django.utils.translation import ugettext as _ %> +<%inherit file="../main.html" /> + +<%block name="pagetitle">${_("Blog")}</%block> + +<section class="container about"> + <h1>${_("Blog")}</h1> + <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> +</section> diff --git a/lms/templates/static_templates/donate.html b/lms/templates/static_templates/donate.html new file mode 100644 index 0000000000000000000000000000000000000000..abf2ce107ef62c08b4dc25e02ca37a7ca18c1899 --- /dev/null +++ b/lms/templates/static_templates/donate.html @@ -0,0 +1,9 @@ +<%! from django.utils.translation import ugettext as _ %> +<%inherit file="../main.html" /> + +<%block name="pagetitle">${_("Donate")}</%block> + +<section class="container about"> + <h1>${_("Donate")}</h1> + <p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> +</section> diff --git a/lms/templates/static_templates/news.html b/lms/templates/static_templates/news.html new file mode 100644 index 0000000000000000000000000000000000000000..4790150dd0552e39f12cd52e4abee9f4f43e06e9 --- /dev/null +++ b/lms/templates/static_templates/news.html @@ -0,0 +1,10 @@ +<%! from django.utils.translation import ugettext as _ %> + +<%inherit file="../main.html" /> + +<%block name="pagetitle">${_("In the Press")}</%block> + +<section class="container about"> +<h1>${_("In the Press")}</h1> +<p>${_("This page left intentionally blank. It is not used by edx.org but is left here for possible use by installations of Open edX.")}</p> +</section> diff --git a/lms/urls.py b/lms/urls.py index f363bd2a74d413de1edf03eeb1d6496d24afabf1..f04a1cbbd9ee98ad76b33e3cb5c7a44c20b1ed5a 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -118,15 +118,24 @@ urlpatterns += (( # Semi-static views only used by edX, not by themes if not settings.FEATURES["USE_CUSTOM_THEME"]: urlpatterns += ( + url(r'^blog$', 'static_template_view.views.render', + {'template': 'blog.html'}, name="blog"), + url(r'^contact$', 'static_template_view.views.render', + {'template': 'contact.html'}, name="contact"), + url(r'^donate$', 'static_template_view.views.render', + {'template': 'donate.html'}, name="donate"), + url(r'^faq$', 'static_template_view.views.render', + {'template': 'faq.html'}, name="faq"), + url(r'^help$', 'static_template_view.views.render', + {'template': 'help.html'}, name="help_edx"), url(r'^jobs$', 'static_template_view.views.render', {'template': 'jobs.html'}, name="jobs"), - url(r'^press$', 'student.views.press', name="press"), + url(r'^news$', 'static_template_view.views.render', + {'template': 'news.html'}, name="news"), + url(r'^press$', 'static_template_view.views.render', + {'template': 'press.html'}, name="press"), url(r'^media-kit$', 'static_template_view.views.render', {'template': 'media-kit.html'}, name="media-kit"), - url(r'^faq$', 'static_template_view.views.render', - {'template': 'faq.html'}, name="faq_edx"), - url(r'^help$', 'static_template_view.views.render', - {'template': 'help.html'}, name="help_edx"), # TODO: (bridger) The copyright has been removed until it is updated for edX # url(r'^copyright$', 'static_template_view.views.render',