Rename the get_menu_links and get_menus_links to navigation_resolve_menu. Change the return value of the menu resolving to include the resolved object. Update the links display templates to show which object the links belong to when there is more than one object. Update the links display templates to show which menu the links belong to when there is more than one menu. Remove the sidebar menu and unify its links with the secondary menu. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
71 lines
3.9 KiB
HTML
71 lines
3.9 KiB
HTML
{% load i18n %}
|
|
|
|
{% load navigation_tags %}
|
|
{% load smart_settings_tags %}
|
|
|
|
{% load common_tags %}
|
|
{% load navigation_tags %}
|
|
|
|
{% spaceless %}
|
|
<div class="panel-group" id="accordion-sidebar" role="tablist" aria-multiselectable="true">
|
|
{% navigation_resolve_menu name='main' as main_menus_results %}
|
|
{% for main_menu_results in main_menus_results %}
|
|
{% for link_group in main_menu_results.link_groups %}
|
|
{% for link in link_group.links %}
|
|
{% with 'active' as li_class_active %}
|
|
{% with ' ' as link_classes %}
|
|
{% if link|get_type == "<class 'mayan.apps.navigation.classes.Menu'>" %}
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading" role="tab" id="headingOne">
|
|
<h4 class="panel-title">
|
|
<a class="non-ajax collapsed" role="button" data-toggle="collapse" data-parent="#accordion-sidebar" href="#accordion-body-{{ forloop.counter }}" aria-expanded="false" aria-controls="collapseOne">
|
|
<div class="pull-left">
|
|
{% if link.icon %}
|
|
<i class="hidden-xs hidden-sm hidden-md {{ link.icon }}"></i>
|
|
{% endif %}
|
|
{% if link.icon_class %}{{ link.icon_class.render }}{% endif %}
|
|
{{ link.label }}
|
|
</div>
|
|
<div class="accordion-indicator pull-right"><span class="caret"></span></div>
|
|
<div class="clearfix"></div>
|
|
</a>
|
|
</h4>
|
|
</div>
|
|
<div id="accordion-body-{{ forloop.counter }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
|
|
<div class="panel-body">
|
|
<ul class="list-unstyled">
|
|
{% navigation_resolve_menu name=link.name as sub_menus_results %}
|
|
{% for sub_menu_results in sub_menus_results %}
|
|
{% for link_group in sub_menu_results.link_groups %}
|
|
{% with '' as link_class_active %}
|
|
{% with 'a-main-menu-accordion-link' as link_classes %}
|
|
{% with 'true' as as_li %}
|
|
{% with link_group.links as object_navigation_links %}
|
|
{% include 'navigation/generic_navigation.html' %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading" role="tab" id="headingOne">
|
|
<h4 class="panel-title">
|
|
{% include 'navigation/generic_link_instance.html' %}
|
|
</h4>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endspaceless %}
|