mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
...
This commit is contained in:
commit
35071d7212
78 files changed
+5570
No files matched your search
@@ -0,0 +1,91 @@
|
||||
import os
|
||||
import cherrypy
|
||||
from gettext import gettext as _
|
||||
from plugin_mount import PagePlugin
|
||||
import cfg
|
||||
class Help(PagePlugin):
|
||||
def __init__(self, *args, **kwargs):
|
||||
PagePlugin.__init__(self, *args, **kwargs)
|
||||
self.register_page("help")
|
||||
self.menu = cfg.main_menu.add_item(_("Documentation and FAQ"), "/help", 101)
|
||||
self.menu.add_item(_("Where to Get Help"), "/help/index", 5)
|
||||
self.menu.add_item(_("Developer's Manual"), "/help/view/plinth", 10)
|
||||
self.menu.add_item(_("FAQ"), "/help/view/faq", 20)
|
||||
self.menu.add_item(_("%s Wiki" % cfg.box_name), "http://wiki.debian.org/FreedomBox", 30)
|
||||
self.menu.add_item(_("Design and Architecture"), "/help/view/design", 40)
|
||||
self.menu.add_item(_("About"), "/help/about", 100)
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self):
|
||||
main="""
|
||||
<p>There are a variety of places to go for help with Plinth
|
||||
and the box it runs on.</p>
|
||||
|
||||
<p>This front end has a <a
|
||||
href="/help/view/plinth">developer's manual</a>. It isn't
|
||||
complete, but it is the first place to look. Feel free to
|
||||
offer suggestions, edits, and screenshots for completing
|
||||
it!</p>
|
||||
|
||||
<p><a href="http://wiki.debian.org/FreedomBox">A section of
|
||||
the Debian wiki</a> is devoted to the %(box)s. At some
|
||||
point the documentation in the wiki and the documentation in
|
||||
the manual should dovetail.</p>
|
||||
|
||||
<p>I have collected some of my thoughts about the %(box)s
|
||||
in a <a href="/help/view/design">document focused on its
|
||||
design and architecture</a>.</p>
|
||||
|
||||
<p>There
|
||||
are Debian gurus in the \#debian channels of both
|
||||
irc.freenode.net and irc.oftc.net. They probably don't know
|
||||
much about the %(box)s 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="/help/view/faq">FAQ</a> because
|
||||
the question frequency is currently zero for all
|
||||
questions.</p>
|
||||
""" % {'box':cfg.box_name}
|
||||
return self.fill_template(title="Documentation and FAQ", main=main)
|
||||
|
||||
@cherrypy.expose
|
||||
def about(self):
|
||||
return self.fill_template(title=_("About the %s" % cfg.box_name), main="""
|
||||
<p> We live in a world where our use of the network is
|
||||
mediated by organizations that often do not have our best
|
||||
interests at heart. By building software that does not rely on
|
||||
a central service, we can regain control and privacy. By
|
||||
keeping our data in our homes, we gain useful legal
|
||||
protections over it. By giving back power to the users over
|
||||
their networks and machines, we are returning the Internet to
|
||||
its intended peer-to-peer architecture.</p>
|
||||
|
||||
<p>In order to bring about the new network order, it is
|
||||
paramount that it is easy to convert to it. The hardware it
|
||||
runs on must be cheap. The software it runs on must be easy to
|
||||
install and administrate by anybody. It must be easy to
|
||||
transition from existing services.</p>
|
||||
|
||||
<p>There are a number of projects working to realize a future
|
||||
of distributed services; we aim to bring them all together in
|
||||
a convenient package.</p>
|
||||
|
||||
<p>For more information about the Freedom Box project, see the
|
||||
<a href="http://wiki.debian.org/FreedomBox">Debian
|
||||
Wiki</a>.</p>""")
|
||||
|
||||
class View(PagePlugin):
|
||||
def __init__(self, *args, **kwargs):
|
||||
PagePlugin.__init__(self, *args, **kwargs)
|
||||
self.register_page("help.view")
|
||||
|
||||
@cherrypy.expose
|
||||
def default(self, page=''):
|
||||
if page not in ['design', 'plinth', 'hacking', 'faq']:
|
||||
raise cherrypy.HTTPError(404, "The path '/help/view/%s' was not found." % page)
|
||||
return self.fill_template(template="err", main="<p>Sorry, as much as I would like to show you that page, I don't seem to have a page named %s!</p>" % page)
|
||||
IF = open(os.path.join("doc", "%s.part.html" % page), 'r')
|
||||
main = IF.read()
|
||||
IF.close()
|
||||
return self.fill_template(template="two_col", title=_("%s Documentation" % cfg.product_name), main=main)
|
||||
Reference in new issue
Block a user