diff --git a/HISTORY.rst b/HISTORY.rst index bff0656eb0..10852b5cf5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -96,6 +96,9 @@ manager. * Remove the MIMETYPE_FILE_READ_SIZE setting. * Use copyfileobj in the document parsers. +* Backport list facet menu code. +* Backport sidebar code. +* CSS updates to maximize usable width. 3.1.11 (2019-04-XX) =================== diff --git a/docs/releases/3.2.rst b/docs/releases/3.2.rst index 1d68d38f3e..69e96932b8 100644 --- a/docs/releases/3.2.rst +++ b/docs/releases/3.2.rst @@ -128,6 +128,9 @@ Other changes manager. * Remove the MIMETYPE_FILE_READ_SIZE setting. * Use copyfileobj in the document parsers. +* Backport list facet menu code. +* Backport sidebar code. +* CSS updates to maximize usable width. Removals -------- diff --git a/mayan/apps/appearance/static/appearance/css/base.css b/mayan/apps/appearance/static/appearance/css/base.css index 914668d0f8..c188db0826 100644 --- a/mayan/apps/appearance/static/appearance/css/base.css +++ b/mayan/apps/appearance/static/appearance/css/base.css @@ -334,3 +334,70 @@ a i { transform: rotate(360deg); } } + +/* + * Main content + */ + +.main { +} + +/* Remove scroll bar caused by bootstraps -15px on .row margins */ +.no-gutters { + margin-right: 0; + margin-left: 0; + + > .col, + > [class*="col-"] { + padding-right: 0; + padding-left: 0; + } +} + +@media (min-width: 768px) { + .main { + padding-right: 0px; + padding-left: 0px; + /*margin-left: 210px;*/ + } +} + + +/* Side bar */ +#menu-actions { + position: fixed; + right: 5px; + top: 65px; + z-index: 1020; +} + +#viewport { + width: 100%; +} + +.has-sidebar { + padding-right: 0px; +} + +#sidebar { + display: none; +} + +@media (min-width: 768px) { + #sidebar { + bottom: 0; + display: block; + overflow-x: visible; + overflow-y: auto; + padding-top: 10px; + position: fixed; + right: 0; + top: 100px; + width: 150px; + z-index: 1000; + } + + .has-sidebar { + padding-right: 130px; + } +} diff --git a/mayan/apps/appearance/templates/appearance/base.html b/mayan/apps/appearance/templates/appearance/base.html index 0e63d2bb47..6c2ad09721 100644 --- a/mayan/apps/appearance/templates/appearance/base.html +++ b/mayan/apps/appearance/templates/appearance/base.html @@ -22,7 +22,7 @@ {% if appearance_type == 'plain' %} {% block content_plain %}{% endblock %} {% else %} -
+
{% check_sqlite as check_sqlite %} @@ -37,6 +37,86 @@
+ {% navigation_resolve_menus names='facet,list facet' sort_results=True as facet_menus_link_results %} + +
+ + + {% if facet_menus_link_results %} + + {% endif %} +
+{% comment %} + {% get_menus_links names='object,sidebar,secondary' sort_results=True as links %} {% get_menu_links name='facet' sort_results=True as form_navigation_links %} @@ -97,6 +177,8 @@
{% endif %}
+{% endcomment %} + {% endif %} diff --git a/mayan/apps/appearance/templates/appearance/generic_list_horizontal.html b/mayan/apps/appearance/templates/appearance/generic_list_horizontal.html index 94c10d0dea..c2a874e368 100644 --- a/mayan/apps/appearance/templates/appearance/generic_list_horizontal.html +++ b/mayan/apps/appearance/templates/appearance/generic_list_horizontal.html @@ -11,10 +11,12 @@
{% with 'navigation/large_button_link.html' as link_template %} - {% for object_navigation_links in resolved_links %} - {% include 'navigation/generic_navigation.html' %} + {% for menu_results in resolved_links %} + {% with menu_results.links as object_navigation_links %} + {% include 'navigation/generic_navigation.html' %} + {% endwith %} {% empty %} -

+

{% include 'appearance/no_results.html' %}

{% endfor %} diff --git a/mayan/apps/appearance/templates/appearance/generic_list_items_subtemplate.html b/mayan/apps/appearance/templates/appearance/generic_list_items_subtemplate.html index dfcba688e8..69b323c114 100644 --- a/mayan/apps/appearance/templates/appearance/generic_list_items_subtemplate.html +++ b/mayan/apps/appearance/templates/appearance/generic_list_items_subtemplate.html @@ -87,14 +87,40 @@ {% endfor %} {% if not hide_links %} -

- {% get_menu_links name='object' source=object as resolved_links %} - {% for object_navigation_links in resolved_links %} - {% with 'true' as as_dropdown %} - {% include 'navigation/generic_navigation.html' %} - {% endwith %} - {% endfor %} -

+ + {% navigation_resolve_menus names='list facet,object' source=object as facet_menus_link_results %} + + {% if facet_menus_link_results %} + + {% endif %} {% endif %}
diff --git a/mayan/apps/appearance/templates/appearance/generic_list_subtemplate.html b/mayan/apps/appearance/templates/appearance/generic_list_subtemplate.html index 4b1d0e2cd9..77b7cf589d 100644 --- a/mayan/apps/appearance/templates/appearance/generic_list_subtemplate.html +++ b/mayan/apps/appearance/templates/appearance/generic_list_subtemplate.html @@ -96,13 +96,29 @@ {% endfor %} {% if not hide_links %} - {% get_menu_links 'object' source=object as resolved_links %} - {% for object_navigation_links in resolved_links %} - {% with 'true' as horizontal %} - {% with 'true' as hide_icon %} - {% include 'navigation/generic_navigation.html' %} - {% endwith %} - {% endwith %} + {% navigation_resolve_menu name='list facet' sort_results=True source=object as facet_menus_results %} + {% for facet_menu_results in facet_menus_results %} + {% for link_group in facet_menu_results.link_groups %} + {% with link_group.links as object_navigation_links %} + {% with 'true' as horizontal %} + {% with 'true' as hide_icon %} + {% include 'navigation/generic_navigation.html' %} + {% endwith %} + {% endwith %} + {% endwith %} + {% endfor %} + {% endfor %} + {% navigation_resolve_menu name='object' source=object as object_menus_results %} + {% for object_menu_results in object_menus_results %} + {% for link_group in object_menu_results.link_groups %} + {% with link_group.links as object_navigation_links %} + {% with 'true' as horizontal %} + {% with 'true' as hide_icon %} + {% include 'navigation/generic_navigation.html' %} + {% endwith %} + {% endwith %} + {% endwith %} + {% endfor %} {% endfor %} {% endif %} diff --git a/mayan/apps/appearance/templates/appearance/main_menu.html b/mayan/apps/appearance/templates/appearance/main_menu.html index 59f9074b05..5d41c7ee1b 100644 --- a/mayan/apps/appearance/templates/appearance/main_menu.html +++ b/mayan/apps/appearance/templates/appearance/main_menu.html @@ -16,6 +16,25 @@