diff options
| -rw-r--r-- | module/config/default.py | 1 | ||||
| -rw-r--r-- | module/web/pyload_app.py | 4 | ||||
| -rw-r--r-- | module/web/utils.py | 5 | ||||
| -rw-r--r-- | module/web/webinterface.py | 3 | 
4 files changed, 6 insertions, 7 deletions
| diff --git a/module/config/default.py b/module/config/default.py index fc221ed3a..085061653 100644 --- a/module/config/default.py +++ b/module/config/default.py @@ -65,7 +65,6 @@ def make_config(config):      config.addConfigSection("webinterface", _("Webinterface"), _("Description"), _("Long description"),          [              ("template", "str", _("Template"), _("Tooltip"), "default"), -            ("template_mobile", "str", _("Template_Mobile"), _("Tooltip"), "default_mobile"),              ("activated", "bool", _("Activated"), _("Tooltip"), True),              ("prefix", "str", _("Path Prefix"), _("Tooltip"), ""),              ("server", "builtin;threaded;fastcgi;lightweight", _("Server"), _("Tooltip"), "builtin"), diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py index 92ad88944..7be4975a7 100644 --- a/module/web/pyload_app.py +++ b/module/web/pyload_app.py @@ -131,12 +131,12 @@ def logout():  @route("/queue")  @login_required() -def index(api): +def queue(api):      return render_to_response("queue.html", proc=[pre_processor])  @route("/settings")  @login_required() -def index(api): +def settings(api):      return render_to_response("settings.html", proc=[pre_processor])  @route("/") diff --git a/module/web/utils.py b/module/web/utils.py index 1a15a8a00..d0c782b68 100644 --- a/module/web/utils.py +++ b/module/web/utils.py @@ -19,13 +19,14 @@  import re  from bottle import request, HTTPError, redirect, ServerAdapter -from webinterface import env, TEMPLATE, TEMPLATE_MOBILE, PYLOAD +from webinterface import env, TEMPLATE, PYLOAD +  # TODO: useful but needs a rewrite, too  def render_to_response(name, args={}, proc=[]):      for p in proc:          args.update(p())      if is_mobile(): -        t = env.get_or_select_template((TEMPLATE_MOBILE + "/" + name,"default_mobile/" + name)) +        t = env.get_or_select_template(("mobile/" + name,))      else:          t = env.get_or_select_template((TEMPLATE + "/" + name, "default/" + name))      return t.render(**args) diff --git a/module/web/webinterface.py b/module/web/webinterface.py index 1bff21dbc..76d58e0e4 100644 --- a/module/web/webinterface.py +++ b/module/web/webinterface.py @@ -58,7 +58,6 @@ from module.common.JsEngine import JsEngine  JS = JsEngine()  TEMPLATE = config.get('webinterface', 'template') -TEMPLATE_MOBILE = config.get('webinterface', 'template_mobile')  DL_ROOT = config.get('general', 'download_folder')  LOG_ROOT = config.get('log', 'log_folder')  PREFIX = config.get('webinterface', 'prefix') @@ -78,7 +77,7 @@ if not exists(cache):  bcc = FileSystemBytecodeCache(cache, '%s.cache')  loader = PrefixLoader({      "default": FileSystemLoader(join(PROJECT_DIR, "templates", "default")), -    "default_mobile": FileSystemLoader(join(PROJECT_DIR, "templates", "default_mobile")), +    "mobile": FileSystemLoader(join(PROJECT_DIR, "templates", "mobile")),      'js': FileSystemLoader(join(PROJECT_DIR, 'media', 'js'))  }) | 
