From 7cbaec3e26d4daffc59dd791607c18bb57c36813 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Fri, 13 Sep 2019 07:47:25 +0530 Subject: [PATCH] firstboot: Add new help menu to firstboot navbar - Refactor the help menu into a django template include. - Show help menu if user is logged in, instead of after completing firstboot. Closes: #1517 Signed-off-by: Joseph Nuthalapati [sunil@medhas.org Rename help-menu.inc to help-menu.inc] [sunil@medhas.org Use user.is_authenticated instead of another variable] Signed-off-by: Sunil Mohan Adapa Reviewed-by: Sunil Mohan Adapa --- .../first_boot/templates/base_firstboot.html | 6 +- .../templates/firstboot_navbar.html | 11 +--- plinth/templates/base.html | 46 +------------ plinth/templates/help-menu.html | 66 +++++++++++++++++++ 4 files changed, 71 insertions(+), 58 deletions(-) create mode 100644 plinth/templates/help-menu.html diff --git a/plinth/modules/first_boot/templates/base_firstboot.html b/plinth/modules/first_boot/templates/base_firstboot.html index 78b28ea10..06780bd4d 100644 --- a/plinth/modules/first_boot/templates/base_firstboot.html +++ b/plinth/modules/first_boot/templates/base_firstboot.html @@ -29,7 +29,7 @@ {% endblock %} {% block mainmenu_right %} - {% if firstboot_complete %} - {% include "firstboot_navbar.html" %} - {% endif %} + {% if user.is_authenticated %} + {% include "firstboot_navbar.html" %} + {% endif %} {% endblock %} diff --git a/plinth/modules/first_boot/templates/firstboot_navbar.html b/plinth/modules/first_boot/templates/firstboot_navbar.html index a3a8b4ea6..6317f2874 100644 --- a/plinth/modules/first_boot/templates/firstboot_navbar.html +++ b/plinth/modules/first_boot/templates/firstboot_navbar.html @@ -17,13 +17,4 @@ # {% endcomment %} -{% load i18n %} - -
  • - - - - -
  • +{% include "help-menu.html" %} diff --git a/plinth/templates/base.html b/plinth/templates/base.html index ad69921e9..87b2c93d6 100644 --- a/plinth/templates/base.html +++ b/plinth/templates/base.html @@ -141,51 +141,7 @@ {% block mainmenu_right %} {% if user.is_authenticated %} - + {% include "help-menu.html" %}