mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
Convert sharing pages to templates
This commit is contained in:
parent
4e4ca43b40
commit
ef7da7527d
@ -26,14 +26,9 @@ class Sharing(PagePlugin):
|
||||
@cherrypy.expose
|
||||
@require()
|
||||
def files(self):
|
||||
return util.render_template(title="File Server", main='',
|
||||
sidebar_right=_("""
|
||||
<strong>Freedom NAS</strong><p> The %s can make your spare hard drives accessible to your
|
||||
local network, thus acting as a NAS server. We currently support
|
||||
sharing files via NFS and SMB.
|
||||
return util.render_template(template='sharing',
|
||||
title=_('File Server'))
|
||||
|
||||
TODO: this is not true. We currently support no sharing.</p>
|
||||
""" % cfg.box_name))
|
||||
|
||||
#TODO: move PrinterSharing to another file, as it should be an optional module (most people don't care about printer sharing)
|
||||
class PrinterSharing(PagePlugin):
|
||||
@ -45,13 +40,5 @@ class PrinterSharing(PagePlugin):
|
||||
@cherrypy.expose
|
||||
@require()
|
||||
def index(self):
|
||||
main = """
|
||||
<p>TODO: Setup and install SAMBA</p>
|
||||
<p>TODO: Setup and install CUPS</p>
|
||||
"""
|
||||
return util.render_template(title="Printer Sharing", main=main,
|
||||
sidebar_right="""
|
||||
<strong>Share Your Printer</strong><p> The %s can share your printer via Samba and CUPS.</p>
|
||||
""" % cfg.box_name)
|
||||
|
||||
|
||||
return util.render_template(template='sharing_printer',
|
||||
title=_('Printer Sharing'))
|
||||
|
||||
15
modules/installed/sharing/templates/sharing.html
Normal file
15
modules/installed/sharing/templates/sharing.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends "login_nav.html" %}
|
||||
|
||||
{% block sidebar_right_block %}
|
||||
|
||||
<div class="well sidebar-nav">
|
||||
<h3>Freedom NAS</h3>
|
||||
|
||||
<p> The {{ cfg.box_name }} can make your spare hard drives
|
||||
accessible to your local network, thus acting as a NAS server. We
|
||||
currently support sharing files via NFS and SMB.</p>
|
||||
|
||||
<p>TODO: this is not true. We currently support no sharing.</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
19
modules/installed/sharing/templates/sharing_printer.html
Normal file
19
modules/installed/sharing/templates/sharing_printer.html
Normal file
@ -0,0 +1,19 @@
|
||||
{% extends "login_nav.html" %}
|
||||
|
||||
{% block main_block %}
|
||||
|
||||
<p>TODO: Setup and install SAMBA</p>
|
||||
<p>TODO: Setup and install CUPS</p>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar_right_block %}
|
||||
|
||||
<div class="well sidebar-nav">
|
||||
<h3>Share Your Printer</h3>
|
||||
|
||||
<p> The {{ cfg.box_name }} can share your printer via Samba and
|
||||
CUPS.</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Loading…
x
Reference in New Issue
Block a user