feat: Add breadcrumbs for textbooks screen
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
<%!
|
||||
from django.utils.translation import ugettext as _
|
||||
from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string
|
||||
from openedx.core.djangoapps.discussions.config.waffle import ENABLE_PAGES_AND_RESOURCES_MICROFRONTEND
|
||||
from cms.djangoapps.contentstore.utils import get_pages_and_resources_url
|
||||
%>
|
||||
|
||||
<%block name="title">${_("Textbooks")}</%block>
|
||||
@@ -36,11 +38,39 @@ CMS.URL.LMS_BASE = "${settings.LMS_BASE | n, js_escaped_string}"
|
||||
|
||||
<%block name="content">
|
||||
<div class="wrapper-mast wrapper">
|
||||
% if context_course:
|
||||
<%
|
||||
pages_and_resources_mfe_enabled = ENABLE_PAGES_AND_RESOURCES_MICROFRONTEND.is_enabled(context_course.id)
|
||||
course_key = context_course.id
|
||||
%>
|
||||
% endif
|
||||
|
||||
% if pages_and_resources_mfe_enabled:
|
||||
<header class="mast has-actions">
|
||||
<div class="jump-nav">
|
||||
<nav class="nav-dd title ui-left">
|
||||
<ol>
|
||||
<li class="nav-item">
|
||||
<span class="label">${_("Content")}</span>
|
||||
<span class="spacer"> ›</span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="title" href="${get_pages_and_resources_url(course_key)}" rel="external">${_("Pages & Resources")}</a>
|
||||
<span class="spacer"> ›</span>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
<h1 class="page-header">
|
||||
<span class="sr">> </span>${_("Textbooks")}
|
||||
</h1>
|
||||
% else:
|
||||
<header class="mast has-actions has-subtitle">
|
||||
<h1 class="page-header">
|
||||
<small class="subtitle">${_("Content")}</small>
|
||||
<span class="sr">> </span>${_("Textbooks")}
|
||||
</h1>
|
||||
% endif
|
||||
|
||||
<nav class="nav-actions" aria-label="${_('Page Actions')}">
|
||||
<h3 class="sr">${_("Page Actions")}</h3>
|
||||
|
||||
Reference in New Issue
Block a user