Navigation: Add list facet menu

Add the new list facet navigation menu. Used to provide facets
to the list subtemplate. The list facet allows separating the object
action links from the object navigation links. The list facet
links are displayed before the list object links on the list
subtemplate. In the object views, the list facet menu behaves
exactly the same as the form facet menu.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-11-29 04:17:53 -04:00
parent 52bbf62e26
commit abfc8b0c09
38 changed files with 256 additions and 137 deletions

View File

@@ -11,8 +11,8 @@ from acls.links import link_acl_list
from acls.permissions import permission_acl_edit, permission_acl_view
from common import (
MayanAppConfig, menu_facet, menu_main, menu_object, menu_secondary,
menu_setup, menu_tools
MayanAppConfig, menu_facet, menu_list_facet, menu_main, menu_object,
menu_secondary, menu_setup, menu_tools
)
from common.widgets import TwoStateWidget
from documents.signals import post_document_created, post_initial_document_type
@@ -182,11 +182,15 @@ class DocumentIndexingApp(MayanAppConfig):
menu_facet.bind_links(
links=(link_document_index_list,), sources=(Document,)
)
menu_list_facet.bind_links(
links=(
link_acl_list, link_index_setup_document_types,
link_index_setup_view,
), sources=(Index,)
)
menu_object.bind_links(
links=(
link_index_setup_edit, link_index_setup_view,
link_index_setup_document_types, link_acl_list,
link_index_setup_delete
link_index_setup_edit, link_index_setup_delete
), sources=(Index,)
)
menu_object.bind_links(