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.http import Http404
|
||||||
from django.template.response import TemplateResponse
|
from django.template.response import TemplateResponse
|
||||||
from django.utils.translation import ugettext as _, ugettext_lazy
|
from django.utils.translation import ugettext as _, ugettext_lazy
|
||||||
from stronghold.decorators import public
|
|
||||||
|
|
||||||
from plinth import cfg, __version__
|
from plinth import cfg, __version__
|
||||||
from plinth.menu import main_menu
|
from plinth.menu import main_menu
|
||||||
@ -42,14 +41,12 @@ def init():
|
|||||||
100)
|
100)
|
||||||
|
|
||||||
|
|
||||||
@public
|
|
||||||
def index(request):
|
def index(request):
|
||||||
"""Serve the index page"""
|
"""Serve the index page"""
|
||||||
return TemplateResponse(request, 'help_index.html',
|
return TemplateResponse(request, 'help_index.html',
|
||||||
{'title': _('Documentation and FAQ')})
|
{'title': _('Documentation and FAQ')})
|
||||||
|
|
||||||
|
|
||||||
@public
|
|
||||||
def about(request):
|
def about(request):
|
||||||
"""Serve the about page"""
|
"""Serve the about page"""
|
||||||
cache = Cache()
|
cache = Cache()
|
||||||
@ -63,7 +60,6 @@ def about(request):
|
|||||||
return TemplateResponse(request, 'help_about.html', context)
|
return TemplateResponse(request, 'help_about.html', context)
|
||||||
|
|
||||||
|
|
||||||
@public
|
|
||||||
def manual(request):
|
def manual(request):
|
||||||
"""Serve the manual page from the 'doc' directory"""
|
"""Serve the manual page from the 'doc' directory"""
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -119,13 +119,13 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
{% block mainmenu_right %}
|
{% block mainmenu_right %}
|
||||||
|
|
||||||
|
{% if user.is_authenticated %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'help:index' %}" title="{% trans "Help" %}">
|
<a href="{% url 'help:index' %}" title="{% trans "Help" %}">
|
||||||
<span class="glyphicon-question-sign glyphicon nav-icon"></span>
|
<span class="glyphicon-question-sign glyphicon nav-icon"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% if user.is_authenticated %}
|
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="{% url 'users:edit' user.username %}"
|
<a href="{% url 'users:edit' user.username %}"
|
||||||
class="dropdown-toggle" data-toggle="dropdown"
|
class="dropdown-toggle" data-toggle="dropdown"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user