mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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 <njoseph@riseup.net> [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 <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
3e619d6882
commit
7cbaec3e26
@ -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 %}
|
||||
|
||||
@ -17,13 +17,4 @@
|
||||
#
|
||||
{% endcomment %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
<li>
|
||||
<a href="{% url 'help:index' %}" title="{% trans "Help" %}">
|
||||
<span class="fa fa-question-circle nav-icon"></span>
|
||||
<span class="nav-text hidden-sm hidden-md hidden-lg">
|
||||
{% trans "Help" %}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% include "help-menu.html" %}
|
||||
|
||||
@ -141,51 +141,7 @@
|
||||
{% block mainmenu_right %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<li class="dropdown">
|
||||
<a href="{% url 'help:index' %}" title="{% trans "Help" %}"
|
||||
class="dropdown-toggle" data-toggle="dropdown"
|
||||
role="button" aria-expanded="false" aria-expanded="false">
|
||||
<span class="fa fa-question-circle nav-icon"></span>
|
||||
<span class="nav-text hidden-sm hidden-md hidden-lg">
|
||||
{% trans "Help" %}
|
||||
</span>
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="{% url 'help:manual' %}"
|
||||
title="{% trans "Manual"%}">
|
||||
{% trans "Manual" %}
|
||||
</a>
|
||||
</li>
|
||||
<li role="separator" class="divider hidden-xs"></li>
|
||||
<li>
|
||||
<a href="{% url 'help:support' %}"
|
||||
title="{% trans "Get Support" %}">
|
||||
{% trans "Get Support" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'help:feedback' %}"
|
||||
title="{% trans "Submit Feedback" %}">
|
||||
{% trans "Submit Feedback" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'help:contribute' %}"
|
||||
title="{% trans "Contribute" %}">
|
||||
{% trans "Contribute" %}
|
||||
</a>
|
||||
</li>
|
||||
<li role="separator" class="divider hidden-xs"></li>
|
||||
<li>
|
||||
<a href="{% url 'help:about' %}"
|
||||
title="{% trans "About" %}">
|
||||
{% trans "About" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{% include "help-menu.html" %}
|
||||
<li class="dropdown">
|
||||
<a href="{% url 'users:edit' request.user.username %}"
|
||||
class="dropdown-toggle" data-toggle="dropdown"
|
||||
|
||||
66
plinth/templates/help-menu.html
Normal file
66
plinth/templates/help-menu.html
Normal file
@ -0,0 +1,66 @@
|
||||
{% comment %}
|
||||
#
|
||||
# This file is part of FreedomBox.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
{% endcomment %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="{% url 'help:index' %}" title="{% trans "Help" %}"
|
||||
class="dropdown-toggle" data-toggle="dropdown"
|
||||
role="button" aria-expanded="false" aria-expanded="false">
|
||||
<span class="fa fa-question-circle nav-icon"></span>
|
||||
<span class="nav-text hidden-sm hidden-md hidden-lg">
|
||||
{% trans "Help" %}
|
||||
</span>
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="{% url 'help:manual' %}"
|
||||
title="{% trans "Manual"%}">
|
||||
{% trans "Manual" %}
|
||||
</a>
|
||||
</li>
|
||||
<li role="separator" class="divider hidden-xs"></li>
|
||||
<li>
|
||||
<a href="{% url 'help:support' %}"
|
||||
title="{% trans "Get Support" %}">
|
||||
{% trans "Get Support" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'help:feedback' %}"
|
||||
title="{% trans "Submit Feedback" %}">
|
||||
{% trans "Submit Feedback" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'help:contribute' %}"
|
||||
title="{% trans "Contribute" %}">
|
||||
{% trans "Contribute" %}
|
||||
</a>
|
||||
</li>
|
||||
<li role="separator" class="divider hidden-xs"></li>
|
||||
<li>
|
||||
<a href="{% url 'help:about' %}"
|
||||
title="{% trans "About" %}">
|
||||
{% trans "About" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
Loading…
x
Reference in New Issue
Block a user