65 lines
2.6 KiB
HTML
65 lines
2.6 KiB
HTML
## mako
|
|
<%page expression_filter="h"/>
|
|
<%!
|
|
from django.urls import reverse
|
|
from django.utils.translation import gettext as _
|
|
from openedx.core.djangolib.markup import HTML, Text
|
|
from wiki.core.permissions import can_change_permissions
|
|
%>
|
|
|
|
<li class="${"active" if selected_tab == "view" else ""}">
|
|
<a href="${reverse('wiki:get', kwargs={'article_id' : article.id, 'path' : urlpath.path})}">
|
|
<span class="icon fa fa-eye" aria-hidden="true"></span>
|
|
${_("View")}
|
|
${Text(_("{span_start}(active){span_end}")).format(span_start=HTML("<span class='sr'>"), span_end=HTML("</span>")) if selected_tab == "view" else ""}
|
|
</a>
|
|
</li>
|
|
|
|
%if article.can_write(user):
|
|
<li class="${"active" if selected_tab == "edit" else ""}">
|
|
<a href="${reverse('wiki:edit', kwargs={'article_id' : article.id, 'path' : urlpath.path})}">
|
|
<span class="icon fa fa-pencil" aria-hidden="true"></span>
|
|
${_("Edit")}
|
|
${Text(_("{span_start}(active){span_end}")).format(span_start=HTML("<span class='sr'>"), span_end=HTML("</span>")) if selected_tab == "edit" else ""}
|
|
</a>
|
|
</li>
|
|
%endif
|
|
|
|
<li class="${"active" if selected_tab == "history" else ""}">
|
|
<a href="${reverse('wiki:history', kwargs={'article_id' : article.id, 'path' : urlpath.path})}">
|
|
<span class="icon fa fa-clock-o" aria-hidden="true"></span>
|
|
${_("Changes")}
|
|
${Text(_("{span_start}(active){span_end}")).format(span_start=HTML("<span class='sr'>"), span_end=HTML("</span>")) if selected_tab == "history" else ""}
|
|
</a>
|
|
</li>
|
|
|
|
%for plugin in article_tabs:
|
|
%if hasattr(plugin, "article_tab"):
|
|
<li class="${"active" if selected_tab == plugin.slug else ""}">
|
|
<a href="${reverse('wiki:plugin', kwargs={'slug' : plugin.slug, 'article_id' : article.id, 'path' : urlpath.path}) }">
|
|
<span class="icon fa fa-file ${plugin.article_tab[1]}" aria-hidden="true"></span>
|
|
${plugin.article_tab[0]}
|
|
${Text(_("{span_start}(active){span_end}")).format(span_start=HTML("<span class='sr'>"), span_end=HTML("</span>")) if selected_tab == plugin.slug else ""}
|
|
</a>
|
|
</li>
|
|
%endif
|
|
%endfor
|
|
|
|
|
|
<%doc>
|
|
${_("This should be enabled for all non-anonymous users once the notifications app has been integrated and styled.")}
|
|
</%doc>
|
|
|
|
%if can_change_permissions(article,user):
|
|
<li class="${"active" if selected_tab == "settings" else ""}">
|
|
<a href="${reverse('wiki:settings', kwargs={'article_id' : article.id, 'path' : urlpath.path})}">
|
|
<span class="icon fa fa-cog" aria-hidden="true"></span>
|
|
${_("Settings")}
|
|
${Text(_("{span_start}active{span_end}")).format(span_start=HTML("<span class='sr'>"), span_end=HTML("</span>")) if selected_tab == "settings" else ""}
|
|
</a>
|
|
</li>
|
|
%endif
|
|
|
|
|
|
|