begin adding support for a base config parameter
This commit is contained in:
parent
e5c734fb05
commit
a69ed83e25
|
@ -3,23 +3,23 @@
|
||||||
<head>
|
<head>
|
||||||
<title>Deluge: Web UI ${version}</title>
|
<title>Deluge: Web UI ${version}</title>
|
||||||
|
|
||||||
<link rel="shortcut icon" href="/icons/deluge.png" type="image/png" />
|
<link rel="shortcut icon" href="${base}icons/deluge.png" type="image/png" />
|
||||||
<link rel="icon" href="/icons/deluge.png" type="image/png" />
|
<link rel="icon" href="${base}icons/deluge.png" type="image/png" />
|
||||||
|
|
||||||
<!-- Stylesheets -->
|
<!-- Stylesheets -->
|
||||||
% for stylesheet in stylesheets:
|
% for stylesheet in stylesheets:
|
||||||
<link rel="stylesheet" type="text/css" href="${stylesheet}" />
|
<link rel="stylesheet" type="text/css" href="${base}${stylesheet}" />
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
<!-- Javascript -->
|
<!-- Javascript -->
|
||||||
% for script in scripts:
|
% for script in scripts:
|
||||||
<script type="text/javascript" src="${script}"></script>
|
<script type="text/javascript" src="${base}${script}"></script>
|
||||||
% endfor
|
% endfor
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Deluge.debug = ${str(debug).lower()};
|
Deluge.debug = ${str(debug).lower()};
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="background-image: url('/themes/default/tree/loading.gif');"></div>
|
<div style="background-image: url('${base}themes/default/tree/loading.gif');"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -450,7 +450,6 @@ class TopLevel(resource.Resource):
|
||||||
return resource.Resource.getChild(self, path, request)
|
return resource.Resource.getChild(self, path, request)
|
||||||
|
|
||||||
def render(self, request):
|
def render(self, request):
|
||||||
|
|
||||||
debug = False
|
debug = False
|
||||||
if 'debug' in request.args:
|
if 'debug' in request.args:
|
||||||
debug_arg = request.args.get('debug')[-1]
|
debug_arg = request.args.get('debug')[-1]
|
||||||
|
@ -474,9 +473,10 @@ class TopLevel(resource.Resource):
|
||||||
else:
|
else:
|
||||||
scripts = self.scripts[:]
|
scripts = self.scripts[:]
|
||||||
|
|
||||||
|
base = request.args.get('base', [''])[-1]
|
||||||
template = Template(filename=rpath("index.html"))
|
template = Template(filename=rpath("index.html"))
|
||||||
request.setHeader("content-type", "text/html; charset=utf-8")
|
request.setHeader("content-type", "text/html; charset=utf-8")
|
||||||
return template.render(scripts=scripts, stylesheets=self.stylesheets, debug=debug)
|
return template.render(scripts=scripts, stylesheets=self.stylesheets, debug=debug, base=base)
|
||||||
|
|
||||||
class ServerContextFactory:
|
class ServerContextFactory:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue