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
d13dbbf9
Commit
d13dbbf9
authored
Sep 16, 2013
by
Giulio Gratta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conditional changes for carnegie theme
parent
537d128c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
87 deletions
+105
-87
lms/templates/courseware/course_about.html
+84
-75
lms/templates/index.html
+1
-0
lms/templates/main.html
+6
-0
lms/templates/navigation.html
+14
-12
No files found.
lms/templates/courseware/course_about.html
View file @
d13dbbf9
...
...
@@ -79,6 +79,9 @@
<a
href=
"#"
>
${get_course_about_section(course, "university")}
</a>
% endif
</h1>
% if self.carnegie_theme_enabled():
<br
/><h2>
learn to use this user-friendly technology from experts
</h2>
% endif
</hgroup>
<div
class=
"main-cta"
>
...
...
@@ -120,7 +123,11 @@
</header>
<section
class=
"container"
>
<section
class=
"details"
>
% if self.carnegie_theme_enabled():
<section
class=
"details"
style=
"float: none; width: 100%; margin: 0 auto;"
>
% else:
<section
class=
"details"
>
% endif
<nav>
<a
href=
"#"
class=
"active"
>
${_("Overview")}
</a>
##
<a
href=
"#"
>
${_("FAQ")}
</a>
...
...
@@ -135,81 +142,83 @@
</div>
</section>
<section
class=
"course-sidebar"
>
<section
class=
"course-summary"
>
<header>
<div
class=
"social-sharing"
>
<div
class=
"sharing-message"
>
${_("Share with friends and family!")}
</div>
## TODO: this should probably be an overrideable block,
## or something allowing themes to do whatever they
## want here (and on this whole page, really).
% if self.stanford_theme_enabled():
<a
href=
"http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}!+(http://class.stanford.edu)"
class=
"share"
>
<img
src=
"${static.url('images/social/twitter-sharing.png')}"
>
</a>
<a
href=
"mailto:?subject=Take%20a%20course%20at%20Stanford%20online!&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}+(http://class.stanford.edu)"
class=
"share"
>
<img
src=
"${static.url('images/social/email-sharing.png')}"
>
</a>
% else:
<a
href=
"http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}+through+@edxonline:+http://www.edx.org${reverse('about_course', args=[course.id])}"
class=
"share"
>
<img
src=
"${static.url('images/social/twitter-sharing.png')}"
>
</a>
<a
href=
"http://www.facebook.com/EdxOnline"
class=
"share"
>
<img
src=
"${static.url('images/social/facebook-sharing.png')}"
>
</a>
<a
href=
"mailto:?subject=Take%20a%20course%20with%20edX%20online&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}%20through%20edX:+http://edx.org/${reverse('about_course', args=[course.id])}"
class=
"share"
>
<img
src=
"${static.url('images/social/email-sharing.png')}"
>
</a>
% endif
</div>
</header>
<ol
class=
"important-dates"
>
<li><div
class=
"icon course-number"
></div><p>
${_("Course Number")}
</p><span
class=
"course-number"
>
${course.display_number_with_default | h}
</span></li>
<li><div
class=
"icon start"
></div><p>
${_("Classes Start")}
</p><span
class=
"start-date"
>
${course.start_date_text}
</span></li>
## We plan to ditch end_date (which is not stored in course metadata),
## but for backwards compatibility, show about/end_date blob if it exists.
% if get_course_about_section(course, "end_date") or course.end:
<li>
<div
class=
"icon end"
></div>
<p>
${_("Classes End")}
</p><span
class=
"final-date"
>
% if get_course_about_section(course, "end_date"):
${get_course_about_section(course, "end_date")}
% else:
${course.end_date_text}
% endif
</span>
</li>
% endif
% if get_course_about_section(course, "effort"):
<li><div
class=
"icon effort"
></div><p>
${_("Estimated Effort")}
</p><span
class=
"start-date"
>
${get_course_about_section(course, "effort")}
</span></li>
% endif
##
<li><div
class=
"icon length"
></div><p>
${_('Course Length')}
</p><span
class=
"course-length"
>
${_('{number} weeks').format(number=15)}
</span></li>
% if get_course_about_section(course, "prerequisites"):
<li
class=
"prerequisites"
><div
class=
"icon prereq"
></div><p>
${_("Prerequisites")}
</p><span
class=
"start-date"
>
${get_course_about_section(course, "prerequisites")}
</span></li>
% endif
</ol>
% if not self.carnegie_theme_enabled():
<section
class=
"course-sidebar"
>
<section
class=
"course-summary"
>
<header>
<div
class=
"social-sharing"
>
<div
class=
"sharing-message"
>
${_("Share with friends and family!")}
</div>
## TODO: this should probably be an overrideable block,
## or something allowing themes to do whatever they
## want here (and on this whole page, really).
% if self.stanford_theme_enabled():
<a
href=
"http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}!+(http://class.stanford.edu)"
class=
"share"
>
<img
src=
"${static.url('images/social/twitter-sharing.png')}"
>
</a>
<a
href=
"mailto:?subject=Take%20a%20course%20at%20Stanford%20online!&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}+(http://class.stanford.edu)"
class=
"share"
>
<img
src=
"${static.url('images/social/email-sharing.png')}"
>
</a>
% else:
<a
href=
"http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}+through+@edxonline:+http://www.edx.org${reverse('about_course', args=[course.id])}"
class=
"share"
>
<img
src=
"${static.url('images/social/twitter-sharing.png')}"
>
</a>
<a
href=
"http://www.facebook.com/EdxOnline"
class=
"share"
>
<img
src=
"${static.url('images/social/facebook-sharing.png')}"
>
</a>
<a
href=
"mailto:?subject=Take%20a%20course%20with%20edX%20online&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}%20through%20edX:+http://edx.org/${reverse('about_course', args=[course.id])}"
class=
"share"
>
<img
src=
"${static.url('images/social/email-sharing.png')}"
>
</a>
% endif
</div>
</header>
<ol
class=
"important-dates"
>
<li><div
class=
"icon course-number"
></div><p>
${_("Course Number")}
</p><span
class=
"course-number"
>
${course.display_number_with_default | h}
</span></li>
<li><div
class=
"icon start"
></div><p>
${_("Classes Start")}
</p><span
class=
"start-date"
>
${course.start_date_text}
</span></li>
## We plan to ditch end_date (which is not stored in course metadata),
## but for backwards compatibility, show about/end_date blob if it exists.
% if get_course_about_section(course, "end_date") or course.end:
<li>
<div
class=
"icon end"
></div>
<p>
${_("Classes End")}
</p><span
class=
"final-date"
>
% if get_course_about_section(course, "end_date"):
${get_course_about_section(course, "end_date")}
% else:
${course.end_date_text}
% endif
</span>
</li>
% endif
% if get_course_about_section(course, "effort"):
<li><div
class=
"icon effort"
></div><p>
${_("Estimated Effort")}
</p><span
class=
"start-date"
>
${get_course_about_section(course, "effort")}
</span></li>
% endif
##
<li><div
class=
"icon length"
></div><p>
${_('Course Length')}
</p><span
class=
"course-length"
>
${_('{number} weeks').format(number=15)}
</span></li>
% if get_course_about_section(course, "prerequisites"):
<li
class=
"prerequisites"
><div
class=
"icon prereq"
></div><p>
${_("Prerequisites")}
</p><span
class=
"start-date"
>
${get_course_about_section(course, "prerequisites")}
</span></li>
% endif
</ol>
</section>
## For now, ocw links are the only thing that goes in additional resources
% if get_course_about_section(course, "ocw_links"):
<section
class=
"additional-resources"
>
<header>
<h1>
${_("Additional Resources")}
</h1>
</header>
<section>
## "MITOpenCourseware" should *not* be translated
<h2
class=
"opencourseware"
>
MITOpenCourseware
</h2>
${get_course_about_section(course, "ocw_links")}
</section>
</section>
%endif
</section>
## For now, ocw links are the only thing that goes in additional resources
% if get_course_about_section(course, "ocw_links"):
<section
class=
"additional-resources"
>
<header>
<h1>
${_("Additional Resources")}
</h1>
</header>
<section>
## "MITOpenCourseware" should *not* be translated
<h2
class=
"opencourseware"
>
MITOpenCourseware
</h2>
${get_course_about_section(course, "ocw_links")}
</section>
</section>
%endif
</section>
% endif
</section>
</section>
...
...
lms/templates/index.html
View file @
d13dbbf9
...
...
@@ -15,6 +15,7 @@
% else:
<h1>
${_("The Future of Online Education")}
</h1>
% endif
<h2>
${_("For anyone, anywhere, anytime")}
</h2>
</hgroup>
...
...
lms/templates/main.html
View file @
d13dbbf9
...
...
@@ -15,12 +15,18 @@
<
%
return
theme_enabled
()
and
getattr
(
settings
,
"
THEME_NAME
")
==
"
stanford
"
%
>
</
%
def>
<
%
def
name=
"carnegie_theme_enabled()"
>
<
%
return
theme_enabled
()
and
getattr
(
settings
,
"
THEME_NAME
")
==
"
carnegie
"
%
>
</
%
def>
<!DOCTYPE html>
<html
lang=
"en-us"
>
<head>
<
%
block
name=
"title"
>
% if stanford_theme_enabled():
<title>
${_("Home")} | class.stanford.edu
</title>
% elif carnegie_theme_enabled():
<title>
${_("Home")} | CLASlite
</title>
% else:
## "edX" should not be translated
<title>
edX
</title>
...
...
lms/templates/navigation.html
View file @
d13dbbf9
...
...
@@ -42,7 +42,7 @@ site_status_msg = get_site_status_msg(course_id)
<nav>
<h1
class=
"logo"
>
<a
href=
"
${marketing_link('ROOT')}
"
>
<a
href=
"
<%block name='navigation_link'>${marketing_link('ROOT')}</%block>
"
>
<
%
block
name=
"navigation_logo"
>
<img
src=
"${static.url(branding.get_logo_url(request.META.get('HTTP_HOST')))}"
alt=
"${_('{settings.PLATFORM_NAME} home')}"
/>
</
%
block>
...
...
@@ -95,17 +95,19 @@ site_status_msg = get_site_status_msg(course_id)
</li>
% endif
</
%
block>
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
% if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
<li
class=
"nav-global-04"
>
<a
class=
"cta cta-register"
href=
"${reverse('course-specific-register', args=[course.id])}"
>
${_("Register Now")}
</a>
</li>
% else:
<li
class=
"nav-global-04"
>
<a
class=
"cta cta-register"
href=
"/register"
>
${_("Register Now")}
</a>
</li>
% endif
% endif
<
%
block
name=
"register_link"
>
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
% if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
<li
class=
"nav-global-04"
>
<a
class=
"cta cta-register"
href=
"${reverse('course-specific-register', args=[course.id])}"
>
${_("Register Now")}
</a>
</li>
% else:
<li
class=
"nav-global-04"
>
<a
class=
"cta cta-register"
href=
"/register"
>
${_("Register Now")}
</a>
</li>
% endif
% endif
</
%
block>
</ol>
<ol
class=
"right nav-courseware"
>
...
...
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