Create program detail fragment for mobile app
To extract the program detail information edX mobile team has to parse all the un-necassary details which takes time that ultimately slows down app.To avoid it,a detail fragment is created that will be used in the mobile app as well as on the web. LEARNER-2981
This commit is contained in:
@@ -3,29 +3,14 @@
|
||||
|
||||
<%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
|
||||
)
|
||||
from openedx.core.djangolib.markup import HTML
|
||||
%>
|
||||
|
||||
<%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},
|
||||
courseData: ${course_data | n, dump_js_escaped_json},
|
||||
certificateData: ${certificate_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 program-details-wrapper"></div>
|
||||
${HTML(program_fragment.body_html())}
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user