Remove redundant conditions in the first clause of dates_banner.html
This commit is contained in:
@@ -28,7 +28,7 @@ on_courseware_page_as_audit = on_courseware_page and is_audit
|
||||
on_courseware_page_as_verified = on_courseware_page and is_verified
|
||||
additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
|
||||
%>
|
||||
% if (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_audit or on_courseware_page_as_verified)):
|
||||
% if (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page)):
|
||||
<div class="dates-banner ${additional_styling_class}">
|
||||
<div class="dates-banner-text">
|
||||
% if is_mobile_app:
|
||||
@@ -44,47 +44,31 @@ additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
|
||||
<a class="mobile-dates-link" href="${verified_upgrade_link}">edx.org</a>.
|
||||
% endif
|
||||
% else:
|
||||
% if on_course_outline_page_as_verified or (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_verified)):
|
||||
% if is_verified:
|
||||
<strong>${_('It looks like you missed some important deadlines based on our suggested schedule.')}</strong>
|
||||
${_('To keep yourself on track, you can update this schedule and shift the past due assignments into the future. Don’t worry—you won’t lose any of the progress you’ve made when you shift your due dates.')}
|
||||
% endif
|
||||
% if (on_dates_tab_as_audit and has_locked_assignments) or on_course_outline_page_as_audit or (on_courseware_page_as_audit and missed_deadlines):
|
||||
% if is_audit:
|
||||
<strong>${_('You are auditing this course,')}</strong>
|
||||
${_(' which means that you are unable to participate in graded assignments.')}
|
||||
% if on_dates_tab:
|
||||
% if missed_deadlines:
|
||||
${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today.')}
|
||||
% else:
|
||||
${_(' To complete graded assignments as part of this course, you can upgrade today.')}
|
||||
% endif
|
||||
% else:
|
||||
${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today.')}
|
||||
% endif
|
||||
${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today.')}
|
||||
% endif
|
||||
% endif
|
||||
</div>
|
||||
% if not is_mobile_app:
|
||||
<div class="upgrade-button">
|
||||
% if on_course_outline_page_as_verified or (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_verified)):
|
||||
% if is_verified:
|
||||
<form method="post" action="${reset_deadlines_url}">
|
||||
<input type="hidden" id="csrf_token" name="csrfmiddlewaretoken" value="${csrf_token}">
|
||||
<input type="hidden" name="reset_deadlines_redirect_url_base" value="${reset_deadlines_redirect_url_base}">
|
||||
<input type="hidden" name="reset_deadlines_redirect_url_id_dict" value="${reset_deadlines_redirect_url_id_dict}">
|
||||
<button class="btn reset-deadlines-button">${_("Reset my deadlines")}</button>
|
||||
</form>
|
||||
% endif:
|
||||
% if (on_dates_tab_as_audit and has_locked_assignments) or on_course_outline_page_as_audit or (on_courseware_page_as_audit and missed_deadlines):
|
||||
% endif
|
||||
% if is_audit:
|
||||
<a href="${verified_upgrade_link}">
|
||||
<button type="button">
|
||||
% if on_dates_tab:
|
||||
% if missed_deadlines:
|
||||
${_('Upgrade to shift due dates')}
|
||||
% else:
|
||||
${_('Upgrade now')}
|
||||
% endif
|
||||
% else:
|
||||
${_('Upgrade to shift due dates')}
|
||||
% endif
|
||||
${_('Upgrade to shift due dates')}
|
||||
</button>
|
||||
</a>
|
||||
% endif
|
||||
|
||||
Reference in New Issue
Block a user