Last active
November 30, 2016 16:09
-
-
Save phuongtailtranminh/e6f909a3ee07a306a8d70a4beb0f8a30 to your computer and use it in GitHub Desktop.
/edx/app/edxapp/edx-platform/lms/templates/courseware/tabs.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## mako | |
<%namespace name='static' file='/static_content.html'/> | |
<%! | |
from django.utils.translation import ugettext as _ | |
from django.core.urlresolvers import reverse | |
%> | |
<%page args="tab_list, active_page, default_tab, tab_image" expression_filter="h" /> | |
<% | |
def url_class(is_active): | |
if is_active: | |
return "active" | |
return "" | |
%> | |
% for tab in tab_list: | |
<% | |
tab_is_active = tab.tab_id in (active_page, default_tab) | |
tab_class = url_class(tab_is_active) | |
is_visible = tab.name != 'Discussion' | |
%> | |
% if is_visible: | |
<li class="tab"> | |
<a href="${tab.link_func(course, reverse)}" class="${tab_class}"> | |
${_(tab.name)} | |
% if tab_is_active: | |
<span class="sr">, current location</span> | |
%endif | |
% if tab_image: | |
## Translators: 'needs attention' is an alternative string for the | |
## notification image that indicates the tab "needs attention". | |
<img src="${tab_image}" alt="${_('needs attention')}" /> | |
%endif | |
</a> | |
</li> | |
%endif | |
% endfor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment