Convert sharing pages to templates

This commit is contained in:
Sunil Mohan Adapa 2014-05-08 11:04:43 +05:30
parent 4e4ca43b40
commit ef7da7527d
3 changed files with 38 additions and 17 deletions

View File

@ -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'))

View 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 %}

View 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 %}