mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
help: Serve FreedomBox manual
- Remove FAQ menu entry - Remove Wiki entry and place a link from index page. - Update index content to point to IRC, wiki, manual and mailing list.
This commit is contained in:
parent
78fb03f9cc
commit
38fe07cd93
@ -28,7 +28,6 @@ import stat
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
import cherrypy
|
import cherrypy
|
||||||
from cherrypy import _cpserver
|
|
||||||
from cherrypy.process.plugins import Daemonizer
|
from cherrypy.process.plugins import Daemonizer
|
||||||
|
|
||||||
from plinth import cfg
|
from plinth import cfg
|
||||||
@ -123,6 +122,16 @@ def setup_server():
|
|||||||
cherrypy.tree.mount(None, js_url, config)
|
cherrypy.tree.mount(None, js_url, config)
|
||||||
logger.debug('Serving javascript directory %s on %s', js_dir, js_url)
|
logger.debug('Serving javascript directory %s on %s', js_dir, js_url)
|
||||||
|
|
||||||
|
manual_dir = os.path.join(cfg.doc_dir, 'images')
|
||||||
|
manual_url = '/'.join([cfg.server_dir, 'help/manual/images']) \
|
||||||
|
.replace('//', '/')
|
||||||
|
config = {
|
||||||
|
'/': {'tools.staticdir.root': manual_dir,
|
||||||
|
'tools.staticdir.on': True,
|
||||||
|
'tools.staticdir.dir': '.'}}
|
||||||
|
cherrypy.tree.mount(None, manual_url, config)
|
||||||
|
logger.debug('Serving manual images %s on %s', manual_dir, manual_url)
|
||||||
|
|
||||||
for module_import_path in module_loader.loaded_modules:
|
for module_import_path in module_loader.loaded_modules:
|
||||||
module = importlib.import_module(module_import_path)
|
module = importlib.import_module(module_import_path)
|
||||||
module_name = module_import_path.split('.')[-1]
|
module_name = module_import_path.split('.')[-1]
|
||||||
|
|||||||
@ -34,12 +34,8 @@ def init():
|
|||||||
'help:index', 101)
|
'help:index', 101)
|
||||||
menu.add_urlname(_('Where to Get Help'), 'glyphicon-search',
|
menu.add_urlname(_('Where to Get Help'), 'glyphicon-search',
|
||||||
'help:index_explicit', 5)
|
'help:index_explicit', 5)
|
||||||
menu.add_urlname(_('Developer\'s Manual'), 'glyphicon-info-sign',
|
menu.add_urlname(_('FreedomBox Manual'), 'glyphicon-info-sign',
|
||||||
'help:helppage', 10, url_args=('plinth',))
|
'help:manual', 10)
|
||||||
menu.add_urlname(_('FAQ'), 'glyphicon-question-sign', 'help:helppage', 20,
|
|
||||||
url_args=('faq',))
|
|
||||||
menu.add_item(_('%s Wiki' % cfg.box_name), 'glyphicon-pencil',
|
|
||||||
'http://wiki.debian.org/FreedomBox', 30)
|
|
||||||
menu.add_urlname(_('About'), 'glyphicon-star', 'help:about', 100)
|
menu.add_urlname(_('About'), 'glyphicon-star', 'help:about', 100)
|
||||||
|
|
||||||
|
|
||||||
@ -61,15 +57,15 @@ def about(request):
|
|||||||
|
|
||||||
|
|
||||||
@public
|
@public
|
||||||
def helppage(request, page):
|
def manual(request):
|
||||||
"""Serve a help page from the 'doc' directory"""
|
"""Serve the manual page from the 'doc' directory"""
|
||||||
try:
|
try:
|
||||||
with open(os.path.join(cfg.doc_dir, '%s.part.html' % page), 'r') \
|
with open(os.path.join(cfg.doc_dir, 'freedombox-manual.part.html'), 'r') \
|
||||||
as input_file:
|
as input_file:
|
||||||
content = input_file.read()
|
content = input_file.read()
|
||||||
except IOError:
|
except IOError:
|
||||||
raise Http404
|
raise Http404
|
||||||
|
|
||||||
title = _('%s Documentation') % cfg.product_name
|
return TemplateResponse(request, 'help_manual.html',
|
||||||
return TemplateResponse(request, 'help_detail.html',
|
{'title': _('FreedomBox Manual'),
|
||||||
{'title': title, 'content': content})
|
'content': content})
|
||||||
|
|||||||
@ -22,26 +22,20 @@
|
|||||||
|
|
||||||
<h2>Help</h2>
|
<h2>Help</h2>
|
||||||
|
|
||||||
<p>There are a variety of places to go for help with
|
<p>The <a href={% url 'help:manual' %}>FreedomBox Manual</a> is the
|
||||||
{{ cfg.product_name }} and the box it runs on.</p>
|
best place to start for information regarding {{ cfg.box_name }}.</p>
|
||||||
|
|
||||||
<p>This front end has a <a href="{% url 'help:helppage' 'plinth' %}">
|
<p><a href="http://wiki.debian.org/FreedomBox"
|
||||||
developer's manual</a>. It isn't complete, but it is the first place
|
target="_blank">FreedomBox project wiki </a> contains further
|
||||||
to look. Feel free to offer suggestions, edits, and screenshots for
|
information.</p>
|
||||||
completing it!</p>
|
|
||||||
|
|
||||||
<p><a href="http://wiki.debian.org/FreedomBox" target="_blank">A
|
<p>To seek help from FreedomBox community, queries may be posted on
|
||||||
section of the Debian wiki</a> is devoted to the {{ cfg.box_name }}.
|
the
|
||||||
At some point the documentation in the wiki and the documentation in
|
<a href="https://lists.alioth.debian.org/mailman/listinfo/freedombox-discuss">
|
||||||
the manual should dovetail.</p>
|
mailing list</a>. The list archives also contain information about
|
||||||
|
problems faced by other users and possible solutions.</p>
|
||||||
|
|
||||||
<p>There are Debian gurus in the #debian channels of both
|
<p>Many FreedomBox contributors and users are also available on the
|
||||||
irc.freenode.net and irc.oftc.net. They probably don't know much
|
#freedombox channel of the irc.oftc.net IRC network.</p>
|
||||||
about the {{ cfg.box_name }} and almost surely know nothing of this
|
|
||||||
front end, but they are an incredible resource for general Debian
|
|
||||||
issues.</p>
|
|
||||||
|
|
||||||
<p>There is no <a href="{% url 'help:helppage' 'faq' %}">FAQ</a> because
|
|
||||||
the question frequency is currently zero for all questions.</p>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -18,6 +18,14 @@
|
|||||||
#
|
#
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% block page_head %}
|
||||||
|
<style type="text/css">
|
||||||
|
dd {
|
||||||
|
margin-left: 30px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{{ content|safe }}
|
{{ content|safe }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -30,5 +30,5 @@ urlpatterns = patterns( # pylint: disable-msg=C0103
|
|||||||
url(r'^help/$', 'index', name='index'),
|
url(r'^help/$', 'index', name='index'),
|
||||||
url(r'^help/index/$', 'index', name='index_explicit'),
|
url(r'^help/index/$', 'index', name='index_explicit'),
|
||||||
url(r'^help/about/$', 'about', name='about'),
|
url(r'^help/about/$', 'about', name='about'),
|
||||||
url(r'^help/page/(plinth|hacking|faq)/$', 'helppage', name='helppage'),
|
url(r'^help/manual/$', 'manual', name='manual'),
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user