mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-11 08:23:49 +00:00
Remove Sharing stubs
This commit is contained in:
parent
59572610ee
commit
1625a99cc2
@ -1 +0,0 @@
|
||||
installed/sharing/file_explorer.py
|
||||
@ -1,19 +0,0 @@
|
||||
import cherrypy
|
||||
from gettext import gettext as _
|
||||
from modules.auth import require
|
||||
from plugin_mount import PagePlugin
|
||||
import cfg
|
||||
import util
|
||||
|
||||
|
||||
class FileExplorer(PagePlugin):
|
||||
def __init__(self, *args, **kwargs):
|
||||
PagePlugin.__init__(self, *args, **kwargs)
|
||||
self.register_page("sharing.explorer")
|
||||
cfg.html_root.sharing.menu.add_item("File Explorer", "icon-folder-open", "/sharing/explorer", 30)
|
||||
|
||||
@cherrypy.expose
|
||||
@require()
|
||||
def index(self):
|
||||
return util.render_template(template='file_explorer',
|
||||
title=_('File Explorer'))
|
||||
@ -1,44 +0,0 @@
|
||||
import cherrypy
|
||||
from gettext import gettext as _
|
||||
from modules.auth import require
|
||||
from plugin_mount import PagePlugin
|
||||
import cfg
|
||||
import util
|
||||
|
||||
|
||||
class Sharing(PagePlugin):
|
||||
order = 9 # order of running init in PagePlugins
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
PagePlugin.__init__(self, *args, **kwargs)
|
||||
self.register_page("sharing")
|
||||
self.menu = cfg.main_menu.add_item("Sharing", "icon-share-alt", "/sharing", 35)
|
||||
self.menu.add_item("File Server", "icon-inbox", "/sharing/files", 10)
|
||||
|
||||
@cherrypy.expose
|
||||
def index(self):
|
||||
"""This isn't an internal redirect, because we need the url to
|
||||
reflect that we've moved down into the submenu hierarchy.
|
||||
Otherwise, it's hard to know which menu portion to make active
|
||||
or expand or contract."""
|
||||
raise cherrypy.HTTPRedirect(cfg.server_dir + '/sharing/files')
|
||||
|
||||
@cherrypy.expose
|
||||
@require()
|
||||
def files(self):
|
||||
return util.render_template(template='sharing',
|
||||
title=_('File Server'))
|
||||
|
||||
|
||||
#TODO: move PrinterSharing to another file, as it should be an optional module (most people don't care about printer sharing)
|
||||
class PrinterSharing(PagePlugin):
|
||||
def __init__(self, *args, **kwargs):
|
||||
PagePlugin.__init__(self, *args, **kwargs)
|
||||
self.register_page("sharing.printer")
|
||||
cfg.html_root.sharing.menu.add_item("Printer Sharing", "icon-print", "/sharing/printer", 35)
|
||||
|
||||
@cherrypy.expose
|
||||
@require()
|
||||
def index(self):
|
||||
return util.render_template(template='sharing_printer',
|
||||
title=_('Printer Sharing'))
|
||||
@ -1,42 +0,0 @@
|
||||
{% extends 'login_nav.html' %}
|
||||
{% comment %}
|
||||
#
|
||||
# This file is part of Plinth.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
{% endcomment %}
|
||||
|
||||
{% block main_block %}
|
||||
|
||||
<p>File explorer for users that also have shell accounts.</p> <p>Until
|
||||
that is written (and it will be a while), we should
|
||||
install <a href="http://www.mollify.org/demo.php">mollify</a>
|
||||
or <a href="http://www.ajaxplorer.info/wordpress/demo/">ajaxplorer</a>,
|
||||
but of which seem to have some support for playing media files in the
|
||||
browser (as opposed to forcing users to download and play them
|
||||
locally). The downsides to third-party explorers are: they're don't
|
||||
fit within our theme system, they require separate login, and they're
|
||||
written in php, which will make integrating them hard.</p>
|
||||
|
||||
<p>There are, of course, many other options for php-based file
|
||||
explorers. These were the ones I saw that might do built-in media
|
||||
players.</p>
|
||||
|
||||
<p>For python-friendly options, check out <a
|
||||
href="http://blogfreakz.com/jquery/web-based-filemanager/">FileManager</a>.
|
||||
It appears to be mostly javascript with some bindings to make it
|
||||
python-friendly.</p>
|
||||
|
||||
{% endblock %}
|
||||
@ -1,33 +0,0 @@
|
||||
{% extends "login_nav.html" %}
|
||||
{% comment %}
|
||||
#
|
||||
# This file is part of Plinth.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
{% endcomment %}
|
||||
|
||||
{% 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 %}
|
||||
@ -1,37 +0,0 @@
|
||||
{% extends "login_nav.html" %}
|
||||
{% comment %}
|
||||
#
|
||||
# This file is part of Plinth.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
{% endcomment %}
|
||||
|
||||
{% 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 %}
|
||||
@ -1 +0,0 @@
|
||||
installed/sharing/sharing.py
|
||||
Loading…
x
Reference in New Issue
Block a user