using new template for "coming-soon"
This commit is contained in:
@@ -535,13 +535,13 @@ def course_about(request, course_id):
|
||||
@cache_if_anonymous
|
||||
def mktg_course_about(request, course_id):
|
||||
|
||||
coming_soon = False
|
||||
try:
|
||||
course = get_course_with_access(request.user, course_id, 'see_exists')
|
||||
except Http404 as e:
|
||||
# if a course does not exist yet, display a coming
|
||||
# soon button
|
||||
coming_soon = True
|
||||
return render_to_response('courseware/mktg_coming_soon.html',
|
||||
{'course_id': course_id})
|
||||
|
||||
registered = registered_for_course(course, request.user)
|
||||
|
||||
@@ -557,8 +557,7 @@ def mktg_course_about(request, course_id):
|
||||
{'course': course,
|
||||
'registered': registered,
|
||||
'course_target': course_target,
|
||||
'show_courseware_link': show_courseware_link,
|
||||
'coming_soon': coming_soon})
|
||||
'show_courseware_link': show_courseware_link})
|
||||
|
||||
|
||||
|
||||
|
||||
30
lms/templates/courseware/mktg_coming_soon.html
Normal file
30
lms/templates/courseware/mktg_coming_soon.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<%!
|
||||
from django.core.urlresolvers import reverse
|
||||
from courseware.courses import course_image_url, get_course_about_section
|
||||
from courseware.access import has_access
|
||||
%>
|
||||
<%namespace name='static' file='../static_content.html'/>
|
||||
|
||||
<%inherit file="../mktg_iframe.html" />
|
||||
|
||||
<%block name="title"><title>About ${course_id}</title></%block>
|
||||
|
||||
<%block name="bodyclass">view-partial-mktgregister</%block>
|
||||
|
||||
|
||||
<%block name="headextra">
|
||||
<%include file="../google_analytics.html" />
|
||||
</%block>
|
||||
|
||||
<%block name="content">
|
||||
|
||||
<script src="${static.url('js/course_info.js')}"></script>
|
||||
|
||||
|
||||
<ul class="list-actions register">
|
||||
<li class="item">
|
||||
<a class="action action-register is-registered" href="#">Coming Soon</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</%block>
|
||||
@@ -63,9 +63,6 @@
|
||||
|
||||
<ul class="list-actions register">
|
||||
<li class="item">
|
||||
%if coming_soon:
|
||||
<a class="action action-register is-registered" href="#">Coming Soon</a>
|
||||
%else:
|
||||
%if user.is_authenticated():
|
||||
%if registered:
|
||||
<!-- signed in, registered -->
|
||||
@@ -78,7 +75,6 @@
|
||||
<!-- not signed in -->
|
||||
<a class="action action-register is-not-signedin" href="${reverse('register_user')}">Register for <strong>${course.number}</strong></a>
|
||||
%endif
|
||||
%endif
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user