Remove unnecessary layer of abstraction over template rendering

This commit is contained in:
Sunil Mohan Adapa committed 2014-05-05 00:08:58 +05:30
1 parent 851536ffbe
commit 4b44741c68
23 files changed
+136 -105

No files matched your search

+6 -2
View File
@@ -4,6 +4,8 @@ from modules.auth import require
from plugin_mount import PagePlugin
from forms import Form
import cfg
import util
class Apps(PagePlugin):
def __init__(self, *args, **kwargs):
@@ -24,12 +26,14 @@ class Apps(PagePlugin):
Many of the services you use on the web could soon be on site
and under your control!</p>
""" % (cfg.product_name)
return self.fill_template(title="User Applications", main=main, sidebar_right='')
return util.render_template(title="User Applications", main=main,
sidebar_right='')
@cherrypy.expose
@require()
def photos(self):
return self.fill_template(title="Photo Gallery", main='', sidebar_right="""
return util.render_template(title="Photo Gallery", main='',
sidebar_right="""
<strong>Photo Gallery</strong><p>Your photos might well be the most valuable
digital property you have, so why trust it to companies that have no
investment in the sentimental value of your family snaps? Keep those
+4 -2
View File
@@ -6,7 +6,8 @@ from forms import Form
import actions
import cfg
import service
from util import Message
import util
class Owncloud(PagePlugin, FormPlugin):
order = 90
@@ -42,7 +43,8 @@ class Owncloud(PagePlugin, FormPlugin):
<p>ownCloud gives you universal access to your files through a web interface or WebDAV. It also provides a platform to easily view & sync your contacts, calendars and bookmarks across all your devices and enables basic editing right on the web. Installation has minimal server requirements, doesn't need special permissions and is quick. ownCloud is extendable via a simple but powerful API for applications and plugins.
</p>
"""
return self.fill_template(title="Owncloud", main=main, sidebar_right=sidebar_right)
return util.render_template(title="Owncloud", main=main,
sidebar_right=sidebar_right)
def form(self, owncloud_enable, message=None):
form = Form(title="Configuration",