mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-13 10:30:16 +00:00
help: only show help pages if user is logged in
This commit is contained in:
parent
4f47f4e37d
commit
8ae6fbbd4c
@ -24,7 +24,6 @@ from apt.cache import Cache
|
||||
from django.http import Http404
|
||||
from django.template.response import TemplateResponse
|
||||
from django.utils.translation import ugettext as _, ugettext_lazy
|
||||
from stronghold.decorators import public
|
||||
|
||||
from plinth import cfg, __version__
|
||||
from plinth.menu import main_menu
|
||||
@ -42,14 +41,12 @@ def init():
|
||||
100)
|
||||
|
||||
|
||||
@public
|
||||
def index(request):
|
||||
"""Serve the index page"""
|
||||
return TemplateResponse(request, 'help_index.html',
|
||||
{'title': _('Documentation and FAQ')})
|
||||
|
||||
|
||||
@public
|
||||
def about(request):
|
||||
"""Serve the about page"""
|
||||
cache = Cache()
|
||||
@ -63,7 +60,6 @@ def about(request):
|
||||
return TemplateResponse(request, 'help_about.html', context)
|
||||
|
||||
|
||||
@public
|
||||
def manual(request):
|
||||
"""Serve the manual page from the 'doc' directory"""
|
||||
try:
|
||||
|
||||
@ -119,13 +119,13 @@
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% block mainmenu_right %}
|
||||
<li>
|
||||
<a href="{% url 'help:index' %}" title="{% trans "Help" %}">
|
||||
<span class="glyphicon-question-sign glyphicon nav-icon"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<li>
|
||||
<a href="{% url 'help:index' %}" title="{% trans "Help" %}">
|
||||
<span class="glyphicon-question-sign glyphicon nav-icon"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="{% url 'users:edit' user.username %}"
|
||||
class="dropdown-toggle" data-toggle="dropdown"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user