Toggle new program progress page with waffle switch
ECOM-7389
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Learner dashboard views"""
|
||||
import waffle
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.http import Http404
|
||||
@@ -73,4 +74,7 @@ def program_details(request, program_uuid):
|
||||
'user_preferences': get_user_preferences(request.user)
|
||||
}
|
||||
|
||||
return render_to_response('learner_dashboard/program_details.html', context)
|
||||
if waffle.switch_is_active('new_program_progress'):
|
||||
return render_to_response('learner_dashboard/program_details_2017.html', context)
|
||||
else:
|
||||
return render_to_response('learner_dashboard/program_details.html', context)
|
||||
|
||||
29
lms/templates/learner_dashboard/program_details_2017.html
Normal file
29
lms/templates/learner_dashboard/program_details_2017.html
Normal file
@@ -0,0 +1,29 @@
|
||||
## Override the default styles_version to the Pattern Library version (version 2)
|
||||
<%! main_css = "style-learner-dashboard" %>
|
||||
|
||||
<%page expression_filter="h"/>
|
||||
<%inherit file="../main.html" />
|
||||
<%namespace name='static' file='../static_content.html'/>
|
||||
<%!
|
||||
from django.utils.translation import ugettext as _
|
||||
from openedx.core.djangolib.js_utils import (
|
||||
dump_js_escaped_json, js_escaped_string
|
||||
)
|
||||
%>
|
||||
|
||||
<%block name="js_extra">
|
||||
<%static:require_module module_name="js/learner_dashboard/program_details_factory" class_name="ProgramDetailsFactory">
|
||||
ProgramDetailsFactory({
|
||||
programData: ${program_data | n, dump_js_escaped_json},
|
||||
urls: ${urls | n, dump_js_escaped_json},
|
||||
userPreferences: ${user_preferences | n, dump_js_escaped_json},
|
||||
});
|
||||
</%static:require_module>
|
||||
</%block>
|
||||
|
||||
<%block name="pagetitle">${_("Program Details")}</%block>
|
||||
<%block name="bodyclass">program-details</%block>
|
||||
|
||||
<main id="main" aria-label="Content" tabindex="-1">
|
||||
<div class="js-program-details-wrapper"></div>
|
||||
</main>
|
||||
Reference in New Issue
Block a user