Add Discover New link to LMS header. (#20875)

This commit is contained in:
Douglas Hall
2019-06-21 15:41:06 -04:00
committed by GitHub
parent 027a9bd2cc
commit f9d599a1a0
2 changed files with 10 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
%>
<%
show_explore_courses = settings.FEATURES.get('COURSES_ARE_BROWSABLE') and not show_program_listing
show_explore_courses = settings.FEATURES.get('COURSES_ARE_BROWSABLE')
show_sysadmin_dashboard = settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff
self.real_user = getattr(user, 'real_user', user)

View File

@@ -11,8 +11,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
%>
<%
courses_are_browsable = settings.FEATURES.get('COURSES_ARE_BROWSABLE')
show_explore_courses = settings.FEATURES.get('COURSES_ARE_BROWSABLE') and not show_program_listing
show_explore_courses = settings.FEATURES.get('COURSES_ARE_BROWSABLE')
show_sysadmin_dashboard = settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff
self.real_user = getattr(user, 'real_user', user)
%>
@@ -54,6 +53,14 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
</a>
</div>
% endif
% if show_explore_courses:
<div class="mobile-nav-item hidden-mobile nav-item nav-tab">
<a class="tab-nav-link" href="${marketing_link('COURSES')}"
aria-current="${'page' if '/courses' in request.path else 'false'}">
${_('Discover New')}
</a>
</div>
% endif
% endif
% endif