Merge pull request #17229 from edx/jaebradley/add_modal

add modal
This commit is contained in:
Matthew Piatetsky
2018-01-18 18:02:23 -05:00
committed by GitHub
2 changed files with 26 additions and 0 deletions

View File

@@ -1,10 +1,13 @@
<%page expression_filter="h"/>
<%inherit file="../main.html" />
<%namespace name='static' file='/static_content.html'/>
<%!
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
from opaque_keys.edx.keys import CourseKey
from openedx.core.djangolib.js_utils import js_escaped_string
from openedx.core.djangolib.markup import HTML, Text
from openedx.features.learner_analytics import ENABLE_DASHBOARD_TAB
%>
<%namespace name='static' file='/static_content.html'/>
@@ -61,6 +64,10 @@ from openedx.core.djangolib.markup import HTML, Text
new Currency();
</%static:webpack>
<%block name="header_extras">
<link rel="stylesheet" type="text/css" href="${static.url('paragon/static/paragon.min.css')}" />
</%block>
<%block name="content">
% if error:
<div class="wrapper-msg wrapper-msg-error">
@@ -78,6 +85,14 @@ from openedx.core.djangolib.markup import HTML, Text
<div id="currency_data" value="${currency_data}"></div>
<div class="container">
<% course_key = CourseKey.from_string('course-v1:Fake+Course+Key') %>
% if ENABLE_DASHBOARD_TAB.is_enabled(course_key):
${static.renderReact(
component="UpsellExperimentModal",
id="upsell-modal",
props={},
)}
% endif
<section class="wrapper">
<div class="wrapper-register-choose wrapper-content-main">
<article class="register-choose content-main">

View File

@@ -18,6 +18,8 @@ from openedx.core.djangoapps.theming import helpers as theming_helpers
from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string
from openedx.core.djangolib.markup import HTML, Text
from openedx.features.learner_analytics import ENABLE_DASHBOARD_TAB
from entitlements.models import CourseEntitlement
from student.models import CourseEnrollment
%>
@@ -36,6 +38,7 @@ from student.models import CourseEnrollment
<script type="text/template" id="${template_name}-tpl">
<%static:include path="dashboard/${template_name}.underscore" />
</script>
<link rel="stylesheet" type="text/css" href="${static.url('paragon/static/paragon.min.css')}" />
% endfor
</%block>
@@ -122,6 +125,14 @@ from student.models import CourseEnrollment
<section class="dashboard" id="dashboard-main">
<main class="main-container" id="main" aria-label="Content" tabindex="-1">
<% course_key = CourseKey.from_string('course-v1:Fake+Course+Key') %>
% if ENABLE_DASHBOARD_TAB.is_enabled(course_key):
${static.renderReact(
component="UpsellExperimentModal",
id="upsell-modal",
props={},
)}
% endif
<section class="my-courses" id="my-courses">
<header class="wrapper-header-courses">
<h2 class="header-courses">${_("My Courses")}</h2>