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>
53 lines
2.2 KiB
HTML
53 lines
2.2 KiB
HTML
{% load i18n %}
|
|
|
|
{% load common_tags %}
|
|
{% load navigation_tags %}
|
|
|
|
<div class="pull-left">
|
|
<div class="btn-toolbar" role="toolbar">
|
|
<div class="btn-group">
|
|
{% if links_multi_menus_results %}
|
|
<a class="btn btn-default btn-sm check-all" data-checked=false data-icon-checked="fa fa-check-square" data-icon-unchecked="far fa-square" title="{% trans 'Select/Deselect all' %}">
|
|
<i class="far fa-square"></i>
|
|
</a>
|
|
{% endif %}
|
|
<a class="btn btn-default btn-sm" href="{% get_list_mode_querystring %}" title="{% trans 'Toggle list display mode' %}">
|
|
{% get_list_mode_icon as list_mode_icon %}{{ list_mode_icon.render }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% if links_multi_menus_results %}
|
|
<p class="pull-right" id="multi-item-title" style="margin-top: 4px;">{% trans 'Select items to activate bulk actions. Use Shift + click to select many.' %}</p>
|
|
|
|
<div class="pull-right btn-group" id="multi-item-actions" style="display: none;">
|
|
<button aria-expanded="true" class="btn btn-danger btn-sm dropdown-toggle" data-toggle="dropdown" type="button">
|
|
{% trans 'Bulk actions' %}
|
|
<span class="caret"></span>
|
|
<span class="sr-only">{% trans 'Toggle Dropdown' %}</span>
|
|
</button>
|
|
<ul class="dropdown-menu" role="menu">
|
|
{% for multi_item_menu_results in links_multi_menus_results %}
|
|
{% for link_group in multi_item_menu_results.link_groups %}
|
|
{% with link_group.links as object_navigation_links %}
|
|
{% with 'true' as as_li %}
|
|
{% with 'true' as hide_active_anchor %}
|
|
{% with 'btn-sm btn-multi-item-action' as link_classes %}
|
|
{% include 'navigation/generic_navigation.html' %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
|
|
{% endfor %}
|
|
{% if not forloop.last and link_group %}
|
|
<li class="divider"></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
{% endif %}
|