зеркало из https://github.com/mozilla/kitsune.git
Merge pull request #6207 from escattone/fix-1783
fix contributor tools menus on mobile
This commit is contained in:
Коммит
18c7daabf3
|
@ -701,13 +701,11 @@
|
||||||
</li>
|
</li>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro for_contributors_sidebar(user, default_language, li_only=False, active=None, menu="contributor-discussions", locale=None, is_collapsible=False) -%}
|
{% macro for_contributors_sidebar(user, default_language, active=None, menu="contributor-discussions", locale=None, is_collapsible=False) -%}
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<nav class="sidebar-nav" id="for-contributors-sidebar">
|
<nav class="sidebar-nav" id="for-contributors-sidebar">
|
||||||
<span class="details-heading"></span>
|
<span class="details-heading"></span>
|
||||||
{% if not li_only %}
|
|
||||||
<ul class="sidebar-nav--list">
|
<ul class="sidebar-nav--list">
|
||||||
{% endif %}
|
|
||||||
{% if menu == "contributor-tools" %}
|
{% if menu == "contributor-tools" %}
|
||||||
<li class="sidebar-subheading sidebar-nav--heading-item hide-on-mobile">{{ _('Contributor tools') }}</li>
|
<li class="sidebar-subheading sidebar-nav--heading-item hide-on-mobile">{{ _('Contributor tools') }}</li>
|
||||||
{{ _tools_nav_links(user, default_language, active, context="sidebar-menu", locale=locale, is_collapsible=is_collapsible) }}
|
{{ _tools_nav_links(user, default_language, active, context="sidebar-menu", locale=locale, is_collapsible=is_collapsible) }}
|
||||||
|
@ -715,10 +713,7 @@
|
||||||
<li class="sidebar-subheading sidebar-nav--heading-item">{{ _('Contributor discussions') }}</li>
|
<li class="sidebar-subheading sidebar-nav--heading-item">{{ _('Contributor discussions') }}</li>
|
||||||
{{ _discussion_nav_links(user, default_language, active, context="sidebar-menu") }}
|
{{ _discussion_nav_links(user, default_language, active, context="sidebar-menu") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if not li_only %}
|
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
|
||||||
</nav>
|
</nav>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
|
@ -40,7 +40,6 @@ export default function detailsInit() {
|
||||||
if (sidebarList && mq.matches) {
|
if (sidebarList && mq.matches) {
|
||||||
window.Mzp.Details.init('.details-heading');
|
window.Mzp.Details.init('.details-heading');
|
||||||
swapMobileSubnavText();
|
swapMobileSubnavText();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
window.Mzp.Details.destroy('.details-heading');
|
window.Mzp.Details.destroy('.details-heading');
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
{% block side_top %}
|
{% block side_top %}
|
||||||
<nav id="doc-tools">
|
<nav id="doc-tools">
|
||||||
<ul class="sidebar-nav sidebar-folding">
|
<ul class="sidebar-nav sidebar-folding">
|
||||||
{{ for_contributors_sidebar(user, settings.WIKI_DEFAULT_LANGUAGE, True) }}
|
{{ for_contributors_sidebar(user, settings.WIKI_DEFAULT_LANGUAGE) }}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{% block side_top %}
|
{% block side_top %}
|
||||||
<nav id="doc-tools">
|
<nav id="doc-tools">
|
||||||
<ul class="sidebar-nav sidebar-folding">
|
<ul class="sidebar-nav sidebar-folding">
|
||||||
{{ for_contributors_sidebar(user, settings.WIKI_DEFAULT_LANGUAGE, True, menu="contributor-tools", locale=locale, is_collapsible=True, active="wiki.revisions") }}
|
{{ for_contributors_sidebar(user, settings.WIKI_DEFAULT_LANGUAGE, menu="contributor-tools", locale=locale, is_collapsible=True, active="wiki.revisions") }}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче