Give user sign out option on account migration pages
This commit is contained in:
Родитель
cae711e860
Коммит
6b54c3a1d6
|
@ -65,112 +65,115 @@ site_status_msg = get_site_status_msg(course_id)
|
|||
</a>
|
||||
</h1>
|
||||
% if not enable_account_linking:
|
||||
% if course:
|
||||
<h2 class="course-header"><span class="provider">${course.display_org_with_default}:</span>
|
||||
<span class="course-number">${course.display_number_with_default}</span>
|
||||
<%
|
||||
display_name = course.display_name_with_default
|
||||
if settings.FEATURES.get('CUSTOM_COURSES_EDX', False):
|
||||
ccx = get_current_ccx(course.id)
|
||||
if ccx:
|
||||
display_name = ccx.display_name
|
||||
%>
|
||||
<span class="course-name">${display_name}</span></h2>
|
||||
% endif
|
||||
|
||||
% if user.is_authenticated():
|
||||
<ol class="left nav-global list-inline authenticated">
|
||||
<%block name="navigation_global_links_authenticated">
|
||||
% if settings.FEATURES.get('COURSES_ARE_BROWSABLE') and not show_program_listing:
|
||||
<li class="item nav-global-01">
|
||||
<a href="${marketing_link('COURSES')}">${_('Explore courses')}</a>
|
||||
</li>
|
||||
% if course:
|
||||
<h2 class="course-header"><span class="provider">${course.display_org_with_default}:</span>
|
||||
<span class="course-number">${course.display_number_with_default}</span>
|
||||
<%
|
||||
display_name = course.display_name_with_default
|
||||
if settings.FEATURES.get('CUSTOM_COURSES_EDX', False):
|
||||
ccx = get_current_ccx(course.id)
|
||||
if ccx:
|
||||
display_name = ccx.display_name
|
||||
%>
|
||||
<span class="course-name">${display_name}</span></h2>
|
||||
% endif
|
||||
% if show_program_listing:
|
||||
<li class="tab-nav-item">
|
||||
<a class="${'active ' if reverse('dashboard') == request.path else ''}tab-nav-link" href="${reverse('dashboard')}">
|
||||
${_("Courses")}
|
||||
</a>
|
||||
</li>
|
||||
<li class="tab-nav-item">
|
||||
<a class="${'active ' if reverse('program_listing_view') in request.path else ''}tab-nav-link" href="${reverse('program_listing_view')}">
|
||||
${_("Programs")}
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
%if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff:
|
||||
<li class="item">
|
||||
## Translators: This is short for "System administration".
|
||||
<a href="${reverse('sysadmin')}">${_("System Admin")}</a>
|
||||
</li>
|
||||
%endif
|
||||
</%block>
|
||||
</ol>
|
||||
|
||||
<%include file="user_dropdown.html"/>
|
||||
|
||||
% if should_display_shopping_cart_func() and not (course and static.is_request_in_themed_site()): # see shoppingcart.context_processor.user_has_cart_context_processor
|
||||
<ol class="user">
|
||||
<li class="primary">
|
||||
<a class="shopping-cart" href="${reverse('shoppingcart.views.show_cart')}">
|
||||
<span class="icon fa fa-shopping-cart" aria-hidden="true"></span> ${_("Shopping Cart")}
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
% endif
|
||||
% else:
|
||||
<ol class="left list-inline nav-global">
|
||||
<%block name="navigation_global_links">
|
||||
% if static.get_value('ENABLE_MKTG_SITE', settings.FEATURES.get('ENABLE_MKTG_SITE', False)):
|
||||
<li class="item nav-global-01">
|
||||
<a href="${marketing_link('HOW_IT_WORKS')}">${_("How it Works")}</a>
|
||||
</li>
|
||||
% if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
|
||||
<li class="item nav-global-02">
|
||||
<a href="${marketing_link('COURSES')}">${_("Courses")}</a>
|
||||
</li>
|
||||
% endif
|
||||
<li class="item nav-global-03">
|
||||
<a href="${marketing_link('SCHOOLS')}">${_("Schools")}</a>
|
||||
</li>
|
||||
% endif
|
||||
</%block>
|
||||
|
||||
<%block name="navigation_other_global_links">
|
||||
% if not settings.FEATURES['DISABLE_LOGIN_BUTTON']:
|
||||
% if settings.FEATURES.get('ENABLE_COURSE_DISCOVERY') or course:
|
||||
<li class="item nav-global-05">
|
||||
<a class="btn" href="/courses">${_("Explore Courses")}</a>
|
||||
</li>
|
||||
% endif
|
||||
% endif
|
||||
</%block>
|
||||
</ol>
|
||||
|
||||
<ol class="right nav-courseware list-inline">
|
||||
<%block name="navigation_sign_in">
|
||||
% if not settings.FEATURES['DISABLE_LOGIN_BUTTON']:
|
||||
% if course and settings.FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
|
||||
<li class="item nav-global-04">
|
||||
<a class="btn-neutral btn-register" style="padding:10px 20px;" href="${reverse('course-specific-register', args=[course.id.to_deprecated_string()])}">${_("Register Now")}</a>
|
||||
</li>
|
||||
% else:
|
||||
<li class="item nav-global-04">
|
||||
<a class="btn-neutral btn-register" style="padding:10px 20px;" href="/register${login_query()}">${_("Register Now")}</a>
|
||||
</li>
|
||||
% endif
|
||||
% endif
|
||||
<li class="item nav-courseware-01">
|
||||
% if not settings.FEATURES['DISABLE_LOGIN_BUTTON']:
|
||||
% if course and settings.FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
|
||||
<a class="btn btn-primary" href="${reverse('course-specific-login', args=[course.id.to_deprecated_string()])}${login_query()}">${_("Sign in")}</a>
|
||||
% else:
|
||||
<a class="btn btn-primary" href="/login${login_query()}">${_("Sign in")}</a>
|
||||
% if user.is_authenticated():
|
||||
<ol class="left nav-global list-inline authenticated">
|
||||
<%block name="navigation_global_links_authenticated">
|
||||
% if settings.FEATURES.get('COURSES_ARE_BROWSABLE') and not show_program_listing:
|
||||
<li class="item nav-global-01">
|
||||
<a href="${marketing_link('COURSES')}">${_('Explore courses')}</a>
|
||||
</li>
|
||||
% endif
|
||||
% if show_program_listing:
|
||||
<li class="tab-nav-item">
|
||||
<a class="${'active ' if reverse('dashboard') == request.path else ''}tab-nav-link" href="${reverse('dashboard')}">
|
||||
${_("Courses")}
|
||||
</a>
|
||||
</li>
|
||||
<li class="tab-nav-item">
|
||||
<a class="${'active ' if reverse('program_listing_view') in request.path else ''}tab-nav-link" href="${reverse('program_listing_view')}">
|
||||
${_("Programs")}
|
||||
</a>
|
||||
</li>
|
||||
% endif
|
||||
%if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff:
|
||||
<li class="item">
|
||||
## Translators: This is short for "System administration".
|
||||
<a href="${reverse('sysadmin')}">${_("System Admin")}</a>
|
||||
</li>
|
||||
%endif
|
||||
</%block>
|
||||
</ol>
|
||||
|
||||
<%include file="user_dropdown.html"/>
|
||||
|
||||
% if should_display_shopping_cart_func() and not (course and static.is_request_in_themed_site()): # see shoppingcart.context_processor.user_has_cart_context_processor
|
||||
<ol class="user">
|
||||
<li class="primary">
|
||||
<a class="shopping-cart" href="${reverse('shoppingcart.views.show_cart')}">
|
||||
<span class="icon fa fa-shopping-cart" aria-hidden="true"></span> ${_("Shopping Cart")}
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
% endif
|
||||
% else:
|
||||
<ol class="left list-inline nav-global">
|
||||
<%block name="navigation_global_links">
|
||||
% if static.get_value('ENABLE_MKTG_SITE', settings.FEATURES.get('ENABLE_MKTG_SITE', False)):
|
||||
<li class="item nav-global-01">
|
||||
<a href="${marketing_link('HOW_IT_WORKS')}">${_("How it Works")}</a>
|
||||
</li>
|
||||
% if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
|
||||
<li class="item nav-global-02">
|
||||
<a href="${marketing_link('COURSES')}">${_("Courses")}</a>
|
||||
</li>
|
||||
% endif
|
||||
<li class="item nav-global-03">
|
||||
<a href="${marketing_link('SCHOOLS')}">${_("Schools")}</a>
|
||||
</li>
|
||||
% endif
|
||||
</%block>
|
||||
|
||||
<%block name="navigation_other_global_links">
|
||||
% if not settings.FEATURES['DISABLE_LOGIN_BUTTON']:
|
||||
% if settings.FEATURES.get('ENABLE_COURSE_DISCOVERY') or course:
|
||||
<li class="item nav-global-05">
|
||||
<a class="btn" href="/courses">${_("Explore Courses")}</a>
|
||||
</li>
|
||||
% endif
|
||||
% endif
|
||||
</%block>
|
||||
</ol>
|
||||
|
||||
<ol class="right nav-courseware list-inline">
|
||||
<%block name="navigation_sign_in">
|
||||
% if not settings.FEATURES['DISABLE_LOGIN_BUTTON']:
|
||||
% if course and settings.FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
|
||||
<li class="item nav-global-04">
|
||||
<a class="btn-neutral btn-register" style="padding:10px 20px;" href="${reverse('course-specific-register', args=[course.id.to_deprecated_string()])}">${_("Register Now")}</a>
|
||||
</li>
|
||||
% else:
|
||||
<li class="item nav-global-04">
|
||||
<a class="btn-neutral btn-register" style="padding:10px 20px;" href="/register${login_query()}">${_("Register Now")}</a>
|
||||
</li>
|
||||
% endif
|
||||
% endif
|
||||
</li>
|
||||
</%block>
|
||||
</ol>
|
||||
<li class="item nav-courseware-01">
|
||||
% if not settings.FEATURES['DISABLE_LOGIN_BUTTON']:
|
||||
% if course and settings.FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
|
||||
<a class="btn btn-primary" href="${reverse('course-specific-login', args=[course.id.to_deprecated_string()])}${login_query()}">${_("Sign in")}</a>
|
||||
% else:
|
||||
<a class="btn btn-primary" href="/login${login_query()}">${_("Sign in")}</a>
|
||||
% endif
|
||||
% endif
|
||||
</li>
|
||||
</%block>
|
||||
</ol>
|
||||
% endif
|
||||
% else:
|
||||
<%include file="user_dropdown.html"/>
|
||||
% endif
|
||||
% if static.show_language_selector():
|
||||
<% languages = static.get_released_languages() %>
|
||||
|
@ -200,7 +203,6 @@ site_status_msg = get_site_status_msg(course_id)
|
|||
</ol>
|
||||
% endif
|
||||
% endif
|
||||
% endif
|
||||
</nav>
|
||||
</header>
|
||||
% if course:
|
||||
|
|
|
@ -28,7 +28,7 @@ from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_
|
|||
<span class="icon fa fa-caret-down" aria-hidden="true"></span>
|
||||
<span class="sr-only">${_("Usermenu dropdown")}</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu list-divided is-hidden" id="${_("Usermenu")}" tabindex="-1">
|
||||
<ul class="dropdown-menu list-divided is-hidden" id="${_('Usermenu')}" tabindex="-1">
|
||||
<%block name="navigation_dropdown_menu_links" >
|
||||
<li class="dropdown-item item has-block-link"><a href="${reverse('dashboard')}" role="menuitem" class="action dropdown-menuitem">${_("Dashboard")}</a></li>
|
||||
<li class="dropdown-item item has-block-link"><a href="${reverse('learner_profile', kwargs={'username': self.real_user.username})}" role="menuitem" class="action dropdown-menuitem">${_("My Profile")}</a></li>
|
||||
|
|
Загрузка…
Ссылка в новой задаче