Commit f59347ef by Jason Bau

convert themed templates to includes/forks

parent 67801d5c
......@@ -408,11 +408,6 @@ def register_user(request, extra_context=None):
overrides['selected_provider'] = current_provider.NAME
context.update(overrides)
try:
if settings.FEATURES["USE_CUSTOM_THEME"]:
return render_to_response("theme-register.html", context)
except TopLevelLookupException:
pass
return render_to_response('register.html', context)
......@@ -564,11 +559,6 @@ def dashboard(request):
context['duplicate_provider'] = pipeline.get_duplicate_provider(messages.get_messages(request))
context['provider_user_states'] = pipeline.get_provider_user_states(user)
try:
if settings.FEATURES["USE_CUSTOM_THEME"]:
return render_to_response("theme-dashboard.html", context)
except TopLevelLookupException:
pass
return render_to_response('dashboard.html', context)
......
......@@ -487,11 +487,6 @@ def course_info(request, course_id):
'reverifications': reverifications,
}
try:
if settings.FEATURES["USE_CUSTOM_THEME"]:
return render_to_response("courseware/theme-info.html", context)
except TopLevelLookupException:
pass
return render_to_response('courseware/info.html', context)
......@@ -624,11 +619,6 @@ def course_about(request, course_id):
'is_course_full': is_course_full
}
try:
if settings.FEATURES["USE_CUSTOM_THEME"]:
return render_to_response("courseware/theme-course_about.html", context)
except TopLevelLookupException:
pass
return render_to_response('courseware/course_about.html', context)
......
......@@ -356,6 +356,7 @@
<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>
<%include file="theme-course_about_research.html" />
</section>
......
......@@ -38,6 +38,7 @@ $(document).ready(function(){
% endif
<h1>${_("Course Updates &amp; News")}</h1>
<%include file="theme-info_research.html" />
${get_course_info_section(request, course, 'updates')}
</section>
<section aria-label="Handout Navigation" class="handouts">
......
......@@ -23,13 +23,6 @@
<%block name="js_extra">
<script type="text/javascript">
(function() {
$(".email-settings").click(function(event) {
$("#email_settings_course_id").val( $(event.target).data("course-id") );
$("#email_settings_course_number").text( $(event.target).data("course-number") );
if($(event.target).data("optout") == "False") {
$("#receive_emails").prop('checked', true);
}
});
$('.message.is-expandable .wrapper-tip').bind('click', toggleExpandMessage);
......@@ -294,6 +287,7 @@
</ul>
</section>
<%include file='theme-dashboard-research.html' />
</section>
<section class="my-courses" id="my-courses">
......
......@@ -15,8 +15,7 @@
<%! from third_party_auth import pipeline, provider %>
<%! import calendar %>
<%block name="pagetitle">${_("Register for {platform_name}").format(platform_name=platform_name)}</%block>
<%block name="pagetitle">${_("Create your {platform_name} learning and research account!").format(platform_name=platform_name)}</%block>
<%block name="bodyclass">view-register</%block>
<%block name="js_extra">
......@@ -95,8 +94,8 @@
<section class="introduction">
<header>
<h1 class="title">
<span class="title-super">${_("Welcome!")}</span>
<span class="title-sub">${_("Register below to create your {platform_name} account").format(platform_name=platform_name)}</span>
<span class="title-super">${_("Welcome to the {platform_name} Learning and Research Community").format(platform_name=platform_name)}</span>
<span class="title-sub">${_("Create your account")}</span>
</h1>
</header>
</section>
......@@ -193,7 +192,7 @@
<input id="name" type="text" name="name" value="${name}" placeholder="${_('example: Jane Doe')}" required aria-required="true" aria-describedby="name-tip" />
<span class="tip tip-input" id="name-tip">
% if self.stanford_theme_enabled():
${_("Needed for any Statements of Accomplishment you may earn <strong>(cannot be changed later)</strong>")}
${_("Needed for any Statements of Accomplishment you may earn")}
% else:
${_("Needed for any certificates you may earn <strong>(cannot be changed later)</strong>")}
% endif
......@@ -325,6 +324,8 @@
</ol>
</div>
<%include file='theme-register-research.html' />
<div class="group group-form group-form-accountacknowledgements">
<h2 class="sr">${_("Account Acknowledgements")}</h2>
......@@ -347,7 +348,7 @@
<input id="honorcode-yes" type="checkbox" name="honor_code" value="true" />
<%
## TODO: provide a better way to override these links
if self.theme_enabled():
if self.stanford_theme_enabled():
honor_code_path = marketing_link('TOS') + "#honor"
else:
honor_code_path = marketing_link('HONOR')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment