From b25c3be969e144bd9f5a24a42ec31b9580d7f6de Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 14 Feb 2019 02:34:23 -0400 Subject: [PATCH] Navigation improvements 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 --- HISTORY.rst | 7 ++ .../appearance/templates/appearance/base.html | 68 ++++++++---- .../appearance/generic_list_horizontal.html | 6 +- .../generic_list_items_subtemplate.html | 33 +++--- .../appearance/generic_list_subtemplate.html | 42 +++++--- .../templates/appearance/list_toolbar.html | 26 +++-- .../templates/appearance/menu_main.html | 102 +++++++++--------- .../templates/appearance/menu_topbar.html | 30 +++--- mayan/apps/common/menus.py | 11 +- mayan/apps/common/templatetags/common_tags.py | 8 ++ mayan/apps/navigation/classes.py | 64 ++++++++--- .../navigation/generic_subnavigation.html | 16 +-- .../templatetags/navigation_tags.py | 44 +++++--- 13 files changed, 286 insertions(+), 171 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4adcf98872..4feddded82 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -237,6 +237,13 @@ document type selection screen. The document type view permission is now required in addition to the index template edit permission. +- 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. + 3.1.9 (2018-11-01) ================== diff --git a/mayan/apps/appearance/templates/appearance/base.html b/mayan/apps/appearance/templates/appearance/base.html index c1db3d4374..48cfcc0143 100644 --- a/mayan/apps/appearance/templates/appearance/base.html +++ b/mayan/apps/appearance/templates/appearance/base.html @@ -37,7 +37,7 @@ - {% get_menus_links names='facet,list facet' sort_results=True as links_facet %} + {% navigation_resolve_menus names='facet,list facet' sort_results=True as facet_menus_link_results %}