mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
Convert file explorer page to template
This commit is contained in:
parent
c50fe72587
commit
4e4ca43b40
@ -1,4 +1,5 @@
|
||||
import cherrypy
|
||||
from gettext import gettext as _
|
||||
from modules.auth import require
|
||||
from plugin_mount import PagePlugin
|
||||
import cfg
|
||||
@ -14,24 +15,5 @@ class FileExplorer(PagePlugin):
|
||||
@cherrypy.expose
|
||||
@require()
|
||||
def index(self):
|
||||
main = """
|
||||
<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>
|
||||
"""
|
||||
return util.render_template(title="File Explorer", main=main)
|
||||
return util.render_template(template='file_explorer',
|
||||
title=_('File Explorer'))
|
||||
|
||||
24
modules/installed/sharing/templates/file_explorer.html
Normal file
24
modules/installed/sharing/templates/file_explorer.html
Normal file
@ -0,0 +1,24 @@
|
||||
{% extends 'login_nav.html' %}
|
||||
|
||||
{% 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 %}
|
||||
Loading…
x
Reference in New Issue
Block a user