From 607be5ad2a1d3b0afe5e2356b57283a8edd03528 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 14 Apr 2020 12:54:55 +0530 Subject: [PATCH 1/2] feat: add sidebar items to navbar in mobile --- .../includes/navbar/navbar_items.html | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/frappe/templates/includes/navbar/navbar_items.html b/frappe/templates/includes/navbar/navbar_items.html index 10d484df65..4e5ad0dd0a 100644 --- a/frappe/templates/includes/navbar/navbar_items.html +++ b/frappe/templates/includes/navbar/navbar_items.html @@ -64,6 +64,24 @@ {% if not only_static %} {% block navbar_right_extension %}{% endblock %} {% endif %} + + {% if show_sidebar %} +
+
+ {% for item in sidebar_items -%} + + {%- endfor %} +
+
+ {% endif %} + {% include "templates/includes/navbar/navbar_search.html" %} {% include "templates/includes/navbar/navbar_login.html" %} - + \ No newline at end of file From 7e0e2da3bdac0cf839030e469063a6c2a4275ffb Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 16 Apr 2020 19:17:58 +0530 Subject: [PATCH 2/2] fix: render template if items exists --- frappe/templates/includes/navbar/navbar_items.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/templates/includes/navbar/navbar_items.html b/frappe/templates/includes/navbar/navbar_items.html index 4e5ad0dd0a..352fc23bbd 100644 --- a/frappe/templates/includes/navbar/navbar_items.html +++ b/frappe/templates/includes/navbar/navbar_items.html @@ -65,7 +65,7 @@ {% block navbar_right_extension %}{% endblock %} {% endif %} - {% if show_sidebar %} + {% if show_sidebar and sidebar_items %}

{% for item in sidebar_items -%} @@ -84,4 +84,4 @@ {% include "templates/includes/navbar/navbar_search.html" %} {% include "templates/includes/navbar/navbar_login.html" %} - \ No newline at end of file +