Files
edx-platform/lms/templates/seq_module.html
Dillon Dumesnil 7791f15509 refactor: AA-692: Update location of is-hidden class when fa icon is used
We ran into a bug where the is-hidden class was being overridden by the
font awesome styling due to a late load of font awesome (causing the
fa class to take precedence). This changes to instead wrap the icon in
the span so there is no competing between the two classes on the same
element
2021-03-17 10:57:56 -07:00

147 lines
5.7 KiB
HTML

<%page expression_filter="h"/>
<%! from django.utils.translation import pgettext, ugettext as _ %>
<div id="sequence_${element_id}" class="sequence" data-id="${item_id}"
data-position="${position}" data-ajax-url="${ajax_url}"
data-next-url="${next_url}" data-prev-url="${prev_url}"
data-save-position="${'true' if save_position else 'false'}"
data-show-completion="${'true' if show_completion else 'false'}"
>
% if not exclude_units:
% if banner_text:
<div class="pattern-library-shim alert alert-information subsection-header" role="note" tabindex="-1">
<span class="pattern-library-shim icon alert-icon fa fa-info-circle" aria-hidden="true"></span>
<span class="sr">${_('Important!')}&nbsp;</span>
<div class="pattern-library-shim alert-message">
<p class="pattern-library-shim alert-copy">
${banner_text}
</p>
</div>
</div>
% endif
% endif
% if not gated_sequence_paywall:
<div class="sequence-nav">
<button class="sequence-nav-button button-previous">
<span class="icon fa fa-chevron-prev" aria-hidden="true"></span>
## Translators: A button for showing the Previous Unit
<span class="sequence-nav-button-label">${pgettext('unit', 'Previous')}</span>
</button>
<button class="sequence-nav-button button-next">
## Translators: A button for showing the Next Unit
<span class="sequence-nav-button-label">${pgettext('unit', 'Next')}</span>
<span class="icon fa fa-chevron-next" aria-hidden="true"></span>
</button>
<nav class="sequence-list-wrapper" aria-label="${_('Sequence')}">
<ol id="sequence-list" role="tablist">
% if gated_content['gated']:
<li>
<button class="active nav-item tab" title="${_('Content Locked')}" id="tab_0" role="tab" tabindex="-1" aria-selected="true" aria-expanded="true" aria-controls="content_locked" disabled>
<span class="icon fa fa-lock" aria-hidden="true"></span>
</button>
</li>
% else:
% for idx, item in enumerate(items):
<li role="presentation">
<button class="seq_${item['type']} inactive nav-item tab"
role="tab"
tabindex="-1"
aria-selected="false"
aria-expanded="false"
aria-controls="seq_content"
data-index="${idx}"
data-id="${item['id']}"
data-element="${idx+1}"
data-page-title="${item['page_title']}"
data-path="${item['path']}"
data-graded="${item['graded']}"
% if item.get('href'):
data-href="${item['href']}"
% endif
id="tab_${idx}">
<span class="icon fa seq_${item['type']}" aria-hidden="true"></span>
% if 'complete' in item:
<span class="check-circle ${"is-hidden" if not item['complete'] else ""}">
<span
class="fa fa-check-circle"
style="color:green"
aria-hidden="true"
></span>
</span>
% if item['complete']:
<span class="sr">${_("Completed")}</span>
%endif
% endif
<span class="bookmark-icon ${"is-hidden" if not item['bookmarked'] else "bookmarked"}">
<span class="fa fa-fw fa-bookmark" aria-hidden="true"></span>
</span>
<div class="sequence-tooltip sr"><span class="sr">${item['type']}&nbsp;</span>${item['page_title']}<span class="sr bookmark-icon-sr">&nbsp;${_("Bookmarked") if item['bookmarked'] else ""}</span></div>
</button>
</li>
% endfor
% endif
% if exclude_units:
<li role="presentation">
<button class="seq_new_button inactive xnav-item tab"
role="tab"
tabindex="-1"
aria-selected="false"
aria-expanded="false"
aria-controls="seq_content"
data-parent="${item_id}"
data-category="vertical"
data-default-name="${_('Unit')}"
>
<span
class="fa fa-plus"
aria-hidden="true"
></span> New Unit
</button>
</li>
% endif
</ol>
</nav>
</div>
% endif
% if not exclude_units:
% if gated_content['gated']:
<%include file="_gated_content.html" args="prereq_url=gated_content['prereq_url'], prereq_section_name=gated_content['prereq_section_name'], gated_section_name=gated_content['gated_section_name']"/>
% elif gated_sequence_paywall:
<h2 class="hd hd-2 unit-title">
${sequence_name}<span class="sr">${_("Content Locked")}</span>
</h2>
${gated_sequence_paywall | n, decode.utf8}
% else:
<div class="sr-is-focusable" tabindex="-1"></div>
% for idx, item in enumerate(items):
<div id="seq_contents_${idx}"
aria-labelledby="tab_${idx}"
aria-hidden="true"
class="seq_contents tex2jax_ignore asciimath2jax_ignore">
${item['content']}
</div>
% endfor
<div id="seq_content" role="tabpanel"></div>
% endif
% else:
<div id="seq_content" role="tabpanel"></div>
% endif
% if not exclude_units:
<nav class="sequence-bottom" aria-label="${_('Section')}">
<button class="sequence-nav-button button-previous">
<span class="icon fa fa-chevron-prev" aria-hidden="true"></span>
## Translators: A button for showing the Previous Unit
<span>${pgettext('unit', 'Previous')}</span>
</button>
<button class="sequence-nav-button button-next">
## Translators: A button for showing the Next Unit
<span>${pgettext('unit', 'Next')}</span>
<span class="icon fa fa-chevron-next" aria-hidden="true"></span>
</button>
</nav>
</div>
% endif