summaryrefslogtreecommitdiffstats
path: root/module/web/templates
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-09 23:29:24 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-09 23:29:24 +0100
commitaa78d90803a68e41ea663adb623c859cae3ad91e (patch)
treec793e30df9fccdf350fcd299e70fb3c14fabc36a /module/web/templates
parentcaptcha manager fix, toggle reconnect (diff)
downloadpyload-aa78d90803a68e41ea663adb623c859cae3ad91e.tar.xz
new config page, mootools 1.3, removed old templates
Diffstat (limited to 'module/web/templates')
-rw-r--r--module/web/templates/default/base.html107
-rw-r--r--module/web/templates/default/captcha.html17
-rw-r--r--module/web/templates/default/collector.html40
-rw-r--r--module/web/templates/default/downloads.html23
-rw-r--r--module/web/templates/default/edit_package.html39
-rw-r--r--module/web/templates/default/home.html14
-rw-r--r--module/web/templates/default/login.html17
-rw-r--r--module/web/templates/default/logout.html3
-rw-r--r--module/web/templates/default/logs.html23
-rw-r--r--module/web/templates/default/package_ui.js19
-rw-r--r--module/web/templates/default/pathchooser.html48
-rw-r--r--module/web/templates/default/queue.html40
-rw-r--r--module/web/templates/default/settings.html429
-rw-r--r--module/web/templates/default/settings_item.html45
-rw-r--r--module/web/templates/default/setup.html (renamed from module/web/templates/jinja/default/setup.html)0
-rw-r--r--module/web/templates/default/window.html31
-rw-r--r--module/web/templates/jinja/default/base.html321
-rw-r--r--module/web/templates/jinja/default/captcha.html35
-rw-r--r--module/web/templates/jinja/default/collector.html84
-rw-r--r--module/web/templates/jinja/default/downloads.html50
-rw-r--r--module/web/templates/jinja/default/edit_package.html40
-rw-r--r--module/web/templates/jinja/default/home.html241
-rw-r--r--module/web/templates/jinja/default/login.html35
-rw-r--r--module/web/templates/jinja/default/logout.html9
-rw-r--r--module/web/templates/jinja/default/logs.html61
-rw-r--r--module/web/templates/jinja/default/package_ui.js408
-rw-r--r--module/web/templates/jinja/default/pathchooser.html76
-rw-r--r--module/web/templates/jinja/default/queue.html85
-rw-r--r--module/web/templates/jinja/default/settings.html235
-rw-r--r--module/web/templates/jinja/default/test.html12
-rw-r--r--module/web/templates/jinja/default/window.html45
31 files changed, 482 insertions, 2150 deletions
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index d90ef6f07..77774daf7 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -1,4 +1,3 @@
-{% load i18n %}
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,20 +5,28 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/default.css"/>
+<link rel="stylesheet" type="text/css" href="/media/default/css/default.css"/>
-<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/window.css"/>
+<link rel="stylesheet" type="text/css" href="/media/default/css/window.css"/>
-<script type="text/javascript" src="{{ MEDIA_URL }}js/funktions.js"></script>
-<script type="text/javascript" src="{{ MEDIA_URL }}js/mootools-1.2.5-core.js"></script>
-<script type="text/javascript" src="{{ MEDIA_URL }}js/mootools-1.2.4.4-more.js"></script>
+<script type="text/javascript" src="/media/default/js/funktions.js"></script>
+<script type="text/javascript" src="/media/default/js/mootools-core-1.3.1.js"></script>
+<script type="text/javascript" src="/media/default/js/mootools-more-1.3.1.1.js"></script>
-<title>{% block title %}pyLoad {% trans "Webinterface" %}{% endblock %}</title>
+<script type="text/javascript" src="/media/default/js/purr.js"></script>
+
+<title>{% block title %}pyLoad {{_("Webinterface")}}{% endblock %}</title>
<script type="text/javascript">
-var add_bg, add_box, cap_box, cap_info;
+
+var add_bg, add_box, cap_box, cap_info, notify;
document.addEvent("domready", function(){
+ notify = new Purr({
+ 'mode': 'top',
+ 'position': 'center'
+ });
+
add_bg = new Fx.Tween($('add_bg'));
add_box = new Fx.Tween($('add_box'));
cap_box = new Fx.Tween($('cap_box'));
@@ -31,9 +38,9 @@ document.addEvent("domready", function(){
$('add_form').onsubmit=function() {
$('add_form').target = 'upload_target';
- if ($('add_name').value == "" && $('add_file').value != " "){
- alert("{% trans "Please Enter a packagename." %}");
- return false
+ if ($('add_name').value == "" && $('add_file').value == ""){
+ alert("{{_("Please Enter a packagename.")}}");
+ return false;
}else{
out();
}
@@ -92,26 +99,31 @@ function LoadJsonToContent(data)
$("aktiv_from").set('text', data.queue);
if (data.captcha){
- $("cap_info").setStyle('display', 'inline');
+ if($("cap_info").getStyle("display") != "inline"){
+ $("cap_info").setStyle('display', 'inline');
+ notify.alert('{{_("New Captcha Request")}}', {
+ 'className': 'notify'
+ });
+ }
}else{
$("cap_info").setStyle('display', 'none');
}
if (data.download) {
- $("time").set('text', " {% trans "on" %}");
+ $("time").set('text', " {{_("on")}}");
$("time").setStyle('background-color', "#8ffc25");
}else{
- $("time").set('text', " {% trans "off" %}");
+ $("time").set('text', " {{_("off")}}");
$("time").setStyle('background-color', "#fc6e26");
}
if (data.reconnect){
- $("reconnect").set('text', " {% trans "on" %}");
+ $("reconnect").set('text', " {{_("on")}}");
$("reconnect").setStyle('background-color', "#8ffc25");
}
else{
- $("reconnect").set('text', " {% trans "off" %}");
+ $("reconnect").set('text', " {{_("off")}}");
$("reconnect").setStyle('background-color', "#fc6e26");
}
}
@@ -159,12 +171,12 @@ function load_cap(method, post){
if (data.captcha){
$('cap_img').set('src', data.src);
$('cap_span').setStyle('display', 'block');
- $$('#cap_form p')[0].set('text', '{% trans "Please read the text on the captcha." %}');
+ $$('#cap_form p')[0].set('text', '{{_("Please read the text on the captcha.")}}');
$('cap_id').set('value', data.id);
} else{
$('cap_img').set('src', '');
$('cap_span').setStyle('display', 'none');
- $$('#cap_form p')[0].set('text', '{% trans "No Captchas to read." %}');
+ $$('#cap_form p')[0].set('text', '{{_("No Captchas to read.")}}');
}
},
secure: false,
@@ -202,52 +214,55 @@ function AddBox()
<div id="head-panel">
+
<div id="head-search-and-login">
+ {% block headpanel %}
{% if user.is_authenticated %}
<span id="cap_info" style="display: {% if captcha %}inline{%else%}none{% endif %}">
-<img src="{{ MEDIA_URL }}img/images.png" alt="Captcha:" style="vertical-align:middle; margin:2px" />
-<span style="font-weight: bold; cursor: pointer; margin-right: 2px;">{% trans "Captcha waiting" %}</span>
+<img src="/media/default/img/images.png" alt="Captcha:" style="vertical-align:middle; margin:2px" />
+<span style="font-weight: bold; cursor: pointer; margin-right: 2px;">{{_("Captcha waiting")}}</span>
</span>
-<img src="{{ MEDIA_URL }}img/head-login.png" alt="User:" style="vertical-align:middle; margin:2px" /><span style="padding-right: 2px;">{{user.username}}</span>
+<img src="/media/default/img/head-login.png" alt="User:" style="vertical-align:middle; margin:2px" /><span style="padding-right: 2px;">{{user.name}}</span>
<ul id="user-actions">
- <li><a href="/logout" class="action logout" rel="nofollow">{% trans "Logout" %}</a></li>
+ <li><a href="/logout" class="action logout" rel="nofollow">{{_("Logout")}}</a></li>
{% if user.is_staff %}
- <li><a href="/admin" class="action profile" rel="nofollow">{% trans "Administrate" %}</a></li>
+ <li><a href="/admin" class="action profile" rel="nofollow">{{_("Administrate")}}</a></li>
{% endif %}
</ul>
{% else %}
- <span style="padding-right: 2px;">{% trans "Please Login!" %}</span>
+ <span style="padding-right: 2px;">{{_("Please Login!")}}</span>
{% endif %}
+ {% endblock %}
</div>
- <a href="/"><img id="head-logo" src="{{ MEDIA_URL }}img/pyload-logo-edited3.5-new-font-small.png" alt="pyLoad" /></a>
+ <a href="/"><img id="head-logo" src="/media/default/img/pyload-logo-edited3.5-new-font-small.png" alt="pyLoad" /></a>
<div id="head-menu">
<ul>
{% block menu %}
<li class="selected">
- <a href="/" title=""><img src="{{ MEDIA_URL }}img/head-menu-home.png" alt="" /> {% trans "Home" %}</a>
+ <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
</li>
<li>
- <a href="/queue/" title=""><img src="{{ MEDIA_URL }}img/head-menu-queue.png" alt="" /> {% trans "Queue" %}</a>
+ <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
</li>
<li>
- <a href="/collector/" title=""><img src="{{ MEDIA_URL }}img/head-menu-collector.png" alt="" /> {% trans "Collector" %}</a>
+ <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
</li>
<li>
- <a href="/downloads/" title=""><img src="{{ MEDIA_URL }}img/head-menu-development.png" alt="" /> {% trans "Downloads" %}</a>
+ <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
</li>
<li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-index.png" alt="" />{% trans "Logs" %}</a>
+ <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
</li>
<li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-config.png" alt="" />{% trans "Config" %}</a>
+ <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
</li>
{% endblock %}
@@ -257,22 +272,22 @@ function AddBox()
<div style="clear:both;"></div>
</div>
-{% if perms.pyload.can_change_status %}
+{% if perms.status %}
<ul id="page-actions2">
- <li id="action_play"><a href="#" class="action play" accesskey="o" rel="nofollow">{% trans "Play" %}</a></li>
- <li id="action_cancel"><a href="#" class="action cancel" accesskey="o" rel="nofollow">{% trans "Cancel" %}</a></li>
- <li id="action_stop"><a href="#" class="action stop" accesskey="o" rel="nofollow">{% trans "Stop" %}</a></li>
- <li id="action_add"><a href="javascript:AddBox();" class="action add" accesskey="o" rel="nofollow" >{% trans "Add" %}</a></li>
+ <li id="action_play"><a href="#" class="action play" accesskey="o" rel="nofollow">{{_("Start")}}</a></li>
+ <li id="action_stop"><a href="#" class="action stop" accesskey="o" rel="nofollow">{{_("Stop")}}</a></li>
+ <li id="action_cancel"><a href="#" class="action cancel" accesskey="o" rel="nofollow">{{_("Cancel")}}</a></li>
+ <li id="action_add"><a href="javascript:AddBox();" class="action add" accesskey="o" rel="nofollow" >{{_("Add")}}</a></li>
</ul>
{% endif %}
-{% if perms.pyload.can_see_dl %}
+{% if perms.see_downloads %}
<ul id="page-actions">
- <li><span class="time">{% trans "Download:" %}</span><a id="time" style=" background-color: {% if status.download %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.download %}{% trans "on" %}{% else %}{% trans "off" %}{% endif %}</a></li>
- <li><span class="reconnect">{% trans "Reconnect:" %}</span><a id="reconnect" style=" background-color: {% if status.reconnect %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.reconnect %}{% trans "on" %}{% else %}{% trans "off" %}{% endif %}</a></li>
- <li><a class="action backlink">{% trans "Speed:" %} <b id="speed">{{ status.speed }}</b> kb/s</a></li>
- <li><a class="action cog">{% trans "Active:" %} <b id="aktiv">{{ status.activ }}</b> / <b id="aktiv_from">{{ status.queue }}</b></a></li>
- <li><a href="" class="action revisions" accesskey="o" rel="nofollow">{% trans "Reload page" %}</a></li>
+ <li><span class="time">{{_("Download:")}}</span><a id="time" style=" background-color: {% if status.download %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.download %}{{_("on")}}{% else %}{{_("off")}}{% endif %}</a></li>
+ <li><span class="reconnect">{{_("Reconnect:")}}</span><a id="reconnect" style=" background-color: {% if status.reconnect %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.reconnect %}{{_("on")}}{% else %}{{_("off")}}{% endif %}</a></li>
+ <li><a class="action backlink">{{_("Speed:")}} <b id="speed">{{ status.speed }}</b> kb/s</a></li>
+ <li><a class="action cog">{{_("Active:")}} <b id="aktiv">{{ status.activ }}</b> / <b id="aktiv_from">{{ status.queue }}</b></a></li>
+ <li><a href="" class="action revisions" accesskey="o" rel="nofollow">{{_("Reload page")}}</a></li>
</ul>
{% endif %}
@@ -284,7 +299,7 @@ function AddBox()
<div id="content" lang="en" dir="ltr">
-<h1>{% block subtitle %}pyLoad - {% trans "Webinterface" %}{% endblock %}</h1>
+<h1>{% block subtitle %}pyLoad - {{_("Webinterface")}}{% endblock %}</h1>
{% block statusbar %}
{% endblock %}
@@ -294,6 +309,7 @@ function AddBox()
<div class="level1" style="clear:both">
</div>
+<noscript><h1>Enable JavaScript to use the webinterface.</h1></noscript>
{% for message in messages %}
<b><p>{{message}}</p></b>
@@ -305,9 +321,8 @@ function AddBox()
<hr style="clear: both;" />
<div id="foot">&copy; 2008-2011 pyLoad Team
-<a href="#top" class="action top" accesskey="x"><span>{% trans "Back to top" %}</span></a><br />
- <!--<div class="breadcrumbs"></div>-->
-
+<a href="#top" class="action top" accesskey="x"><span>{{_("Back to top")}}</span></a><br />
+<!--<div class="breadcrumbs"></div>-->
</div>
</div>
diff --git a/module/web/templates/default/captcha.html b/module/web/templates/default/captcha.html
index fe7b04fc9..b3be3deca 100644
--- a/module/web/templates/default/captcha.html
+++ b/module/web/templates/default/captcha.html
@@ -1,32 +1,31 @@
-{% load i18n %}
<iframe id="upload_target" name="upload_target" src="" style="display: none; width:0;height:0"></iframe>
<!--<div id="add_box" style="left:50%; top:200px; margin-left: -450px; width: 900px; position: absolute; background: #FFF; padding: 10px 10px 10px 10px; display:none;">-->
<!--<div style="width: 900px; text-align: right;"><b onclick="AddBox();">[Close]</b></div>-->
<div id="cap_box" class="myform">
<form id="cap_form" action="/json/set_captcha" method="POST" enctype="multipart/form-data" onsubmit="return false;">
-<h1>{% trans "Captcha reading" %}</h1>
-<p>{% trans "Please read the text on the captcha." %}</p>
+<h1>{{_("Captcha reading")}}</h1>
+<p>{{_("Please read the text on the captcha.")}}</p>
<span id="cap_span">
-<label>{% trans "Captcha" %}
-<span class="small">{% trans "The captcha." %}</span>
+<label>{{_("Captcha")}}
+<span class="small">{{_("The captcha.")}}</span>
</label>
<span class="cont">
<img id="cap_img" style="padding: 2px;" src="">
</span>
-<label>{% trans "Text" %}
-<span class="small">{% trans "Input the text on the captcha." %}</span>
+<label>{{_("Text")}}
+<span class="small">{{_("Input the text on the captcha.")}}</span>
</label>
<input id="cap_text" name="cap_text" type="text" size="20" />
<input type="hidden" value="" name="cap_id" id="cap_id"/>
</span>
-<button id="cap_submit" type="submit">{% trans "Submit" %}</button>
-<button id="cap_reset" style="margin-left:0px;" type="reset">{% trans "Close" %}</button>
+<button id="cap_submit" type="submit">{{_("Submit")}}</button>
+<button id="cap_reset" style="margin-left:0px;" type="reset">{{_("Close")}}</button>
<div class="spacer"></div>
diff --git a/module/web/templates/default/collector.html b/module/web/templates/default/collector.html
index 8dddd488e..3e6b47234 100644
--- a/module/web/templates/default/collector.html
+++ b/module/web/templates/default/collector.html
@@ -1,6 +1,4 @@
{% extends 'default/base.html' %}
-{% load i18n %}
-
{% block head %}
<script type="text/javascript" src="/package_ui.js"></script>
@@ -13,42 +11,42 @@ document.addEvent("domready", function(){
</script>
{% endblock %}
-{% block title %}{% trans "Collector" %} - {{block.super}} {% endblock %}
-{% block subtitle %}{% trans "Collector" %}{% endblock %}
+{% block title %}{{_("Collector")}} - {{super()}} {% endblock %}
+{% block subtitle %}{{_("Collector")}}{% endblock %}
{% block menu %}
<li>
- <a href="/" title=""><img src="{{ MEDIA_URL }}img/head-menu-home.png" alt="" /> {% trans "Home" %}</a>
+ <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
</li>
<li>
- <a href="/queue/" title=""><img src="{{ MEDIA_URL }}img/head-menu-queue.png" alt="" /> {% trans "Queue" %}</a>
+ <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
</li>
<li class="selected">
- <a href="/collector/" title=""><img src="{{ MEDIA_URL }}img/head-menu-collector.png" alt="" /> {% trans "Collector" %}</a>
+ <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
</li>
<li>
- <a href="/downloads/" title=""><img src="{{ MEDIA_URL }}img/head-menu-development.png" alt="" /> {% trans "Downloads" %}</a>
+ <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
</li>
<li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-index.png" alt="" />{% trans "Logs" %}</a>
+ <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
</li>
<li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-config.png" alt="" />{% trans "Config" %}</a>
+ <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
</li>{% endblock %}
{% block pageactions %}
<ul id="page-actions-more">
- <li id="del_finished"><a style="padding: 0; font-weight: bold;" href="#">{% trans "Delete Finished" %}</a></li>
- <li id="restart_failed"><a style="padding: 0; font-weight: bold;" href="#">{% trans "Restart Failed" %}</a></li>
+ <li id="del_finished"><a style="padding: 0; font-weight: bold;" href="#">{{_("Delete Finished")}}</a></li>
+ <li id="restart_failed"><a style="padding: 0; font-weight: bold;" href="#">{{_("Restart Failed")}}</a></li>
</ul>
{% endblock %}
{% block content %}
-<div id="load-success" style="opacity: 0; float: right; color: white; background-color: #90ee90; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{% trans "success" %}</div>
-<div id="load-failure" style="opacity: 0; float: right; color: white; background-color: #f08080; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{% trans "failure" %}</div>
+<div id="load-success" style="opacity: 0; float: right; color: white; background-color: #90ee90; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{{_("success")}}</div>
+<div id="load-failure" style="opacity: 0; float: right; color: white; background-color: #f08080; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{{_("failure")}}</div>
<div id="load-indicator" style="opacity: 0; float: right; margin-top: -10px;">
- <img src="{{ MEDIA_URL }}img/ajax-loader.gif" alt="" style="padding-right: 5px"/>
- {% trans "loading" %}
+ <img src="/media/default/img/ajax-loader.gif" alt="" style="padding-right: 5px"/>
+ {{_("loading")}}
</div>
<ul id="package-list" style="list-style: none; padding-left: 0; margin-top: -10px;">
@@ -62,17 +60,17 @@ document.addEvent("domready", function(){
<span class="name">{{package.name}}</span>
&nbsp;&nbsp;
<span class="buttons" style="opacity:0">
- <img title="{% trans "Delete Package" %}" style="cursor: pointer" width="12px" height="12px" src="{{ MEDIA_URL }}img/delete.png" />
+ <img title="{{_("Delete Package")}}" style="cursor: pointer" width="12px" height="12px" src="/media/default/img/delete.png" />
&nbsp;&nbsp;
- <img title="{% trans "Restart Package" %}" style="margin-left: -10px; cursor: pointer" height="12px" src="{{ MEDIA_URL }}img/arrow_refresh.png" />
+ <img title="{{_("Restart Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/arrow_refresh.png" />
&nbsp;&nbsp;
- <img title="{% trans "Edit Package" %}" style="margin-left: -10px; cursor: pointer" height="12px" src="{{ MEDIA_URL }}img/pencil.png" />
+ <img title="{{_("Edit Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/pencil.png" />
&nbsp;&nbsp;
- <img title="{% trans "Move Package to Queue" %}" style="margin-left: -10px; cursor: pointer" height="12px" src="{{ MEDIA_URL }}img/package_go.png" />
+ <img title="{{_("Move Package to Queue")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/package_go.png" />
</span>
</div>
<div id="children_{{id}}" style="display: none;" class="children">
- <span class="child_secrow">{% trans "Folder:" %} <span class="folder">{{package.folder}}</span> | {% trans "Password:"%} <span class="password">{{package.password}}</span> | {% trans "Priority:"%} <span class="prio">{{package.priority}}</span></span>
+ <span class="child_secrow">{{_("Folder:")}} <span class="folder">{{package.folder}}</span> | {{_("Password:")}} <span class="password">{{package.password}}</span> | {{_("Priority:")}} <span class="prio">{{package.priority}}</span></span>
<ul id="sort_children_{{id}}" style="list-style: none; padding-left: 0">
</ul>
</div>
diff --git a/module/web/templates/default/downloads.html b/module/web/templates/default/downloads.html
index eeb73e151..813dc8d06 100644
--- a/module/web/templates/default/downloads.html
+++ b/module/web/templates/default/downloads.html
@@ -1,51 +1,48 @@
{% extends 'default/base.html' %}
-{% load i18n %}
-{% block title %}Downloads - {{block.super}} {% endblock %}
+{% block title %}Downloads - {{super()}} {% endblock %}
{% block menu %}
<li>
- <a href="/" title=""><img src="{{ MEDIA_URL }}img/head-menu-home.png" alt="" /> {% trans "Home" %}</a>
+ <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
</li>
<li>
- <a href="/queue/" title=""><img src="{{ MEDIA_URL }}img/head-menu-queue.png" alt="" /> {% trans "Queue" %}</a>
+ <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
</li>
<li>
- <a href="/collector/" title=""><img src="{{ MEDIA_URL }}img/head-menu-collector.png" alt="" /> {% trans "Collector" %}</a>
+ <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
</li>
<li class="selected">
- <a href="/downloads/" title=""><img src="{{ MEDIA_URL }}img/head-menu-development.png" alt="" /> {% trans "Downloads" %}</a>
+ <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
</li>
<li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-index.png" alt="" />{% trans "Logs" %}</a>
+ <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
</li>
<li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-config.png" alt="" />{% trans "Config" %}</a>
+ <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
</li>
{% endblock %}
{% block subtitle %}
-{% trans "Downloads" %}
+{{_("Downloads")}}
{% endblock %}
{% block content %}
-{% trans "Do not transfer downloaded files more than 10Mb in size via webinterface to external location, because it can result in high system load." %}
-
<ul>
{% for folder in files.folder %}
<li>
{{ folder.name }}
<ul>
{% for file in folder.files %}
- <li><a href='{% url download 'get/' %}{{ folder.path|urlencode }}/{{ file|urlencode }}'>{{file}}</a></li>
+ <li><a href='get/{{ folder.path|escape }}/{{ file|escape }}'>{{file}}</a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
{% for file in files.files %}
- <li> <a href={% url download 'get/' %}{{ file|urlencode }}>{{ file }}</a></li>
+ <li> <a href='get/{{ file|escape }}'>{{ file }}</a></li>
{% endfor %}
</ul>
diff --git a/module/web/templates/default/edit_package.html b/module/web/templates/default/edit_package.html
index caa8a02cd..0c9dcff42 100644
--- a/module/web/templates/default/edit_package.html
+++ b/module/web/templates/default/edit_package.html
@@ -1,39 +1,38 @@
-{% load i18n %}
<div id="pack_box" class="myform" style="z-index: 2">
<form id="pack_form" action="/json/edit_package" method="POST" enctype="multipart/form-data">
-<h1>{% trans "Edit Package" %}</h1>
-<p>{% trans "Edit the package detais below." %}</p>
+<h1>{{_("Edit Package")}}</h1>
+<p>{{_("Edit the package detais below.")}}</p>
<input name="pack_id" id="pack_id" type="hidden" value=""/>
-<label for="pack_name">{% trans "Name" %}
-<span class="small">{% trans "The name of the package." %}</span>
+<label for="pack_name">{{_("Name")}}
+<span class="small">{{_("The name of the package.")}}</span>
</label>
<input id="pack_name" name="pack_name" type="text" size="20" />
-<label for="pack_folder">{% trans "Folder" %}
-<span class="small">{% trans "Name of subfolder for these downloads." %}</span>
+<label for="pack_folder">{{_("Folder")}}
+<span class="small">{{_("Name of subfolder for these downloads.")}}</span>
</label>
<input id="pack_folder" name="pack_folder" type="text" size="20" />
-<label for="pack_prio">{% trans "Priority" %}
-<span class="small">{% trans "Priority of the package." %}</span>
+<label for="pack_prio">{{_("Priority")}}
+<span class="small">{{_("Priority of the package.")}}</span>
</label>
<select name="pack_prio" id="pack_prio">
- <option value="3">{% trans "highest" %}</option>
- <option value="2">{% trans "higher" %}</option>
- <option value="1">{% trans "high" %}</option>
- <option value="0" selected="selected">{% trans "normal" %}</option>
- <option value="-1">{% trans "low" %}</option>
- <option value="-2">{% trans "lower" %}</option>
- <option value="-3">{% trans "lowest" %}</option>
+ <option value="3">{{_("highest")}}</option>
+ <option value="2">{{_("higher")}}</option>
+ <option value="1">{{_("high")}}</option>
+ <option value="0" selected="selected">{{_("normal")}}</option>
+ <option value="-1">{{_("low")}}</option>
+ <option value="-2">{{_("lower")}}</option>
+ <option value="-3">{{_("lowest")}}</option>
</select>
-<label for="pack_pws">{% trans "Password" %}
-<span class="small">{% trans "List of passwords used for unrar." %}</span>
+<label for="pack_pws">{{_("Password")}}
+<span class="small">{{_("List of passwords used for unrar.")}}</span>
</label>
<textarea rows="3" name="pack_pws" id="pack_pws"></textarea>
-<button type="submit">{% trans "Submit" %}</button>
-<button id="pack_reset" style="margin-left: 0" type="reset">{% trans "Reset" %}</button>
+<button type="submit">{{_("Submit")}}</button>
+<button id="pack_reset" style="margin-left: 0" type="reset">{{_("Reset")}}</button>
<div class="spacer"></div>
</form>
diff --git a/module/web/templates/default/home.html b/module/web/templates/default/home.html
index 97d245a38..b2cef2cb7 100644
--- a/module/web/templates/default/home.html
+++ b/module/web/templates/default/home.html
@@ -1,6 +1,4 @@
{% extends 'default/base.html' %}
-{% load i18n %}
-
{% block head %}
<script type="text/javascript">
@@ -204,18 +202,18 @@ var LinkEntry = new Class({
{% endblock %}
{% block subtitle %}
-{% trans "Active Downloads" %}
+{{_("Active Downloads")}}
{% endblock %}
{% block content %}
<table width="100%" class="queue">
<thead>
<tr class="header">
- <th>{% trans "Name" %}</th>
- <th>{% trans "Status" %}</th>
- <th>{% trans "Information" %}</th>
- <th>{% trans "Size" %}</th>
- <th>{% trans "Progress" %}</th>
+ <th>{{_("Name")}}</th>
+ <th>{{_("Status")}}</th>
+ <th>{{_("Information")}}</th>
+ <th>{{_("Size")}}</th>
+ <th>{{_("Progress")}}</th>
</tr>
</thead>
<tbody id="LinksAktiv">
diff --git a/module/web/templates/default/login.html b/module/web/templates/default/login.html
index 7ae78183b..0e9e4d568 100644
--- a/module/web/templates/default/login.html
+++ b/module/web/templates/default/login.html
@@ -1,26 +1,23 @@
{% extends 'default/base.html' %}
-{% load i18n %}
-{% load token %}
-{% block title %}{% trans "Login" %} - {{block.super}} {% endblock %}
+{% block title %}{{_("Login")}} - {{super()}} {% endblock %}
{% block content %}
<div class="centeralign">
<form action="" method="post" accept-charset="utf-8" id="login">
- {% csrf_token %}
<div class="no">
<input type="hidden" name="do" value="login" />
<fieldset>
<legend>Login</legend>
<label>
- <span>{% trans "Username" %}</span>
- {{ form.username }}
+ <span>{{_("Username")}}</span>
+ <input type="text" size="20" name="username"/>
</label>
<br />
<label>
- <span>{% trans "Password" %}</span>
- {{ form.password }}
+ <span>{{_("Password")}}</span>
+ <input type="password" size="20" name="password">
</label>
<br />
<input type="submit" value="Login" class="button" />
@@ -28,8 +25,8 @@
</div>
</form>
-{% if form.errors %}
-<p>{% trans "Your username and password didn't match. Please try again." %}</p>
+{% if errors %}
+<p>{{_("Your username and password didn't match. Please try again.")}}</p>
{% endif %}
</div>
diff --git a/module/web/templates/default/logout.html b/module/web/templates/default/logout.html
index edc30392e..d3f07472b 100644
--- a/module/web/templates/default/logout.html
+++ b/module/web/templates/default/logout.html
@@ -1,10 +1,9 @@
{% extends 'default/base.html' %}
-{% load i18n %}
{% block head %}
<meta http-equiv="refresh" content="3; url=/">
{% endblock %}
{% block content %}
-<p><b>{% trans "You were successfully logged out." %}</b></p>
+<p><b>{{_("You were successfully logged out.")}}</b></p>
{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/logs.html b/module/web/templates/default/logs.html
index 5da99912f..7a95b4364 100644
--- a/module/web/templates/default/logs.html
+++ b/module/web/templates/default/logs.html
@@ -1,36 +1,35 @@
{% extends 'default/base.html' %}
-{% load i18n %}
-{% block title %}{% trans "Logs" %} - {{block.super}} {% endblock %}
-{% block subtitle %}{% trans "Logs" %}{% endblock %}
+{% block title %}{{_("Logs")}} - {{super()}} {% endblock %}
+{% block subtitle %}{{_("Logs")}}{% endblock %}
{% block head %}
-<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/log.css"/>
+<link rel="stylesheet" type="text/css" href="/media/default/css/log.css"/>
{% endblock %}
{% block menu %}
<li>
- <a href="/" title=""><img src="{{ MEDIA_URL }}img/head-menu-home.png" alt="" /> {% trans "Home" %}</a>
+ <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
</li>
<li>
- <a href="/queue/" title=""><img src="{{ MEDIA_URL }}img/head-menu-queue.png" alt="" /> {% trans "Queue" %}</a>
+ <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
</li>
<li>
- <a href="/collector/" title=""><img src="{{ MEDIA_URL }}img/head-menu-collector.png" alt="" /> {% trans "Collector" %}</a>
+ <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
</li>
<li>
- <a href="/downloads/" title=""><img src="{{ MEDIA_URL }}img/head-menu-development.png" alt="" /> {% trans "Downloads" %}</a>
+ <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
</li>
<li class="right selected">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-index.png" alt="" />{% trans "Logs" %}</a>
+ <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
</li>
<li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-config.png" alt="" />{% trans "Config" %}</a>
+ <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
</li>
{% endblock %}
{% block content %}
<div style="clear: both;"></div>
-<div class="logpaginator"><a href="{% url logs 1%}">&lt;&lt; {% trans "Start" %}</a> <a href="{% url logs iprev %}">&lt; {% trans "prev" %}</a> <a href="{% url logs inext %}">{% trans "next" %} &gt;</a> <a href="{% url logs %}">{% trans "End" %} &gt;&gt;</a></div>
+<div class="logpaginator"><a href="{{ "/logs/1" }}">&lt;&lt; {{_("Start")}}</a> <a href="{{ "/logs/" + iprev|string }}">&lt; {{_("prev")}}</a> <a href="{{ "/logs/" + inext|string }}">{{_("next")}} &gt;</a> <a href="/logs/">{{_("End")}} &gt;&gt;</a></div>
<div class="logperpage">
<form id="logform1" action="" method="POST">
<label for="reversed">Reversed:</label>
@@ -38,7 +37,7 @@
<label for="perpage">Lines per page:</label>
<select name="perpage" onchange="this.form.submit();">
{% for value in perpage_p %}
- <option value="{{value.0}}"{% ifequal value.0 perpage %} selected="selected" {% endifequal %}>{{value.1}}</option>
+ <option value="{{value.0}}"{% if value.0 == perpage %} selected="selected" {% endif %}>{{value.1}}</option>
{% endfor %}
</select>
</form>
diff --git a/module/web/templates/default/package_ui.js b/module/web/templates/default/package_ui.js
index eec645184..b5577f58a 100644
--- a/module/web/templates/default/package_ui.js
+++ b/module/web/templates/default/package_ui.js
@@ -1,4 +1,3 @@
-//{% load i18n %}
var load, success, fail, pack_box;
document.addEvent("domready", function() {
@@ -27,20 +26,15 @@ function indicateFinish() {
function indicateSuccess() {
indicateFinish();
- success.start("opacity", 1).chain(function() {
- (function() {
- success.start("opacity", 0);
- }).delay(250);
+ notify.alert('{{_("Success")}}.', {
+ 'className': 'success'
});
-
}
function indicateFail() {
indicateFinish();
- fail.start("opacity", 1).chain(function() {
- (function() {
- fail.start("opacity", 0);
- }).delay(250);
+ notify.alert('{{_("Failed")}}.', {
+ 'className': 'error'
});
}
@@ -70,7 +64,6 @@ var PackageUI = new Class({
revert: true,
opacity: 0.4,
handle: ".package_drag",
- //onStart: this.startSort,
onComplete: this.saveSort.bind(this)
});
@@ -227,8 +220,8 @@ var Package = new Class({
html += "<span class='child_status'>{statusmsg}</span>{error}&nbsp;".substitute({"statusmsg": link.statusmsg, "error":link.error});
html += "<span class='child_status'>{format_size}</span>".substitute({"format_size": link.format_size});
html += "<span class='child_status'>{plugin}</span>&nbsp;&nbsp;".substitute({"plugin": link.plugin});
- html += "<img title='{% trans "Delete Link" %}' style='cursor: pointer;' width='10px' height='10px' src='{{ MEDIA_URL }}img/delete.png' />&nbsp;&nbsp;";
- html += "<img title='{% trans "Restart Link" %}' style='cursor: pointer;margin-left: -4px' width='10px' height='10px' src='{{ MEDIA_URL }}img/arrow_refresh.png' /></div>";
+ html += "<img title='{{_("Delete Link")}}' style='cursor: pointer;' width='10px' height='10px' src='/media/default/img/delete.png' />&nbsp;&nbsp;";
+ html += "<img title='{{_("Restart Link")}}' style='cursor: pointer;margin-left: -4px' width='10px' height='10px' src='/media/default/img/arrow_refresh.png' /></div>";
var div = new Element("div", {
"id": "file_" + link.id,
diff --git a/module/web/templates/default/pathchooser.html b/module/web/templates/default/pathchooser.html
index 6a72214e8..d00637055 100644
--- a/module/web/templates/default/pathchooser.html
+++ b/module/web/templates/default/pathchooser.html
@@ -1,6 +1,3 @@
-{% load truncate %}
-{% load quotepath %}
-{% load i18n %}
<html>
<head>
<script class="javascript">
@@ -28,51 +25,50 @@
}
</script>
- <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/pathchooser.css"/>
+ <link rel="stylesheet" type="text/css" href="/media/default/css/pathchooser.css"/>
</head>
-<body{% ifequal type 'file' %}{% if not oldfile %} onload="setInvalid();"{% endif %}{% endifequal %}>
+<body{% if type == 'file' %}{% if not oldfile %} onload="setInvalid();"{% endif %}{% endif %}>
<center>
<div id="paths">
<form method="get" action="?" onSubmit="chosen();" onReset="exit();">
- <input type="text" name="p" value="{{ oldfile|default:cwd }}" size="60" onfocus="setValid();">
+ <input type="text" name="p" value="{{ oldfile|default(cwd) }}" size="60" onfocus="setValid();">
<input type="submit" value="Ok" name="send">
</form>
- {% ifequal type 'folder' %}
- <span class="path_abs_rel">{% trans "Path" %}: <a href="{% url path cwd|path_make_absolute|quotepath %}"{% if absolute %} style="text-decoration: underline;"{% endif %}>{% trans "absolute" %}</a> | <a href="{% url path cwd|path_make_relative|quotepath %}"{% if not absolute %} style="text-decoration: underline;"{% endif %}>{% trans "relative" %}</a></span>
+ {% if type == 'folder' %}
+ <span class="path_abs_rel">{{_("Path")}}: <a href="{{ "/pathchooser" + cwd|path_make_absolute|quotepath }}"{% if absolute %} style="text-decoration: underline;"{% endif %}>{{_("absolute")}}</a> | <a href="{{ "/pathchooser/" + cwd|path_make_relative|quotepath }}"{% if not absolute %} style="text-decoration: underline;"{% endif %}>{{_("relative")}}</a></span>
{% else %}
- <span class="path_abs_rel">{% trans "Path" %}: <a href="{% url file cwd|path_make_absolute|quotepath %}"{% if absolute %} style="text-decoration: underline;"{% endif %}>{% trans "absolute" %}</a> | <a href="{% url file cwd|path_make_relative|quotepath %}"{% if not absolute %} style="text-decoration: underline;"{% endif %}>{% trans "relative" %}</a></span>
- {% endifequal %}
+ <span class="path_abs_rel">{{_("Path")}}: <a href="{{ "/filechooser/" + cwd|path_make_absolute|quotepath }}"{% if absolute %} style="text-decoration: underline;"{% endif %}>{{_("absolute")}}</a> | <a href="{{ "/filechooser/" + cwd|path_make_relative|quotepath }}"{% if not absolute %} style="text-decoration: underline;"{% endif %}>{{_("relative")}}</a></span>
+ {% endif %}
</div>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
- <th>{% trans "name" %}</th>
- <th>{% trans "size" %}</th>
- <th>{% trans "type" %}</th>
- <th>{% trans "last modified" %}</th>
+ <th>{{_("name")}}</th>
+ <th>{{_("size")}}</th>
+ <th>{{_("type")}}</th>
+ <th>{{_("last modified")}}</th>
</tr>
{% if parentdir %}
<tr>
<td colspan="4">
- <a href="{% ifequal type 'folder' %}{% url path parentdir|quotepath %}{% else %}{% url file parentdir|quotepath %}{% endifequal %}"><span class="parentdir">{% trans "parent directory" %}</span></a>
+ <a href="{% if type == 'folder' %}{{ "/pathchooser/" + parentdir|quotepath }}{% else %}{{ "/filechooser/" + parentdir|quotepath }}{% endif %}"><span class="parentdir">{{_("parent directory")}}</span></a>
</td>
</tr>
{% endif %}
{% for file in files %}
<tr>
- {% ifequal type 'folder' %}
- <td class="name">{% ifequal file.type 'dir' %}<a href="{% url path file.fullpath|quotepath %}" title="{{ file.fullpath }}"><span class="path_directory">{{ file.name|truncate:25 }}</span></a>{% else %}<span class="path_file" title="{{ file.fullpath }}">{{ file.name|truncate:25 }}{% endifequal %}</span></td>
+ {% if type == 'folder' %}
+ <td class="name">{% if file.type == 'dir' %}<a href="{{ "/pathchooser/" + file.fullpath|quotepath }}" title="{{ file.fullpath }}"><span class="path_directory">{{ file.name|truncate(25) }}</span></a>{% else %}<span class="path_file" title="{{ file.fullpath }}">{{ file.name|truncate(25) }}{% endif %}</span></td>
{% else %}
- <td class="name">{% ifequal file.type 'dir' %}<a href="{% url file file.fullpath|quotepath %}" title="{{ file.fullpath }}"><span class="file_directory">{{ file.name|truncate:25 }}</span></a>{% else %}<a href="#" onclick="setFile('{{ file.fullpath }}');" title="{{ file.fullpath }}"><span class="file_file">{{ file.name|truncate:25 }}{% endifequal %}</span></a></td>
- {% endifequal %}
- <td class="size">{{ file.size|floatformat:-2 }} {{ file.unit }}</td>
- <td class="type">{% ifequal file.type 'dir' %}directory{% else %}{{ file.ext|default:"file" }}{% endifequal %}</td>
- <td class="mtime">{{ file.modified|date:"d.m.Y - H:i:s" }}</td>
+ <td class="name">{% if file.type == 'dir' %}<a href="{{ "/filechooser/" + file.fullpath|quotepath }}" title="{{ file.fullpath }}"><span class="file_directory">{{ file.name|truncate(25) }}</span></a>{% else %}<a href="#" onclick="setFile('{{ file.fullpath }}');" title="{{ file.fullpath }}"><span class="file_file">{{ file.name|truncate(25) }}{% endif %}</span></a></td>
+ {% endif %}
+ <td class="size">{{ file.size|float|filesizeformat }}</td>
+ <td class="type">{% if file.type == 'dir' %}directory{% else %}{{ file.ext|default("file") }}{% endif %}</td>
+ <td class="mtime">{{ file.modified|date("d.m.Y - H:i:s") }}</td>
<tr>
-{% empty %}
- <tr>
- <td colspan="4">{% trans "no content" %}</td>
- </tr>
+<!-- <tr>
+ <td colspan="4">{{_("no content")}}</td>
+ </tr> -->
{% endfor %}
</table>
</center>
diff --git a/module/web/templates/default/queue.html b/module/web/templates/default/queue.html
index ec11bc365..e72871873 100644
--- a/module/web/templates/default/queue.html
+++ b/module/web/templates/default/queue.html
@@ -1,6 +1,4 @@
{% extends 'default/base.html' %}
-{% load i18n %}
-
{% block head %}
<script type="text/javascript" src="/package_ui.js"></script>
@@ -13,43 +11,43 @@ document.addEvent("domready", function(){
</script>
{% endblock %}
-{% block title %}{% trans "Queue" %} - {{block.super}} {% endblock %}
-{% block subtitle %}{% trans "Queue" %}{% endblock %}
+{% block title %}{{_("Queue")}} - {{super()}} {% endblock %}
+{% block subtitle %}{{_("Queue")}}{% endblock %}
{% block menu %}
<li>
- <a href="/" title=""><img src="{{ MEDIA_URL }}img/head-menu-home.png" alt="" /> {% trans "Home" %}</a>
+ <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
</li>
<li class="selected">
- <a href="/queue/" title=""><img src="{{ MEDIA_URL }}img/head-menu-queue.png" alt="" /> {% trans "Queue" %}</a>
+ <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
</li>
<li>
- <a href="/collector/" title=""><img src="{{ MEDIA_URL }}img/head-menu-collector.png" alt="" /> {% trans "Collector" %}</a>
+ <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
</li>
<li>
- <a href="/downloads/" title=""><img src="{{ MEDIA_URL }}img/head-menu-development.png" alt="" /> {% trans "Downloads" %}</a>
+ <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
</li>
<li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-index.png" alt="" />{% trans "Logs" %}</a>
+ <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
</li>
<li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-config.png" alt="" />{% trans "Config" %}</a>
+ <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
</li>
{% endblock %}
{% block pageactions %}
<ul id="page-actions-more">
- <li id="del_finished"><a style="padding: 0; font-weight: bold;" href="#">{% trans "Delete Finished" %}</a></li>
- <li id="restart_failed"><a style="padding: 0; font-weight: bold;" href="#">{% trans "Restart Failed" %}</a></li>
+ <li id="del_finished"><a style="padding: 0; font-weight: bold;" href="#">{{_("Delete Finished")}}</a></li>
+ <li id="restart_failed"><a style="padding: 0; font-weight: bold;" href="#">{{_("Restart Failed")}}</a></li>
</ul>
{% endblock %}
{% block content %}
-<div id="load-success" style="opacity: 0; float: right; color: white; background-color: #90ee90; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{% trans "success" %}</div>
-<div id="load-failure" style="opacity: 0; float: right; color: white; background-color: #f08080; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{% trans "failure" %}</div>
+<div id="load-success" style="opacity: 0; float: right; color: white; background-color: #90ee90; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{{_("success")}}</div>
+<div id="load-failure" style="opacity: 0; float: right; color: white; background-color: #f08080; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{{_("failure")}}</div>
<div id="load-indicator" style="opacity: 0; float: right; margin-top: -10px;">
- <img src="{{ MEDIA_URL }}img/ajax-loader.gif" alt="" style="padding-right: 5px"/>
- {% trans "loading" %}
+ <img src="/media/default/img/ajax-loader.gif" alt="" style="padding-right: 5px"/>
+ {{_("loading")}}
</div>
<ul id="package-list" style="list-style: none; padding-left: 0; margin-top: -10px;">
@@ -63,17 +61,17 @@ document.addEvent("domready", function(){
<span class="name">{{package.name}}</span>
&nbsp;&nbsp;
<span class="buttons" style="opacity:0">
- <img title="{% trans "Delete Package" %}" style="cursor: pointer" width="12px" height="12px" src="{{ MEDIA_URL }}img/delete.png" />
+ <img title="{{_("Delete Package")}}" style="cursor: pointer" width="12px" height="12px" src="/media/default/img/delete.png" />
&nbsp;&nbsp;
- <img title="{% trans "Restart Package" %}" style="margin-left: -10px; cursor: pointer" height="12px" src="{{ MEDIA_URL }}img/arrow_refresh.png" />
+ <img title="{{_("Restart Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/arrow_refresh.png" />
&nbsp;&nbsp;
- <img title="{% trans "Edit Package" %}" style="margin-left: -10px; cursor: pointer" height="12px" src="{{ MEDIA_URL }}img/pencil.png" />
+ <img title="{{_("Edit Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/pencil.png" />
&nbsp;&nbsp;
- <img title="{% trans "Move Package to Collector" %}" style="margin-left: -10px; cursor: pointer" height="12px" src="{{ MEDIA_URL }}img/package_go.png" />
+ <img title="{{_("Move Package to Collector")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/package_go.png" />
</span>
</div>
<div id="children_{{id}}" style="display: none;" class="children">
- <span class="child_secrow">{% trans "Folder:" %} <span class="folder">{{package.folder}}</span> | {% trans "Password:"%} <span class="password">{{package.password}}</span> | {% trans "Priority:"%} <span class="prio">{{package.priority}}</span></span>
+ <span class="child_secrow">{{_("Folder:")}} <span class="folder">{{package.folder}}</span> | {{_("Password:")}} <span class="password">{{package.password}}</span> | {{_("Priority:")}} <span class="prio">{{package.priority}}</span></span>
<ul id="sort_children_{{id}}" style="list-style: none; padding-left: 0">
</ul>
</div>
diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html
index 0ef9ce9f4..69ab39292 100644
--- a/module/web/templates/default/settings.html
+++ b/module/web/templates/default/settings.html
@@ -1,217 +1,254 @@
{% extends 'default/base.html' %}
-{% load i18n %}
-{% load contains %}
-{% load quotepath %}
-{% block title %}{% trans "Config" %} - {{block.super}} {% endblock %}
-{% block subtitle %}{% trans "Config" %}{% endblock %}
+{% block title %}{{ _("Config") }} - {{ super() }} {% endblock %}
+{% block subtitle %}{{ _("Config") }}{% endblock %}
{% block head %}
-<script type="text/javascript">
- window.addEvent('domready', function()
- {
- $$('#toptabs a').addEvent('click', function(e)
- {
- $$('#toptabs a').removeProperty('class');
- e.target.set('class', 'selected');
-
- $$('#tabs span').removeProperty('class');
- $('g_'+e.target.get('href').substring(1)).set('class', 'selected');
-
- var firstsel = $$('#tabs span.selected a')[0];
- firstsel.fireEvent('click', {target: firstsel});
- return false;
+ <script type="text/javascript" src="/media/default/js/tinytab.js"></script>
+ <script type="text/javascript" src="/media/default/js/MooDropMenu.js"></script>
+ <script type="text/javascript" src="/media/default/js/settings_ui.js"></script>
+
+ <script type="text/javascript">
+ window.addEvent('domready', function() {
+
+ account_dialog = new Fx.Tween($("account_box"));
+
+ new TinyTab($$('#toptabs li a'), $$('#tabs-body > span'));
+
+ $$('ul.nav').each(function(nav) {
+ var dropMenu = new MooDropMenu(nav, {
+ onOpen: function(el) {
+ el.fade('in')
+ },
+ onClose: function(el) {
+ el.fade('out');
+ },
+ onInitialize: function(el) {
+ el.fade('hide').set('tween', {duration:500});
+ }
+ });
+ });
+
+ new SettingsUI();
});
- $$('#tabs a').addEvent('click', function(e)
- {
- $$('#tabs a').removeProperty('class');
- e.target.set('class', 'selected');
- $$('div.tabContent').set('class', 'tabContent hide');
- $(e.target.get('href').substring(1)).set('class', 'tabContent');
- return false;
- });
-
- $$('#toptabs a')[0].set('class', 'selected');
- $$('#tabs span')[0].set('class', 'selected');
-
- var firstsel = $$('#tabs span.selected a')[0];
- firstsel.fireEvent('click', {target: firstsel});
- });
-
-
-</script>
+ </script>
{% endblock %}
{% block menu %}
-<li>
- <a href="/" title=""><img src="{{ MEDIA_URL }}img/head-menu-home.png" alt="" /> {% trans "Home" %}</a>
-</li>
-<li>
- <a href="/queue/" title=""><img src="{{ MEDIA_URL }}img/head-menu-queue.png" alt="" /> {% trans "Queue" %}</a>
-</li>
-<li>
- <a href="/collector/" title=""><img src="{{ MEDIA_URL }}img/head-menu-collector.png" alt="" /> {% trans "Collector" %}</a>
-</li>
-<li>
- <a href="/downloads/" title=""><img src="{{ MEDIA_URL }}img/head-menu-development.png" alt="" /> {% trans "Downloads" %}</a>
-</li>
-<li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-index.png" alt="" />{% trans "Logs" %}</a>
-</li>
-<li class="right selected">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-config.png" alt="" />{% trans "Config" %}</a>
-</li>
+ <li>
+ <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt=""/> {{ _("Home") }}</a>
+ </li>
+ <li>
+ <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt=""/> {{ _("Queue") }}</a>
+ </li>
+ <li>
+ <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png"
+ alt=""/> {{ _("Collector") }}</a>
+ </li>
+ <li>
+ <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png"
+ alt=""/> {{ _("Downloads") }}</a>
+ </li>
+ <li class="right">
+ <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img
+ src="/media/default/img/head-menu-index.png" alt=""/>{{ _("Logs") }}</a>
+ </li>
+ <li class="right selected">
+ <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img
+ src="/media/default/img/head-menu-config.png" alt=""/>{{ _("Config") }}</a>
+ </li>
{% endblock %}
{% block content %}
-
-<ul id="toptabs" class="tabs">
- {% for configname, config in conf.iteritems %}
- <li><a href="#{{configname}}">{{configname}}</a></li>
- {% endfor %}
-</ul>
-
-<div id="tabsback">
- <ul id="tabs" class="tabs">
- {% for configname, config in conf.iteritems %}
- <span id="g_{{configname}}">
- {% ifnotequal configname "Accounts" %}
- {% for skey, section in config.iteritems %}
- <li><a href="#{{configname}}{{skey}}">{{section.desc}}</a></li>
- {% endfor %}
- {% else %}
- {% for skey, section in config.iteritems %}
- <li><a href="#{{configname}}{{skey}}">{{skey}}</a></li>
- {% endfor %}
- {% endifnotequal %}
- </span>
- {% endfor %}
+
+ <ul id="toptabs" class="tabs">
+ <li><a class="selected" href="#">{{ _("General") }}</a></li>
+ <li><a href="#">{{ _("Plugins") }}</a></li>
+ <li><a href="#">{{ _("Accounts") }}</a></li>
</ul>
-</div>
-<form id="horizontalForm" action="" method="POST" autocomplete="off">
-{% for configname, config in conf.iteritems %}
- {% ifnotequal configname "Accounts" %}
- {% for skey, section in config.iteritems %}
- <div class="tabContent" id="{{configname}}{{skey}}">
- <table class="settable">
- {% for okey, option in section.items %}
- {% ifnotequal okey "desc" %}
- <tr>
- <td><label for="{{configname}}|{{skey}}|{{okey}}" style="color:#424242;">{{option.desc}}:</label></td>
- <td>
- {% ifequal option.type "bool" %}
- <select id="{{skey}}|{{okey}}" name="{{configname}}|{{skey}}|{{okey}}">
- <option {% if option.value %} selected="selected" {% endif %}value="True">{% trans "on" %}</option>
- <option {% if not option.value %} selected="selected" {% endif %}value="False">{% trans "off" %}</option>
- </select>
- {% else %}
- {% if option.type|contains:";" %}
- <select id="{{skey}}|{{okey}}" name="{{configname}}|{{skey}}|{{okey}}">
- {% for entry in option.list %}
- <option {% ifequal option.value entry %} selected="selected" {% endifequal %}>{{entry}}</option>
- {% endfor %}
- </select>
- {% else %}
- {% ifequal option.type "folder" %}
- <input name="{{configname}}|{{skey}}|{{okey}}" type="text" id="{{skey}}|{{okey}}" value="{{option.value}}"/>
- <input name="browsebutton" type="button" onclick="ifield = document.getElementById('{{skey}}|{{okey}}'); pathchooser = window.open('{% if option.value %}{% url path option.value|quotepath %}{% else %}{% url pathroot %}{% endif %}', 'pathchooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); pathchooser.ifield = ifield; window.ifield = ifield;" value="{% trans "Browse" %}"/>
- {% else %}
- {% ifequal option.type "file" %}
- <input name="{{configname}}|{{skey}}|{{okey}}" type="text" id="{{skey}}|{{okey}}" value="{{option.value}}"/>
- <input name="browsebutton" type="button" onclick="ifield = document.getElementById('{{skey}}|{{okey}}'); filechooser = window.open('{% if option.value %}{% url file option.value|quotepath %}{% else %}{% url fileroot %}{% endif %}', 'filechooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); filechooser.ifield = ifield; window.ifield = ifield;" value="{% trans "Browse" %}"/>
- {% else %}
- <input id="{{skey}}|{{okey}}" name="{{configname}}|{{skey}}|{{okey}}" type="text" value="{{option.value}}"/>
- {% endifequal %}
- {% endifequal %}
- {% endif %}
- {% endifequal %}
- </td>
- </tr>
- {% endifnotequal %}
- {% endfor %}
- </table>
- </div>
- {% endfor %}
- {% else %}
- <!-- Accounts -->
- {% for plugin, accounts in config.iteritems %}
- <div class="tabContent" id="{{configname}}{{plugin}}">
- <table class="settable">
- {% for account in accounts %}
+
+ <div id="tabsback" style="height: 20px; padding-left: 150px; color: white; font-weight: bold;">
+
+ </div>
+
+ <span id="tabs-body">
+ <!-- General -->
+ <span id="general" class="active tabContent">
+ <ul class="nav tabs">
+ <li class>
+ <a>Menu</a>
+ <ul id="general-menu">
+ {% for entry,name in conf.general %}
+ <nobr>
+ <li id="general|{{ entry }}">{{ name }}</li>
+ </nobr>
+ <br>
+ {% endfor %}
+ </ul>
+ </li>
+ </ul>
+
+ <form id="general_form" action="" method="POST" autocomplete="off">
+ <span id="general_form_content">
+ <br>
+ <h3>&nbsp;&nbsp; {{ _("Choose a section from the menu") }}</h3>
+ <br>
+ </span>
+
+ <input id="general|submit" class="styled_button" type="submit" value="{{_("Submit")}}"/>
+ </form>
+ </span>
+
+ <!-- Plugins -->
+ <span id="plugins" class="tabContent">
+ <ul class="nav tabs">
+ <li class>
+ <a>Menu</a>
+ <ul id="plugin-menu">
+ {% for entry,name in conf.plugin %}
+ <nobr>
+ <li id="plugin|{{ entry }}">{{ name }}</li>
+ </nobr>
+ <br>
+ {% endfor %}
+ </ul>
+ </li>
+ </ul>
+
+
+ <form id="plugin_form" action="" method="POST" autocomplete="off">
+
+ <span id="plugin_form_content">
+ <br>
+ <h3>&nbsp;&nbsp; {{ _("Choose a section from the menu") }}</h3>
+ <br>
+ </span>
+ <input id="plugin|submit" class="styled_button" type="submit" value="{{_("Submit")}}"/>
+ </form>
+
+ </span>
+
+ <!-- Accounts -->
+ <span id="accounts" class="tabContent">
+ <form id="account_form" action="/json/update_accounts" method="POST">
+
+ <table class="settable wide">
+
+ <thead>
<tr>
- <td><label for="{{configname}}|{{plugin}}|password;{{account.login}}" style="color:#424242;">{{account.login}}:</label></td>
- <td>
- <input id="{{plugin}}|password;{{account.login}}" name="{{configname}}|{{plugin}}|password;{{account.login}}" type="password" value="{{account.password}}" size="14"/>
- </td>
- <td>
- {% trans "Status:" %}
- {% if account.valid %}
- <span style="font-weight: bold; color: #006400;">
- {% trans "valid" %}
- {% else %}
- <span style="font-weight: bold; color: #8b0000;">
- {% trans "not valid" %}
- {% endif %}
- </span>
- </td>
- <td>
- {% trans "Valid until:" %}
- <span style="font-weight: bold;">
- {{ account.validuntil }}
- </span>
- </td>
- <td>
- {% trans "Traffic left:" %}
- <span style="font-weight: bold;">
- {{ account.trafficleft }}
- </span>
- </td>
- <td>
- {% trans "Time:" %}
- <input id="{{configname}}|{{plugin}}|time;{{account.login}}" name="{{configname}}|{{plugin}}|time;{{account.login}}" type="text" size="7" value="{{account.time}}"/>
- </td>
- <td>
- {% trans "Delete? " %}
- <input id="{{configname}}|{{plugin}}|delete;{{account.login}}" name="{{configname}}|{{plugin}}|delete;{{account.login}}" type="checkbox" value="True"/>
- </td>
+ <th>{{ _("Plugin") }}</th>
+ <th>{{ _("Name") }}</th>
+ <th>{{ _("Password") }}</th>
+ <th>{{ _("Status") }}</th>
+ <th>{{ _("Premium") }}</th>
+ <th>{{ _("Valid until") }}</th>
+ <th>{{ _("Traffic left") }}</th>
+ <th>{{ _("Time") }}</th>
+ <th>{{ _("Delete?") }}</th>
</tr>
-
- {% endfor %}
- <tr><td>&nbsp;</td></tr>
-
- <tr>
- <td><label for="{{configname}}|{{plugin}}|{{account.login}}" style="color:#424242;">{% trans "New account:" %}</label></td>
-
- <td>
- <input id="{{plugin}}|newacc" name="{{configname}}|{{plugin}}|newacc" type="text" size="14"/>
- </td>
- </tr>
- <tr>
- <td><label for="{{configname}}|{{plugin}}|{{account.name}}" style="color:#424242;">{% trans "New password:" %}</label></td>
-
- <td>
- <input id="{{configname}}|{{plugin}}" name="{{configname}}|{{plugin}}|newpw" type="password" size="14"/>
- </td>
- </tr>
-
- </table>
- </div>
- {% endfor %}
-
- {% endifnotequal %}
-{% endfor %}
-{% if conf %}
-<input class="submit" type="submit" value="{% trans "Submit" %}" />
-</form>
+ </thead>
+
+ {% for plugin, accounts in conf.accs.iteritems() %}
+
+
+ {% for account in accounts %}
+ <tr>
+ <td>
+ <span style="padding:5px">{{ plugin }}</span>
+ </td>
+
+ <td><label for="{{plugin}}|password;{{account.login}}"
+ style="color:#424242;">{{ account.login }}</label></td>
+ <td>
+ <input id="{{plugin}}|password;{{account.login}}"
+ name="{{plugin}}|password;{{account.login}}"
+ type="password" value="{{account.password}}" size="14"/>
+ </td>
+ <td>
+ {% if account.valid %}
+ <span style="font-weight: bold; color: #006400;">
+ {{ _("valid") }}
+ {% else %}
+ <span style="font-weight: bold; color: #8b0000;">
+ {{ _("not valid") }}
+ {% endif %}
+ </span>
+ </td>
+ <td>
+ {% if account.premium %}
+ <span style="font-weight: bold; color: #006400;">
+ {{ _("yes") }}
+ {% else %}
+ <span style="font-weight: bold; color: #8b0000;">
+ {{ _("no") }}
+ {% endif %}
+ </span>
+ </td>
+ <td>
+ <span style="font-weight: bold;">
+ {{ account.validuntil }}
+ </span>
+ </td>
+ <td>
+ <span style="font-weight: bold;">
+ {{ account.trafficleft }}
+ </span>
+ </td>
+ <td>
+ <input id="{{plugin}}|time;{{account.login}}"
+ name="{{plugin}}|time;{{account.login}}" type="text"
+ size="7" value="{{account.time}}"/>
+ </td>
+ <td>
+ <input id="{{plugin}}|delete;{{account.login}}"
+ name="{{plugin}}|delete;{{account.login}}" type="checkbox"
+ value="True"/>
+ </td>
+ </tr>
+ {% endfor %}
+ {% endfor %}
+ </table>
+
+
+ <button id="account_submit" type="submit" class="styled_button">{{_("Submit")}}</button>
+ <button id="account_add" style="margin-left: 0" type="submit" class="styled_button">{{_("Add")}}</button>
+ </form>
+ </span>
+ </span>
+
+
+<div id="account_box" class="myform window_box" style="z-index: 2">
+<form id="add_account_form" action="/json/add_account" method="POST" enctype="multipart/form-data">
+<h1>{{_("Add Account")}}</h1>
+<p>{{_("Enter your account data to use premium features.")}}</p>
+<label for="account_login">{{_("Login")}}
+<span class="small">{{_("Your username.")}}</span>
+</label>
+<input id="account_login" name="account_login" type="text" size="20" />
+
+<label for="account_password">{{_("Password")}}
+<span class="small">The password for this account.</span>
+</label>
+<input id="account_password" name="account_password" type="text" size="20" />
+
+<label for="account_type">{{_("Type")}}
+<span class="small">{{_("Choose the hoster for your account.")}}</span>
+</label>
+ <select name=account_type id="account_type">
+ {% for type in conf.accs.iterkeys()|sort %}
+ <option value="{{ type }}">{{ type }}</option>
+ {% endfor %}
+ </select>
-<br>
-{% for message in errors %}
-<b>{{message}}</b><br>
-{% endfor %}
-{% endif %}
+<button id="account_add_button" type="submit">{{_("Add")}}</button>
+<button id="account_reset" style="margin-left: 0" type="reset">{{_("Reset")}}</button>
+<div class="spacer"></div>
+</form>
+
+</div>
{% endblock %}
diff --git a/module/web/templates/default/settings_item.html b/module/web/templates/default/settings_item.html
new file mode 100644
index 000000000..593050bd2
--- /dev/null
+++ b/module/web/templates/default/settings_item.html
@@ -0,0 +1,45 @@
+<table class="settable">
+ {% for okey, option in section.iteritems() %}
+ {% if okey != "desc" %}
+ <tr>
+ <td><label for="{{skey}}|{{okey}}"
+ style="color:#424242;">{{ option.desc }}:</label></td>
+ <td>
+ {% if option.type == "bool" %}
+ <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}">
+ <option {% if option.value %} selected="selected"
+ {% endif %}value="True">{{ _("on") }}</option>
+ <option {% if not option.value %} selected="selected"
+ {% endif %}value="False">{{ _("off") }}</option>
+ </select>
+ {% elif ";" in option.type %}
+ <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}">
+ {% for entry in option.list %}
+ <option {% if option.value == entry %}
+ selected="selected" {% endif %}>{{ entry }}</option>
+ {% endfor %}
+ </select>
+ {% elif option.type == "folder" %}
+ <input name="{{skey}}|{{okey}}" type="text"
+ id="{{skey}}|{{okey}}" value="{{option.value}}"/>
+ <input name="browsebutton" type="button"
+ onclick="ifield = document.getElementById('{{skey}}|{{okey}}'); pathchooser = window.open('{% if option.value %}{{ "/pathchooser/" + option.value|quotepath }}{% else %}{{ pathroot }}{% endif %}', 'pathchooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); pathchooser.ifield = ifield; window.ifield = ifield;"
+ value="{{_("Browse")}}"/>
+ {% elif option.type == "file" %}
+ <input name="{{skey}}|{{okey}}" type="text"
+ id="{{skey}}|{{okey}}" value="{{option.value}}"/>
+ <input name="browsebutton" type="button"
+ onclick="ifield = document.getElementById('{{skey}}|{{okey}}'); filechooser = window.open('{% if option.value %}{{ "/filechooser/" + option.value|quotepath }}{% else %}{{ fileroot }}{% endif %}', 'filechooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); filechooser.ifield = ifield; window.ifield = ifield;"
+ value="{{_("Browse")}}"/>
+ {% elif option.type == "password" %}
+ <input id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"
+ type="password" value="{{option.value}}"/>
+ {% else %}
+ <input id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"
+ type="text" value="{{option.value}}"/>
+ {% endif %}
+ </td>
+ </tr>
+ {% endif %}
+ {% endfor %}
+</table> \ No newline at end of file
diff --git a/module/web/templates/jinja/default/setup.html b/module/web/templates/default/setup.html
index 39ef6f1e8..39ef6f1e8 100644
--- a/module/web/templates/jinja/default/setup.html
+++ b/module/web/templates/default/setup.html
diff --git a/module/web/templates/default/window.html b/module/web/templates/default/window.html
index 3613c6df7..734745887 100644
--- a/module/web/templates/default/window.html
+++ b/module/web/templates/default/window.html
@@ -1,4 +1,3 @@
-{% load i18n %}
<iframe id="upload_target" name="upload_target" src="" style="display: none; width:0;height:0"></iframe>
<div id="add_bg" style="filter:alpha(opacity:80);KHTMLOpacity:0.80;MozOpacity:0.80;opacity:0.80; background:#000; width:100%; height: 100%; position:fixed; top:0; left:0; display:none;">&nbsp;</div>
<!--<div id="add_box" style="left:50%; top:200px; margin-left: -450px; width: 900px; position: absolute; background: #FFF; padding: 10px 10px 10px 10px; display:none;">-->
@@ -6,39 +5,39 @@
<!--<div style="width: 900px; text-align: right;"><b onclick="AddBox();">[Close]</b></div>-->
<div id="add_box" class="myform">
<form id="add_form" action="/json/add_package" method="POST" enctype="multipart/form-data">
-<h1>{% trans "Add Package" %}</h1>
-<p>{% trans "Paste your links or upload a container." %}</p>
-<label for="add_name">{% trans "Name" %}
-<span class="small">{% trans "The name of the new package." %}</span>
+<h1>{{_("Add Package")}}</h1>
+<p>{{_("Paste your links or upload a container.")}}</p>
+<label for="add_name">{{_("Name")}}
+<span class="small">{{_("The name of the new package.")}}</span>
</label>
<input id="add_name" name="add_name" type="text" size="20" />
-<label for="add_links">{% trans "Links" %}
-<span class="small">{% trans "Paste your links here" %}</span>
+<label for="add_links">{{_("Links")}}
+<span class="small">{{_("Paste your links here")}}</span>
</label>
<textarea rows="5" name="add_links" id="add_links"></textarea>
-<label for="add_password">{% trans "Password" %}
- <span class="small">{% trans "Password for RAR-Archive" %}</span>
+<label for="add_password">{{_("Password")}}
+ <span class="small">{{_("Password for RAR-Archive")}}</span>
</label>
<input id="add_password" name="add_password" type="text" size="20">
-<label>{% trans "File" %}
-<span class="small">{% trans "Upload a container." %}</span>
+<label>{{_("File")}}
+<span class="small">{{_("Upload a container.")}}</span>
</label>
<input type="file" name="add_file" id="add_file"/>
-<label for="add_dest">{% trans "Destination" %}
+<label for="add_dest">{{_("Destination")}}
</label>
<span class="cont">
- {% trans "Queue" %}
+ {{_("Queue")}}
<input type="radio" name="add_dest" id="add_dest" value="1" checked="checked"/>
- {% trans "Collector" %}
+ {{_("Collector")}}
<input type="radio" name="add_dest" id="add_dest2" value="0"/>
</span>
-<button type="submit">{% trans "Add Package" %}</button>
-<button id="add_reset" style="margin-left:0;" type="reset">{% trans "Reset" %}</button>
+<button type="submit">{{_("Add Package")}}</button>
+<button id="add_reset" style="margin-left:0;" type="reset">{{_("Reset")}}</button>
<div class="spacer"></div>
</form>
diff --git a/module/web/templates/jinja/default/base.html b/module/web/templates/jinja/default/base.html
deleted file mode 100644
index 0931291b7..000000000
--- a/module/web/templates/jinja/default/base.html
+++ /dev/null
@@ -1,321 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="stylesheet" type="text/css" href="/media/default/css/default.css"/>
-
-<link rel="stylesheet" type="text/css" href="/media/default/css/window.css"/>
-
-<script type="text/javascript" src="/media/default/js/funktions.js"></script>
-<script type="text/javascript" src="/media/default/js/mootools-1.2.5-core.js"></script>
-<script type="text/javascript" src="/media/default/js/mootools-1.2.4.4-more.js"></script>
-
-<title>{% block title %}pyLoad {{_("Webinterface")}}{% endblock %}</title>
-
-<script type="text/javascript">
-var add_bg, add_box, cap_box, cap_info;
-document.addEvent("domready", function(){
-
- add_bg = new Fx.Tween($('add_bg'));
- add_box = new Fx.Tween($('add_box'));
- cap_box = new Fx.Tween($('cap_box'));
-
- add_bg.set("opacity", 0);
- add_box.set("opacity", 0);
- cap_box.set("opacity", 0);
-
-
- $('add_form').onsubmit=function() {
- $('add_form').target = 'upload_target';
- if ($('add_name').value == "" && $('add_file').value == ""){
- alert("{{_("Please Enter a packagename.")}}");
- return false;
- }else{
- out();
- }
- };
-
- $('add_reset').addEvent('click', function(){
- out();
- });
-
- var jsonStatus = new Request.JSON({
- url: "/json/status",
- onSuccess: LoadJsonToContent,
- secure: false,
- async: true,
- initialDelay: 0,
- delay: 4000,
- limit: 30000
- });
-
- $('action_play').addEvent('click', function(){
- new Request({method: 'get', url: '/json/unpause'}).send();
- });
-
-
- $('action_cancel').addEvent('click', function(){
- new Request({method: 'get', url: '/json/cancel'}).send();
- });
-
-
- $('action_stop').addEvent('click', function(){
- new Request({method: 'get', url: '/json/pause'}).send();
- });
-
- $('cap_info').addEvent('click', function(){
- load_cap("get", "");
- show_cap();
- });
-
- $('cap_reset').addEvent('click', function(){
- hide_cap()
- });
-
- $('cap_form').addEvent('submit', function(e){
- submit_cap();
- e.stop()
- });
-
- jsonStatus.startTimer();
-
-});
-
-function LoadJsonToContent(data)
-{
- $("speed").set('text', Math.round(data.speed*100)/100);
- $("aktiv").set('text', data.activ);
- $("aktiv_from").set('text', data.queue);
-
- if (data.captcha){
- $("cap_info").setStyle('display', 'inline');
- }else{
- $("cap_info").setStyle('display', 'none');
- }
-
- if (data.download) {
- $("time").set('text', " {{_("on")}}");
- $("time").setStyle('background-color', "#8ffc25");
-
- }else{
- $("time").set('text', " {{_("off")}}");
- $("time").setStyle('background-color', "#fc6e26");
- }
-
- if (data.reconnect){
- $("reconnect").set('text', " {{_("on")}}");
- $("reconnect").setStyle('background-color', "#8ffc25");
- }
- else{
- $("reconnect").set('text', " {{_("off")}}");
- $("reconnect").setStyle('background-color', "#fc6e26");
- }
-}
-function bg_show(){
- $("add_bg").setStyle('display', 'block');
- add_bg.start('opacity',0.8);
-}
-
-function bg_hide(){
- add_bg.start('opacity',0).chain(function(){
- $('add_bg').setStyle('display', 'none');
- });
-}
-
-function show(){
- bg_show();
- $("add_form").reset();
- $("add_box").setStyle('display', 'block');
- add_box.start('opacity',1)
-}
-
-function out(){
- bg_hide();
- add_box.start('opacity',0).chain(function(){
- $('add_box').setStyle('display', 'none');
- });
-}
-function show_cap(){
- bg_show();
- $("cap_box").setStyle('display', 'block');
- cap_box.start('opacity',1)
-}
-
-function hide_cap(){
- bg_hide();
- cap_box.start('opacity',0).chain(function(){
- $('cap_box').setStyle('display', 'none');
- });
-}
-
-function load_cap(method, post){
- new Request.JSON({
- url: "/json/set_captcha",
- onSuccess: function(data){
- if (data.captcha){
- $('cap_img').set('src', data.src);
- $('cap_span').setStyle('display', 'block');
- $$('#cap_form p')[0].set('text', '{{_("Please read the text on the captcha.")}}');
- $('cap_id').set('value', data.id);
- } else{
- $('cap_img').set('src', '');
- $('cap_span').setStyle('display', 'none');
- $$('#cap_form p')[0].set('text', '{{_("No Captchas to read.")}}');
- }
- },
- secure: false,
- async: true,
- method: method
- }).send(post);
-}
-
-function submit_cap(){
- load_cap("post", "cap_id="+ $('cap_id').get('value') +"&cap_text=" + $('cap_text').get('value') );
- $('cap_text').set('value', '');
- return false;
-}
-
-
-function AddBox()
-{
- if ($("add_box").getStyle("display") == "hidden" || $("add_box").getStyle("display") == "none" || $("add_box").getStyle("opacity" == 0))
- {
- show();
- }
- else
- {
- out();
- }
-}
-
-</script>
-
-{% block head %}
-{% endblock %}
-</head>
-<body>
-<a class="anchor" name="top" id="top"></a>
-
-<div id="head-panel">
-
-
- <div id="head-search-and-login">
- {% block headpanel %}
-
- {% if user.is_authenticated %}
-
-<span id="cap_info" style="display: {% if captcha %}inline{%else%}none{% endif %}">
-<img src="/media/default/img/images.png" alt="Captcha:" style="vertical-align:middle; margin:2px" />
-<span style="font-weight: bold; cursor: pointer; margin-right: 2px;">{{_("Captcha waiting")}}</span>
-</span>
-
-<img src="/media/default/img/head-login.png" alt="User:" style="vertical-align:middle; margin:2px" /><span style="padding-right: 2px;">{{user.name}}</span>
- <ul id="user-actions">
- <li><a href="/logout" class="action logout" rel="nofollow">{{_("Logout")}}</a></li>
- {% if user.is_staff %}
- <li><a href="/admin" class="action profile" rel="nofollow">{{_("Administrate")}}</a></li>
- {% endif %}
-
- </ul>
-{% else %}
- <span style="padding-right: 2px;">{{_("Please Login!")}}</span>
-{% endif %}
-
- {% endblock %}
- </div>
-
- <a href="/"><img id="head-logo" src="/media/default/img/pyload-logo-edited3.5-new-font-small.png" alt="pyLoad" /></a>
-
- <div id="head-menu">
- <ul>
-
- {% block menu %}
- <li class="selected">
- <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
- </li>
- <li>
- <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
- </li>
- <li>
- <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
- </li>
- <li>
- <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
- </li>
- <li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
- </li>
- <li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
- </li>
- {% endblock %}
-
- </ul>
- </div>
-
- <div style="clear:both;"></div>
-</div>
-
-{% if perms.status %}
-<ul id="page-actions2">
- <li id="action_play"><a href="#" class="action play" accesskey="o" rel="nofollow">{{_("Start")}}</a></li>
- <li id="action_stop"><a href="#" class="action stop" accesskey="o" rel="nofollow">{{_("Stop")}}</a></li>
- <li id="action_cancel"><a href="#" class="action cancel" accesskey="o" rel="nofollow">{{_("Cancel")}}</a></li>
- <li id="action_add"><a href="javascript:AddBox();" class="action add" accesskey="o" rel="nofollow" >{{_("Add")}}</a></li>
-</ul>
-{% endif %}
-
-{% if perms.see_downloads %}
-<ul id="page-actions">
- <li><span class="time">{{_("Download:")}}</span><a id="time" style=" background-color: {% if status.download %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.download %}{{_("on")}}{% else %}{{_("off")}}{% endif %}</a></li>
- <li><span class="reconnect">{{_("Reconnect:")}}</span><a id="reconnect" style=" background-color: {% if status.reconnect %}#8ffc25{% else %} #fc6e26{% endif %}; padding-left: 0cm; padding-right: 0.1cm; "> {% if status.reconnect %}{{_("on")}}{% else %}{{_("off")}}{% endif %}</a></li>
- <li><a class="action backlink">{{_("Speed:")}} <b id="speed">{{ status.speed }}</b> kb/s</a></li>
- <li><a class="action cog">{{_("Active:")}} <b id="aktiv">{{ status.activ }}</b> / <b id="aktiv_from">{{ status.queue }}</b></a></li>
- <li><a href="" class="action revisions" accesskey="o" rel="nofollow">{{_("Reload page")}}</a></li>
-</ul>
-{% endif %}
-
-{% block pageactions %}
-{% endblock %}
-<br/>
-
-<div id="body-wrapper" class="dokuwiki">
-
-<div id="content" lang="en" dir="ltr">
-
-<h1>{% block subtitle %}pyLoad - {{_("Webinterface")}}{% endblock %}</h1>
-
-{% block statusbar %}
-{% endblock %}
-
-
-<br/>
-
-<div class="level1" style="clear:both">
-</div>
-<noscript><h1>Enable JavaScript to use the webinterface.</h1></noscript>
-
-{% for message in messages %}
- <b><p>{{message}}</p></b>
-{% endfor %}
-
-{% block content %}
-{% endblock content %}
-
- <hr style="clear: both;" />
-
-<div id="foot">&copy; 2008-2011 pyLoad Team
-<a href="#top" class="action top" accesskey="x"><span>{{_("Back to top")}}</span></a><br />
-<!--<div class="breadcrumbs"></div>-->
-
-</div>
-</div>
-</div>
-
-{% include "default/window.html" %}
-{% include "default/captcha.html" %}
-</body>
-</html>
diff --git a/module/web/templates/jinja/default/captcha.html b/module/web/templates/jinja/default/captcha.html
deleted file mode 100644
index b3be3deca..000000000
--- a/module/web/templates/jinja/default/captcha.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<iframe id="upload_target" name="upload_target" src="" style="display: none; width:0;height:0"></iframe>
-<!--<div id="add_box" style="left:50%; top:200px; margin-left: -450px; width: 900px; position: absolute; background: #FFF; padding: 10px 10px 10px 10px; display:none;">-->
-
- <!--<div style="width: 900px; text-align: right;"><b onclick="AddBox();">[Close]</b></div>-->
-<div id="cap_box" class="myform">
- <form id="cap_form" action="/json/set_captcha" method="POST" enctype="multipart/form-data" onsubmit="return false;">
-<h1>{{_("Captcha reading")}}</h1>
-<p>{{_("Please read the text on the captcha.")}}</p>
-
-<span id="cap_span">
-
-<label>{{_("Captcha")}}
-<span class="small">{{_("The captcha.")}}</span>
-</label>
-<span class="cont">
- <img id="cap_img" style="padding: 2px;" src="">
-</span>
-
-<label>{{_("Text")}}
-<span class="small">{{_("Input the text on the captcha.")}}</span>
-</label>
-<input id="cap_text" name="cap_text" type="text" size="20" />
-<input type="hidden" value="" name="cap_id" id="cap_id"/>
-
-</span>
-
-<button id="cap_submit" type="submit">{{_("Submit")}}</button>
-<button id="cap_reset" style="margin-left:0px;" type="reset">{{_("Close")}}</button>
-
-<div class="spacer"></div>
-
-
-</form>
-
-</div> \ No newline at end of file
diff --git a/module/web/templates/jinja/default/collector.html b/module/web/templates/jinja/default/collector.html
deleted file mode 100644
index 3e6b47234..000000000
--- a/module/web/templates/jinja/default/collector.html
+++ /dev/null
@@ -1,84 +0,0 @@
-{% extends 'default/base.html' %}
-{% block head %}
-
-<script type="text/javascript" src="/package_ui.js"></script>
-
-<script type="text/javascript">
-
-document.addEvent("domready", function(){
- var pUI = new PackageUI("url", 0);
-});
-</script>
-{% endblock %}
-
-{% block title %}{{_("Collector")}} - {{super()}} {% endblock %}
-{% block subtitle %}{{_("Collector")}}{% endblock %}
-
-{% block menu %}
-<li>
- <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
-</li>
-<li>
- <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
-</li>
-<li class="selected">
- <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
-</li>
-<li>
- <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
-</li>
-<li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
-</li>
-<li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
-</li>{% endblock %}
-
-{% block pageactions %}
-<ul id="page-actions-more">
- <li id="del_finished"><a style="padding: 0; font-weight: bold;" href="#">{{_("Delete Finished")}}</a></li>
- <li id="restart_failed"><a style="padding: 0; font-weight: bold;" href="#">{{_("Restart Failed")}}</a></li>
-</ul>
-{% endblock %}
-
-{% block content %}
-<div id="load-success" style="opacity: 0; float: right; color: white; background-color: #90ee90; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{{_("success")}}</div>
-<div id="load-failure" style="opacity: 0; float: right; color: white; background-color: #f08080; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{{_("failure")}}</div>
-<div id="load-indicator" style="opacity: 0; float: right; margin-top: -10px;">
- <img src="/media/default/img/ajax-loader.gif" alt="" style="padding-right: 5px"/>
- {{_("loading")}}
-</div>
-
-<ul id="package-list" style="list-style: none; padding-left: 0; margin-top: -10px;">
-{% for id, package in content %}
- <li>
-<div id="package_{{id}}" class="package">
- <div class="order" style="display: none;">{{ package.order }}</div>
-
- <div class="packagename" style="cursor: pointer;">
- <img class="package_drag" src="/media/default/img/folder.png" style="cursor: move; margin-bottom: -2px">
- <span class="name">{{package.name}}</span>
- &nbsp;&nbsp;
- <span class="buttons" style="opacity:0">
- <img title="{{_("Delete Package")}}" style="cursor: pointer" width="12px" height="12px" src="/media/default/img/delete.png" />
- &nbsp;&nbsp;
- <img title="{{_("Restart Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/arrow_refresh.png" />
- &nbsp;&nbsp;
- <img title="{{_("Edit Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/pencil.png" />
- &nbsp;&nbsp;
- <img title="{{_("Move Package to Queue")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/package_go.png" />
- </span>
- </div>
- <div id="children_{{id}}" style="display: none;" class="children">
- <span class="child_secrow">{{_("Folder:")}} <span class="folder">{{package.folder}}</span> | {{_("Password:")}} <span class="password">{{package.password}}</span> | {{_("Priority:")}} <span class="prio">{{package.priority}}</span></span>
- <ul id="sort_children_{{id}}" style="list-style: none; padding-left: 0">
- </ul>
- </div>
-</div>
- </li>
-{% endfor %}
-</ul>
-
-{% include "default/edit_package.html" %}
-
-{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/jinja/default/downloads.html b/module/web/templates/jinja/default/downloads.html
deleted file mode 100644
index 813dc8d06..000000000
--- a/module/web/templates/jinja/default/downloads.html
+++ /dev/null
@@ -1,50 +0,0 @@
-{% extends 'default/base.html' %}
-
-{% block title %}Downloads - {{super()}} {% endblock %}
-
-{% block menu %}
-<li>
- <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
-</li>
-<li>
- <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
-</li>
-<li>
- <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
-</li>
-<li class="selected">
- <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
-</li>
-<li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
-</li>
-<li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
-</li>
-{% endblock %}
-
-{% block subtitle %}
-{{_("Downloads")}}
-{% endblock %}
-
-{% block content %}
-
-<ul>
- {% for folder in files.folder %}
- <li>
- {{ folder.name }}
- <ul>
- {% for file in folder.files %}
- <li><a href='get/{{ folder.path|escape }}/{{ file|escape }}'>{{file}}</a></li>
- {% endfor %}
- </ul>
- </li>
- {% endfor %}
-
- {% for file in files.files %}
- <li> <a href='get/{{ file|escape }}'>{{ file }}</a></li>
- {% endfor %}
-
-</ul>
-
-{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/jinja/default/edit_package.html b/module/web/templates/jinja/default/edit_package.html
deleted file mode 100644
index 0c9dcff42..000000000
--- a/module/web/templates/jinja/default/edit_package.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<div id="pack_box" class="myform" style="z-index: 2">
-<form id="pack_form" action="/json/edit_package" method="POST" enctype="multipart/form-data">
-<h1>{{_("Edit Package")}}</h1>
-<p>{{_("Edit the package detais below.")}}</p>
-<input name="pack_id" id="pack_id" type="hidden" value=""/>
-<label for="pack_name">{{_("Name")}}
-<span class="small">{{_("The name of the package.")}}</span>
-</label>
-<input id="pack_name" name="pack_name" type="text" size="20" />
-
-<label for="pack_folder">{{_("Folder")}}
-<span class="small">{{_("Name of subfolder for these downloads.")}}</span>
-</label>
-<input id="pack_folder" name="pack_folder" type="text" size="20" />
-
-<label for="pack_prio">{{_("Priority")}}
-<span class="small">{{_("Priority of the package.")}}</span>
-</label>
- <select name="pack_prio" id="pack_prio">
- <option value="3">{{_("highest")}}</option>
- <option value="2">{{_("higher")}}</option>
- <option value="1">{{_("high")}}</option>
- <option value="0" selected="selected">{{_("normal")}}</option>
- <option value="-1">{{_("low")}}</option>
- <option value="-2">{{_("lower")}}</option>
- <option value="-3">{{_("lowest")}}</option>
- </select>
-
-<label for="pack_pws">{{_("Password")}}
-<span class="small">{{_("List of passwords used for unrar.")}}</span>
-</label>
-<textarea rows="3" name="pack_pws" id="pack_pws"></textarea>
-
-<button type="submit">{{_("Submit")}}</button>
-<button id="pack_reset" style="margin-left: 0" type="reset">{{_("Reset")}}</button>
-<div class="spacer"></div>
-
-</form>
-
-</div> \ No newline at end of file
diff --git a/module/web/templates/jinja/default/home.html b/module/web/templates/jinja/default/home.html
deleted file mode 100644
index b2cef2cb7..000000000
--- a/module/web/templates/jinja/default/home.html
+++ /dev/null
@@ -1,241 +0,0 @@
-{% extends 'default/base.html' %}
-{% block head %}
-
-<script type="text/javascript">
-
-var em;
-var operafix = (navigator.userAgent.toLowerCase().search("opera") >= 0);
-
-document.addEvent("domready", function(){
- em = new EntryManager();
-});
-
-var EntryManager = new Class({
- initialize: function(){
- this.json = new Request.JSON({
- url: "json/links",
- secure: false,
- async: true,
- onSuccess: this.update.bind(this),
- initialDelay: 0,
- delay: 2500,
- limit: 30000
- });
-
- this.ids = [{% for link in content %}
- {% if forloop.last %}
- {{ link.id }}
- {% else %}
- {{ link.id }},
- {% endif %}
- {% endfor %}];
-
- this.entries = [];
- this.container = $('LinksAktiv');
-
- this.parseFromContent();
-
- this.json.startTimer();
- },
- parseFromContent: function(){
- this.ids.each(function(id,index){
- var entry = new LinkEntry(id);
- entry.parse();
- this.entries.push(entry)
- }, this);
- },
- update: function(data){
-
- try{
- this.ids = this.entries.map(function(item){
- return item.id
- });
-
- this.ids.filter(function(id){
- return !this.ids.contains(id)
- },data).each(function(id){
- var index = this.ids.indexOf(id);
- this.entries[index].remove();
- this.entries = this.entries.filter(function(item){return item.id != this},id);
- this.ids = this.ids.erase(id)
- }, this);
-
- data.links.each(function(link, i){
- if (this.ids.contains(link.id)){
-
- var index = this.ids.indexOf(link.id);
- this.entries[index].update(link)
-
- }else{
- var entry = new LinkEntry(link.id);
- entry.insert(link);
- this.entries.push(entry);
- this.ids.push(link.id);
- this.container.adopt(entry.elements.tr,entry.elements.pgbTr);
- entry.fade.start('opacity', 1);
- entry.fadeBar.start('opacity', 1);
-
- }
- }, this)
- }catch(e){
- //alert(e)
- }
- }
-});
-
-
-var LinkEntry = new Class({
- initialize: function(id){
- this.id = id
- },
- parse: function(){
- this.elements = {
- tr: $("link_{id}".substitute({id: this.id})),
- name: $("link_{id}_name".substitute({id: this.id})),
- status: $("link_{id}_status".substitute({id: this.id})),
- info: $("link_{id}_info".substitute({id: this.id})),
- bleft: $("link_{id}_kbleft".substitute({id: this.id})),
- percent: $("link_{id}_percent".substitute({id: this.id})),
- remove: $("link_{id}_remove".substitute({id: this.id})),
- pgbTr: $("link_{id}_pgb_tr".substitute({id: this.id})),
- pgb: $("link_{id}_pgb".substitute({id: this.id}))
- };
- this.initEffects();
- },
- insert: function(item){
- try{
-
- this.elements = {
- tr: new Element('tr', {
- 'html': '',
- 'styles':{
- 'opacity': 0
- }
- }),
- name: new Element('td', {
- 'html': item.name
- }),
- status: new Element('td', {
- 'html': item.statusmsg
- }),
- info: new Element('td', {
- 'html': item.info
- }),
- bleft: new Element('td', {
- 'html': HumanFileSize(item.size)
- }),
- percent: new Element('span', {
- 'html': item.percent+ '% / '+ HumanFileSize(item.size-item.bleft)
- }),
- remove: new Element('img',{
- 'src': 'media/default/img/control_cancel.png',
- 'styles':{
- 'vertical-align': 'middle',
- 'margin-right': '-20px',
- 'margin-left': '5px',
- 'margin-top': '-2px',
- 'cursor': 'pointer'
- }
- }),
- pgbTr: new Element('tr', {
- 'html':''
- }),
- pgb: new Element('div', {
- 'html': '&nbsp;',
- 'styles':{
- 'height': '4px',
- 'width': item.percent+'%',
- 'background-color': '#ddd'
- }
- })
- };
-
- this.elements.tr.adopt(this.elements.name,this.elements.status,this.elements.info,this.elements.bleft,new Element('td').adopt(this.elements.percent,this.elements.remove));
- this.elements.pgbTr.adopt(new Element('td',{'colspan':5}).adopt(this.elements.pgb));
- this.initEffects();
- }catch(e){
- alert(e)
- }
- },
- initEffects: function(){
- if(!operafix)
- this.bar = new Fx.Morph(this.elements.pgb, {unit: '%', duration: 5000, link: 'link', fps:30});
- this.fade = new Fx.Tween(this.elements.tr);
- this.fadeBar = new Fx.Tween(this.elements.pgbTr);
-
- this.elements.remove.addEvent('click', function(){
- new Request({method: 'get', url: '/json/abort_link/'+this.id}).send();
- }.bind(this));
-
- },
- update: function(item){
- this.elements.name.set('text', item.name);
- this.elements.status.set('text', item.statusmsg);
- this.elements.info.set('text', item.info);
- this.elements.bleft.set('text', item.format_size);
- this.elements.percent.set('text', item.percent+ '% / '+ HumanFileSize(item.size-item.bleft));
- if(!operafix)
- {
- this.bar.start({
- 'width': item.percent,
- 'background-color': [Math.round(120/100*item.percent),100,100].hsbToRgb().rgbToHex()
- });
- }
- else
- {
- this.elements.pgb.set(
- 'styles', {
- 'height': '4px',
- 'width': item.percent+'%',
- 'background-color': [Math.round(120/100*item.percent),100,100].hsbToRgb().rgbToHex(),
- });
- }
- },
- remove: function(){
- this.fade.start('opacity',0).chain(function(){this.elements.tr.dispose();}.bind(this));
- this.fadeBar.start('opacity',0).chain(function(){this.elements.pgbTr.dispose();}.bind(this));
-
- }
- });
-</script>
-
-{% endblock %}
-
-{% block subtitle %}
-{{_("Active Downloads")}}
-{% endblock %}
-
-{% block content %}
-<table width="100%" class="queue">
- <thead>
- <tr class="header">
- <th>{{_("Name")}}</th>
- <th>{{_("Status")}}</th>
- <th>{{_("Information")}}</th>
- <th>{{_("Size")}}</th>
- <th>{{_("Progress")}}</th>
- </tr>
- </thead>
- <tbody id="LinksAktiv">
-
- {% for link in content %}
- <tr id="link_{{ link.id }}">
- <td id="link_{{ link.id }}_name">{{ link.name }}</td>
- <td id="link_{{ link.id }}_status">{{ link.status }}</td>
- <td id="link_{{ link.id }}_info">{{ link.info }}</td>
- <td id="link_{{ link.id }}_kbleft">{{ link.format_size }}</td>
- <td>
- <span id="link_{{ link.id }}_percent">{{ link.percent }}% /{{ link.kbleft }}</span>
- <img id="link_{{ link.id }}_remove" style="vertical-align: middle; margin-right: -20px; margin-left: 5px; margin-top: -2px; cursor:pointer;" src="media/default/img/control_cancel.png"/>
- </td>
- </tr>
- <tr id="link_{{ link.id }}_pgb_tr">
- <td colspan="5">
- <div id="link_{{ link.id }}_pgb" class="progressBar" style="background-color: green; height:4px; width: {{ link.percent }}%;">&nbsp;</div>
- </td>
- </tr>
- {% endfor %}
-
- </tbody>
-</table>
-{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/jinja/default/login.html b/module/web/templates/jinja/default/login.html
deleted file mode 100644
index 0e9e4d568..000000000
--- a/module/web/templates/jinja/default/login.html
+++ /dev/null
@@ -1,35 +0,0 @@
-{% extends 'default/base.html' %}
-
-{% block title %}{{_("Login")}} - {{super()}} {% endblock %}
-
-{% block content %}
-
-<div class="centeralign">
-<form action="" method="post" accept-charset="utf-8" id="login">
- <div class="no">
- <input type="hidden" name="do" value="login" />
- <fieldset>
- <legend>Login</legend>
- <label>
- <span>{{_("Username")}}</span>
- <input type="text" size="20" name="username"/>
- </label>
- <br />
- <label>
- <span>{{_("Password")}}</span>
- <input type="password" size="20" name="password">
- </label>
- <br />
- <input type="submit" value="Login" class="button" />
- </fieldset>
- </div>
-</form>
-
-{% if errors %}
-<p>{{_("Your username and password didn't match. Please try again.")}}</p>
-{% endif %}
-
-</div>
-<br>
-
-{% endblock %}
diff --git a/module/web/templates/jinja/default/logout.html b/module/web/templates/jinja/default/logout.html
deleted file mode 100644
index d3f07472b..000000000
--- a/module/web/templates/jinja/default/logout.html
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends 'default/base.html' %}
-
-{% block head %}
-<meta http-equiv="refresh" content="3; url=/">
-{% endblock %}
-
-{% block content %}
-<p><b>{{_("You were successfully logged out.")}}</b></p>
-{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/jinja/default/logs.html b/module/web/templates/jinja/default/logs.html
deleted file mode 100644
index 7a95b4364..000000000
--- a/module/web/templates/jinja/default/logs.html
+++ /dev/null
@@ -1,61 +0,0 @@
-{% extends 'default/base.html' %}
-
-{% block title %}{{_("Logs")}} - {{super()}} {% endblock %}
-{% block subtitle %}{{_("Logs")}}{% endblock %}
-{% block head %}
-<link rel="stylesheet" type="text/css" href="/media/default/css/log.css"/>
-{% endblock %}
-{% block menu %}
-<li>
- <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
-</li>
-<li>
- <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
-</li>
-<li>
- <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
-</li>
-<li>
- <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
-</li>
-<li class="right selected">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
-</li>
-<li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
-</li>
-{% endblock %}
-
-{% block content %}
-<div style="clear: both;"></div>
-
-<div class="logpaginator"><a href="{{ "/logs/1" }}">&lt;&lt; {{_("Start")}}</a> <a href="{{ "/logs/" + iprev|string }}">&lt; {{_("prev")}}</a> <a href="{{ "/logs/" + inext|string }}">{{_("next")}} &gt;</a> <a href="/logs/">{{_("End")}} &gt;&gt;</a></div>
-<div class="logperpage">
- <form id="logform1" action="" method="POST">
- <label for="reversed">Reversed:</label>
- <input type="checkbox" name="reversed" onchange="this.form.submit();" {% if reversed %} checked="checked" {% endif %} />&nbsp;
- <label for="perpage">Lines per page:</label>
- <select name="perpage" onchange="this.form.submit();">
- {% for value in perpage_p %}
- <option value="{{value.0}}"{% if value.0 == perpage %} selected="selected" {% endif %}>{{value.1}}</option>
- {% endfor %}
- </select>
- </form>
-</div>
-<div class="logwarn">{{warning}}</div>
-<div style="clear: both;"></div>
-<div class="logdiv">
- <table class="logtable" cellpadding="0" cellspacing="0">
- {% for line in log %}
- <tr><td class="logline">{{line.line}}</td><td>{{line.date}}</td><td class="loglevel">{{line.level}}</td><td>{{line.message}}</td></tr>
- {% endfor %}
- </table>
-</div>
-<div class="logform">
-<form id="logform2" action="" method="POST">
- <label for="from">Jump to time:</label><input type="text" name="from" size="15" value="{{from}}"/>
- <input type="submit" value="ok" />
-</form>
-</div>
-<div style="clear: both; height: 10px;">&nbsp; </div>
-{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/jinja/default/package_ui.js b/module/web/templates/jinja/default/package_ui.js
deleted file mode 100644
index 45e284903..000000000
--- a/module/web/templates/jinja/default/package_ui.js
+++ /dev/null
@@ -1,408 +0,0 @@
-var load, success, fail, pack_box;
-
-document.addEvent("domready", function() {
- load = new Fx.Tween($("load-indicator"), {link: "cancel"});
- success = new Fx.Tween($("load-success"), {link: "chain"});
- fail = new Fx.Tween($("load-failure"), {link: "chain"});
-
- [load,success,fail].each(function(fx) {
- fx.set("opacity", 0)
- });
-
- pack_box = new Fx.Tween($('pack_box'));
- $('pack_reset').addEvent('click', function() {
- hide_pack()
- });
-});
-
-function indicateLoad() {
- //$("load-indicator").reveal();
- load.start("opacity", 1)
-}
-
-function indicateFinish() {
- load.start("opacity", 0)
-}
-
-function indicateSuccess() {
- indicateFinish();
- success.start("opacity", 1).chain(function() {
- (function() {
- success.start("opacity", 0);
- }).delay(250);
- });
-
-}
-
-function indicateFail() {
- indicateFinish();
- fail.start("opacity", 1).chain(function() {
- (function() {
- fail.start("opacity", 0);
- }).delay(250);
- });
-}
-
-function show_pack() {
- bg_show();
- $("pack_box").setStyle('display', 'block');
- pack_box.start('opacity', 1)
-}
-
-function hide_pack() {
- bg_hide();
- pack_box.start('opacity', 0).chain(function() {
- $('pack_box').setStyle('display', 'none');
- });
-}
-
-var PackageUI = new Class({
- initialize: function(url, type) {
- this.url = url;
- this.type = type;
- this.packages = [];
- this.parsePackages();
-
- this.sorts = new Sortables($("package-list"), {
- constrain: false,
- clone: true,
- revert: true,
- opacity: 0.4,
- handle: ".package_drag",
- //onStart: this.startSort,
- onComplete: this.saveSort.bind(this)
- });
-
- $("del_finished").addEvent("click", this.deleteFinished.bind(this));
- $("restart_failed").addEvent("click", this.restartFailed.bind(this));
-
- },
-
- parsePackages: function() {
- $("package-list").getChildren("li").each(function(ele) {
- var id = ele.getFirst().get("id").match(/[0-9]+/);
- this.packages.push(new Package(this, id, ele))
- }.bind(this))
- },
-
- loadPackages: function() {
- },
-
- deleteFinished: function() {
- indicateLoad();
- new Request.JSON({
- method: 'get',
- url: '/json/delete_finished',
- onSuccess: function(data) {
- if (data.del.length > 0) {
- window.location.reload()
- } else {
- this.packages.each(function(pack) {
- pack.close();
- });
- indicateSuccess();
- }
- }.bind(this),
- onFailure: indicateFail
- }).send();
- },
-
- restartFailed: function() {
- indicateLoad();
- new Request.JSON({
- method: 'get',
- url: '/json/restart_failed',
- onSuccess: function(data) {
- this.packages.each(function(pack) {
- pack.close();
- });
- indicateSuccess();
- }.bind(this),
- onFailure: indicateFail
- }).send();
- },
-
- startSort: function(ele, copy) {
- },
-
- saveSort: function(ele, copy) {
- var order = [];
- this.sorts.serialize(function(li, pos) {
- if (li == ele && ele.retrieve("order") != pos) {
- order.push(ele.retrieve("pid") + "|" + pos)
- }
- li.store("order", pos)
- });
- if (order.length > 0) {
- indicateLoad();
- new Request.JSON({
- method: 'get',
- url: '/json/package_order/' + order[0],
- onSuccess: indicateFinish,
- onFailure: indicateFail
- }).send();
- }
- }
-
-});
-
-var Package = new Class({
- initialize: function(ui, id, ele, data) {
- this.ui = ui;
- this.id = id;
- this.linksLoaded = false;
-
- if (!ele) {
- this.createElement(data);
- } else {
- this.ele = ele;
- this.order = ele.getElements("div.order")[0].get("html");
- this.ele.store("order", this.order);
- this.ele.store("pid", this.id);
- this.parseElement();
- }
-
- var pname = this.ele.getElements(".packagename")[0];
- this.buttons = new Fx.Tween(this.ele.getElements(".buttons")[0], {link: "cancel"});
- this.buttons.set("opacity", 0);
-
- pname.addEvent("mouseenter", function(e) {
- this.buttons.start("opacity", 1)
- }.bind(this));
-
- pname.addEvent("mouseleave", function(e) {
- this.buttons.start("opacity", 0)
- }.bind(this));
-
-
- },
-
- createElement: function() {
- alert("create")
- },
-
- parseElement: function() {
- var imgs = this.ele.getElements('img');
-
- this.name = this.ele.getElements('.name')[0];
- this.folder = this.ele.getElements('.folder')[0];
- this.password = this.ele.getElements('.password')[0];
- this.prio = this.ele.getElements('.prio')[0];
-
- imgs[1].addEvent('click', this.deletePackage.bind(this));
-
- imgs[2].addEvent('click', this.restartPackage.bind(this));
-
- imgs[3].addEvent('click', this.editPackage.bind(this));
-
- imgs[4].addEvent('click', this.movePackage.bind(this));
-
- this.ele.getElement('.packagename').addEvent('click', this.toggle.bind(this));
-
- },
-
- loadLinks: function() {
- indicateLoad();
- new Request.JSON({
- method: 'get',
- url: '/json/package/' + this.id,
- onSuccess: this.createLinks.bind(this),
- onFailure: indicateFail
- }).send();
- },
-
- createLinks: function(data) {
- var ul = $("sort_children_{id}".substitute({"id": this.id}));
- ul.erase("html");
- data.links.each(function(link) {
- var li = new Element("li", {
- "style": {
- "margin-left": 0
- }
- });
-
- var html = "<span style='cursor: move' class='child_status sorthandle'><img src='/media/default/img/{icon}' style='width: 12px; height:12px;'/></span>\n".substitute({"icon": link.icon});
- html += "<span style='font-size: 15px'>{name}</span><br /><div class='child_secrow'>".substitute({"name": link.name});
- html += "<span class='child_status'>{statusmsg}</span>{error}&nbsp;".substitute({"statusmsg": link.statusmsg, "error":link.error});
- html += "<span class='child_status'>{format_size}</span>".substitute({"format_size": link.format_size});
- html += "<span class='child_status'>{plugin}</span>&nbsp;&nbsp;".substitute({"plugin": link.plugin});
- html += "<img title='{{_("Delete Link")}}' style='cursor: pointer;' width='10px' height='10px' src='/media/default/img/delete.png' />&nbsp;&nbsp;";
- html += "<img title='{{_("Restart Link")}}' style='cursor: pointer;margin-left: -4px' width='10px' height='10px' src='/media/default/img/arrow_refresh.png' /></div>";
-
- var div = new Element("div", {
- "id": "file_" + link.id,
- "class": "child",
- "html": html
- });
-
- li.store("order", link.order);
- li.store("lid", link.id);
-
- li.adopt(div);
- ul.adopt(li);
- });
- this.sorts = new Sortables(ul, {
- constrain: false,
- clone: true,
- revert: true,
- opacity: 0.4,
- handle: ".sorthandle",
- onComplete: this.saveSort.bind(this)
- });
- this.registerLinkEvents();
- this.linksLoaded = true;
- indicateFinish();
- this.toggle();
- },
-
- registerLinkEvents: function() {
- this.ele.getElements('.child').each(function(child) {
- var lid = child.get('id').match(/[0-9]+/);
- var imgs = child.getElements('.child_secrow img');
- imgs[0].addEvent('click', function(e) {
- new Request({
- method: 'get',
- url: '/json/remove_link/' + this,
- onSuccess: function() {
- $('file_' + this).nix()
- }.bind(this),
- onFailure: indicateFail
- }).send();
- }.bind(lid));
-
- imgs[1].addEvent('click', function(e) {
- new Request({
- method: 'get',
- url: '/json/restart_link/' + this,
- onSuccess: function() {
- var ele = $('file_' + this);
- var imgs = ele.getElements("img");
- imgs[0].set("src", "/media/default/img/status_queue.png");
- var spans = ele.getElements(".child_status");
- spans[1].set("html", "queued");
- indicateSuccess();
- }.bind(this),
- onFailure: indicateFail
- }).send();
- }.bind(lid));
- });
- },
-
- toggle: function() {
- var child = this.ele.getElement('.children');
- if (child.getStyle('display') == "block") {
- child.dissolve();
- } else {
- if (!this.linksLoaded) {
- this.loadLinks();
- } else {
- child.reveal();
- }
- }
- },
-
- deletePackage: function(event) {
- indicateLoad();
- new Request({
- method: 'get',
- url: '/json/remove_package/' + this.id,
- onSuccess: function() {
- this.ele.nix();
- indicateFinish();
- }.bind(this),
- onFailure: indicateFail
- }).send();
- event.stop();
- },
-
- restartPackage: function(event) {
- indicateLoad();
- new Request({
- method: 'get',
- url: '/json/restart_package/' + this.id,
- onSuccess: function() {
- this.close();
- indicateSuccess();
- }.bind(this),
- onFailure: indicateFail
- }).send();
- event.stop();
- },
-
- close: function() {
- var child = this.ele.getElement('.children');
- if (child.getStyle('display') == "block") {
- child.dissolve();
- }
- var ul = $("sort_children_{id}".substitute({"id": this.id}));
- ul.erase("html");
- this.linksLoaded = false;
- },
-
- movePackage: function(event) {
- indicateLoad();
- new Request({
- method: 'get',
- url: '/json/move_package/' + ((this.ui.type + 1) % 2) + "/" + this.id,
- onSuccess: function() {
- this.ele.nix();
- indicateFinish();
- }.bind(this),
- onFailure: indicateFail
- }).send();
- event.stop();
- },
-
- editPackage: function(event) {
- $("pack_form").removeEvents("submit");
- $("pack_form").addEvent("submit", this.savePackage.bind(this));
-
- $("pack_id").set("value", this.id);
- $("pack_name").set("value", this.name.get("text"));
- $("pack_folder").set("value", this.folder.get("text"));
- $("pack_pws").set("value", this.password.get("text"));
-
- var prio = 3;
- $("pack_prio").getChildren("option").each(function(item, index) {
- item.erase("selected");
- if (prio.toString() == this.prio.get("text")) {
- item.set("selected", "selected");
- }
- prio--;
- }.bind(this));
-
-
- show_pack();
- event.stop();
- },
-
- savePackage: function(event) {
- $("pack_form").send();
- this.name.set("text", $("pack_name").get("value"));
- this.folder.set("text", $("pack_folder").get("value"));
- this.password.set("text", $("pack_pws").get("value"));
- this.prio.set("text", $("pack_prio").get("value"));
- hide_pack();
- event.stop();
- },
-
- saveSort: function(ele, copy) {
- var order = [];
- this.sorts.serialize(function(li, pos) {
- if (li == ele && ele.retrieve("order") != pos) {
- order.push(ele.retrieve("lid") + "|" + pos)
- }
- li.store("order", pos)
- });
- if (order.length > 0) {
- indicateLoad();
- new Request.JSON({
- method: 'get',
- url: '/json/link_order/' + order[0],
- onSuccess: indicateFinish,
- onFailure: indicateFail
- }).send();
- }
- }
-
-}); \ No newline at end of file
diff --git a/module/web/templates/jinja/default/pathchooser.html b/module/web/templates/jinja/default/pathchooser.html
deleted file mode 100644
index d00637055..000000000
--- a/module/web/templates/jinja/default/pathchooser.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<html>
-<head>
- <script class="javascript">
- function chosen()
- {
- opener.ifield.value = document.forms[0].p.value;
- close();
- }
- function exit()
- {
- close();
- }
- function setInvalid() {
- document.forms[0].send.disabled = 'disabled';
- document.forms[0].p.style.color = '#FF0000';
- }
- function setValid() {
- document.forms[0].send.disabled = '';
- document.forms[0].p.style.color = '#000000';
- }
- function setFile(file)
- {
- document.forms[0].p.value = file;
- setValid();
-
- }
- </script>
- <link rel="stylesheet" type="text/css" href="/media/default/css/pathchooser.css"/>
-</head>
-<body{% if type == 'file' %}{% if not oldfile %} onload="setInvalid();"{% endif %}{% endif %}>
-<center>
- <div id="paths">
- <form method="get" action="?" onSubmit="chosen();" onReset="exit();">
- <input type="text" name="p" value="{{ oldfile|default(cwd) }}" size="60" onfocus="setValid();">
- <input type="submit" value="Ok" name="send">
- </form>
-
- {% if type == 'folder' %}
- <span class="path_abs_rel">{{_("Path")}}: <a href="{{ "/pathchooser" + cwd|path_make_absolute|quotepath }}"{% if absolute %} style="text-decoration: underline;"{% endif %}>{{_("absolute")}}</a> | <a href="{{ "/pathchooser/" + cwd|path_make_relative|quotepath }}"{% if not absolute %} style="text-decoration: underline;"{% endif %}>{{_("relative")}}</a></span>
- {% else %}
- <span class="path_abs_rel">{{_("Path")}}: <a href="{{ "/filechooser/" + cwd|path_make_absolute|quotepath }}"{% if absolute %} style="text-decoration: underline;"{% endif %}>{{_("absolute")}}</a> | <a href="{{ "/filechooser/" + cwd|path_make_relative|quotepath }}"{% if not absolute %} style="text-decoration: underline;"{% endif %}>{{_("relative")}}</a></span>
- {% endif %}
- </div>
- <table border="0" cellspacing="0" cellpadding="3">
- <tr>
- <th>{{_("name")}}</th>
- <th>{{_("size")}}</th>
- <th>{{_("type")}}</th>
- <th>{{_("last modified")}}</th>
- </tr>
- {% if parentdir %}
- <tr>
- <td colspan="4">
- <a href="{% if type == 'folder' %}{{ "/pathchooser/" + parentdir|quotepath }}{% else %}{{ "/filechooser/" + parentdir|quotepath }}{% endif %}"><span class="parentdir">{{_("parent directory")}}</span></a>
- </td>
- </tr>
- {% endif %}
-{% for file in files %}
- <tr>
- {% if type == 'folder' %}
- <td class="name">{% if file.type == 'dir' %}<a href="{{ "/pathchooser/" + file.fullpath|quotepath }}" title="{{ file.fullpath }}"><span class="path_directory">{{ file.name|truncate(25) }}</span></a>{% else %}<span class="path_file" title="{{ file.fullpath }}">{{ file.name|truncate(25) }}{% endif %}</span></td>
- {% else %}
- <td class="name">{% if file.type == 'dir' %}<a href="{{ "/filechooser/" + file.fullpath|quotepath }}" title="{{ file.fullpath }}"><span class="file_directory">{{ file.name|truncate(25) }}</span></a>{% else %}<a href="#" onclick="setFile('{{ file.fullpath }}');" title="{{ file.fullpath }}"><span class="file_file">{{ file.name|truncate(25) }}{% endif %}</span></a></td>
- {% endif %}
- <td class="size">{{ file.size|float|filesizeformat }}</td>
- <td class="type">{% if file.type == 'dir' %}directory{% else %}{{ file.ext|default("file") }}{% endif %}</td>
- <td class="mtime">{{ file.modified|date("d.m.Y - H:i:s") }}</td>
- <tr>
-<!-- <tr>
- <td colspan="4">{{_("no content")}}</td>
- </tr> -->
-{% endfor %}
- </table>
- </center>
-</body>
-</html> \ No newline at end of file
diff --git a/module/web/templates/jinja/default/queue.html b/module/web/templates/jinja/default/queue.html
deleted file mode 100644
index e72871873..000000000
--- a/module/web/templates/jinja/default/queue.html
+++ /dev/null
@@ -1,85 +0,0 @@
-{% extends 'default/base.html' %}
-{% block head %}
-
-<script type="text/javascript" src="/package_ui.js"></script>
-
-<script type="text/javascript">
-
-document.addEvent("domready", function(){
- var pUI = new PackageUI("url",1);
-});
-</script>
-{% endblock %}
-
-{% block title %}{{_("Queue")}} - {{super()}} {% endblock %}
-{% block subtitle %}{{_("Queue")}}{% endblock %}
-
-{% block menu %}
-<li>
- <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
-</li>
-<li class="selected">
- <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
-</li>
-<li>
- <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
-</li>
-<li>
- <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
-</li>
-<li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
-</li>
-<li class="right">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>
-</li>
-{% endblock %}
-
-{% block pageactions %}
-<ul id="page-actions-more">
- <li id="del_finished"><a style="padding: 0; font-weight: bold;" href="#">{{_("Delete Finished")}}</a></li>
- <li id="restart_failed"><a style="padding: 0; font-weight: bold;" href="#">{{_("Restart Failed")}}</a></li>
-</ul>
-{% endblock %}
-
-{% block content %}
-<div id="load-success" style="opacity: 0; float: right; color: white; background-color: #90ee90; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{{_("success")}}</div>
-<div id="load-failure" style="opacity: 0; float: right; color: white; background-color: #f08080; padding: 4px; -moz-border-radius: 5px; border-radius: 5px; font-weight: bold; margin-left: -100%; margin-top: -10px;">{{_("failure")}}</div>
-<div id="load-indicator" style="opacity: 0; float: right; margin-top: -10px;">
- <img src="/media/default/img/ajax-loader.gif" alt="" style="padding-right: 5px"/>
- {{_("loading")}}
-</div>
-
-<ul id="package-list" style="list-style: none; padding-left: 0; margin-top: -10px;">
-{% for id, package in content %}
- <li>
-<div id="package_{{id}}" class="package">
- <div class="order" style="display: none;">{{ package.order }}</div>
-
- <div class="packagename" style="cursor: pointer;">
- <img class="package_drag" src="/media/default/img/folder.png" style="cursor: move; margin-bottom: -2px">
- <span class="name">{{package.name}}</span>
- &nbsp;&nbsp;
- <span class="buttons" style="opacity:0">
- <img title="{{_("Delete Package")}}" style="cursor: pointer" width="12px" height="12px" src="/media/default/img/delete.png" />
- &nbsp;&nbsp;
- <img title="{{_("Restart Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/arrow_refresh.png" />
- &nbsp;&nbsp;
- <img title="{{_("Edit Package")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/pencil.png" />
- &nbsp;&nbsp;
- <img title="{{_("Move Package to Collector")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/package_go.png" />
- </span>
- </div>
- <div id="children_{{id}}" style="display: none;" class="children">
- <span class="child_secrow">{{_("Folder:")}} <span class="folder">{{package.folder}}</span> | {{_("Password:")}} <span class="password">{{package.password}}</span> | {{_("Priority:")}} <span class="prio">{{package.priority}}</span></span>
- <ul id="sort_children_{{id}}" style="list-style: none; padding-left: 0">
- </ul>
- </div>
-</div>
- </li>
-{% endfor %}
-</ul>
-
-{% include "default/edit_package.html" %}
-
-{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/jinja/default/settings.html b/module/web/templates/jinja/default/settings.html
deleted file mode 100644
index 68c480ec2..000000000
--- a/module/web/templates/jinja/default/settings.html
+++ /dev/null
@@ -1,235 +0,0 @@
-{% extends 'default/base.html' %}
-
-{% block title %}{{ _("Config") }} - {{ super() }} {% endblock %}
-{% block subtitle %}{{ _("Config") }}{% endblock %}
-
-{% block head %}
- <script type="text/javascript">
- window.addEvent('domready', function() {
- $$('#toptabs a').addEvent('click', function(e) {
- $$('#toptabs a').removeProperty('class');
- e.target.set('class', 'selected');
-
- $$('#tabs span').removeProperty('class');
- $('g_' + e.target.get('href').substring(1)).set('class', 'selected');
-
- var firstsel = $$('#tabs span.selected a')[0];
- firstsel.fireEvent('click', {target: firstsel});
- return false;
- });
-
- $$('#tabs a').addEvent('click', function(e) {
- $$('#tabs a').removeProperty('class');
- e.target.set('class', 'selected');
-
- $$('div.tabContent').set('class', 'tabContent hide');
- $(e.target.get('href').substring(1)).set('class', 'tabContent');
- return false;
- });
-
- $$('#toptabs a')[0].set('class', 'selected');
- $$('#tabs span')[0].set('class', 'selected');
-
- var firstsel = $$('#tabs span.selected a')[0];
- firstsel.fireEvent('click', {target: firstsel});
- });
-
-
- </script>
-
-{% endblock %}
-
-{% block menu %}
- <li>
- <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt=""/> {{ _("Home") }}</a>
- </li>
- <li>
- <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt=""/> {{ _("Queue") }}</a>
- </li>
- <li>
- <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png"
- alt=""/> {{ _("Collector") }}</a>
- </li>
- <li>
- <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png"
- alt=""/> {{ _("Downloads") }}</a>
- </li>
- <li class="right">
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img
- src="/media/default/img/head-menu-index.png" alt=""/>{{ _("Logs") }}</a>
- </li>
- <li class="right selected">
- <a href="/settings/" class="action index" accesskey="x" rel="nofollow"><img
- src="/media/default/img/head-menu-config.png" alt=""/>{{ _("Config") }}</a>
- </li>
-{% endblock %}
-
-{% block content %}
-
- <ul id="toptabs" class="tabs">
- {% for configname, config in conf.iteritems() %}
- <li><a href="#{{configname}}">{{ configname }}</a></li>
- {% endfor %}
- </ul>
-
- <div id="tabsback">
- <ul id="tabs" class="tabs">
- {% for configname, config in conf.iteritems() %}
- <span id="g_{{configname}}">
- {% if configname != "Accounts" %}
- {% for skey, section in config.iteritems() %}
- <li><a href="#{{configname}}{{skey}}">{{ section.desc }}</a></li>
- {% endfor %}
- {% else %}
- {% for skey, section in config.iteritems() %}
- <li><a href="#{{configname}}{{skey}}">{{ skey }}</a></li>
- {% endfor %}
- {% endif %}
- </span>
- {% endfor %}
- </ul>
- </div>
- <form id="horizontalForm" action="" method="POST" autocomplete="off">
- {% for configname, config in conf.iteritems() %}
- {% if configname != "Accounts" %}
- {% for skey, section in config.iteritems() %}
- <div class="tabContent" id="{{configname}}{{skey}}">
- <table class="settable">
- {% for okey, option in section.iteritems() %}
- {% if okey != "desc" %}
- <tr>
- <td><label for="{{configname}}|{{skey}}|{{okey}}"
- style="color:#424242;">{{ option.desc }}:</label></td>
- <td>
- {% if option.type == "bool" %}
- <select id="{{skey}}|{{okey}}" name="{{configname}}|{{skey}}|{{okey}}">
- <option {% if option.value %} selected="selected"
- {% endif %}value="True">{{ _("on") }}</option>
- <option {% if not option.value %} selected="selected"
- {% endif %}value="False">{{ _("off") }}</option>
- </select>
- {% elif ";" in option.type %}
- <select id="{{skey}}|{{okey}}" name="{{configname}}|{{skey}}|{{okey}}">
- {% for entry in option.list %}
- <option {% if option.value == entry %}
- selected="selected" {% endif %}>{{ entry }}</option>
- {% endfor %}
- </select>
- {% elif option.type == "folder" %}
- <input name="{{configname}}|{{skey}}|{{okey}}" type="text"
- id="{{skey}}|{{okey}}" value="{{option.value}}"/>
- <input name="browsebutton" type="button"
- onclick="ifield = document.getElementById('{{skey}}|{{okey}}'); pathchooser = window.open('{% if option.value %}{{ "/pathchooser/" + option.value|quotepath }}{% else %}{{ pathroot }}{% endif %}', 'pathchooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); pathchooser.ifield = ifield; window.ifield = ifield;"
- value="{{_("Browse")}}"/>
- {% elif option.type == "file" %}
- <input name="{{configname}}|{{skey}}|{{okey}}" type="text"
- id="{{skey}}|{{okey}}" value="{{option.value}}"/>
- <input name="browsebutton" type="button"
- onclick="ifield = document.getElementById('{{skey}}|{{okey}}'); filechooser = window.open('{% if option.value %}{{ "/filechooser/" + option.value|quotepath }}{% else %}{{ fileroot }}{% endif %}', 'filechooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); filechooser.ifield = ifield; window.ifield = ifield;"
- value="{{_("Browse")}}"/>
- {% elif option.type == "password" %}
- <input id="{{skey}}|{{okey}}" name="{{configname}}|{{skey}}|{{okey}}"
- type="password" value="{{option.value}}"/>
- {% else %}
- <input id="{{skey}}|{{okey}}" name="{{configname}}|{{skey}}|{{okey}}"
- type="text" value="{{option.value}}"/>
- {% endif %}
- </td>
- </tr>
- {% endif %}
- {% endfor %}
- </table>
- </div>
- {% endfor %}
- {% else %}
- <!-- Accounts -->
- {% for plugin, accounts in config.iteritems() %}
- <div class="tabContent" id="{{configname}}{{plugin}}">
- <table class="settable">
- {% for account in accounts %}
- <tr>
- <td><label for="{{configname}}|{{plugin}}|password;{{account.login}}"
- style="color:#424242;">{{ account.login }}:</label></td>
- <td>
- <input id="{{plugin}}|password;{{account.login}}"
- name="{{configname}}|{{plugin}}|password;{{account.login}}"
- type="password" value="{{account.password}}" size="14"/>
- </td>
- <td>
- {{ _("Status:") }}
- {% if account.valid %}
- <span style="font-weight: bold; color: #006400;">
- {{ _("valid") }}
- {% else %}
- <span style="font-weight: bold; color: #8b0000;">
- {{ _("not valid") }}
- {% endif %}
- </span>
- </td>
- <td>
- {{ _("Valid until:") }}
- <span style="font-weight: bold;">
- {{ account.validuntil }}
- </span>
- </td>
- <td>
- {{ _("Traffic left:") }}
- <span style="font-weight: bold;">
- {{ account.trafficleft }}
- </span>
- </td>
- <td>
- {{ _("Time:") }}
- <input id="{{configname}}|{{plugin}}|time;{{account.login}}"
- name="{{configname}}|{{plugin}}|time;{{account.login}}" type="text"
- size="7" value="{{account.time}}"/>
- </td>
- <td>
- {{ _("Delete? ") }}
- <input id="{{configname}}|{{plugin}}|delete;{{account.login}}"
- name="{{configname}}|{{plugin}}|delete;{{account.login}}" type="checkbox"
- value="True"/>
- </td>
- </tr>
-
- {% endfor %}
- <tr>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td><label for="{{configname}}|{{plugin}}"
- style="color:#424242;">{{ _("New account:") }}</label></td>
-
- <td>
- <input id="{{plugin}}|newacc" name="{{configname}}|{{plugin}}|newacc" type="text"
- size="14"/>
- </td>
- </tr>
- <tr>
- <td><label for="{{configname}}|{{plugin}}"
- style="color:#424242;">{{ _("New password:") }}</label></td>
-
- <td>
- <input id="{{configname}}|{{plugin}}" name="{{configname}}|{{plugin}}|newpw"
- type="password" size="14"/>
- </td>
- </tr>
-
- </table>
- </div>
- {% endfor %}
- {% endif %}
- {% endfor %}
- {% if conf %}
- <input class="submit" type="submit" value="{{_("Submit")}}"/>
- </form>
-
- <br>
- {% for message in errors %}
- <b>{{ message }}</b><br>
- {% endfor %}
-
- {% endif %}
-
-{% endblock %}
diff --git a/module/web/templates/jinja/default/test.html b/module/web/templates/jinja/default/test.html
deleted file mode 100644
index b4f17f134..000000000
--- a/module/web/templates/jinja/default/test.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <title>Test</title>
-</head>
-<body>
-<h1>Template Test</h1>
-{{ user }}
-{{ status }}
-</body>
-</html> \ No newline at end of file
diff --git a/module/web/templates/jinja/default/window.html b/module/web/templates/jinja/default/window.html
deleted file mode 100644
index 734745887..000000000
--- a/module/web/templates/jinja/default/window.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<iframe id="upload_target" name="upload_target" src="" style="display: none; width:0;height:0"></iframe>
-<div id="add_bg" style="filter:alpha(opacity:80);KHTMLOpacity:0.80;MozOpacity:0.80;opacity:0.80; background:#000; width:100%; height: 100%; position:fixed; top:0; left:0; display:none;">&nbsp;</div>
-<!--<div id="add_box" style="left:50%; top:200px; margin-left: -450px; width: 900px; position: absolute; background: #FFF; padding: 10px 10px 10px 10px; display:none;">-->
-
- <!--<div style="width: 900px; text-align: right;"><b onclick="AddBox();">[Close]</b></div>-->
-<div id="add_box" class="myform">
-<form id="add_form" action="/json/add_package" method="POST" enctype="multipart/form-data">
-<h1>{{_("Add Package")}}</h1>
-<p>{{_("Paste your links or upload a container.")}}</p>
-<label for="add_name">{{_("Name")}}
-<span class="small">{{_("The name of the new package.")}}</span>
-</label>
-<input id="add_name" name="add_name" type="text" size="20" />
-
-<label for="add_links">{{_("Links")}}
-<span class="small">{{_("Paste your links here")}}</span>
-</label>
-<textarea rows="5" name="add_links" id="add_links"></textarea>
-
-<label for="add_password">{{_("Password")}}
- <span class="small">{{_("Password for RAR-Archive")}}</span>
-</label>
-<input id="add_password" name="add_password" type="text" size="20">
-
-<label>{{_("File")}}
-<span class="small">{{_("Upload a container.")}}</span>
-</label>
-<input type="file" name="add_file" id="add_file"/>
-
-<label for="add_dest">{{_("Destination")}}
-</label>
-<span class="cont">
- {{_("Queue")}}
- <input type="radio" name="add_dest" id="add_dest" value="1" checked="checked"/>
- {{_("Collector")}}
- <input type="radio" name="add_dest" id="add_dest2" value="0"/>
-</span>
-
-<button type="submit">{{_("Add Package")}}</button>
-<button id="add_reset" style="margin-left:0;" type="reset">{{_("Reset")}}</button>
-<div class="spacer"></div>
-
-</form>
-
-</div> \ No newline at end of file