diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-03-09 23:29:24 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-03-09 23:29:24 +0100 |
commit | aa78d90803a68e41ea663adb623c859cae3ad91e (patch) | |
tree | c793e30df9fccdf350fcd299e70fb3c14fabc36a /module/web/templates/default/base.html | |
parent | captcha manager fix, toggle reconnect (diff) | |
download | pyload-aa78d90803a68e41ea663adb623c859cae3ad91e.tar.xz |
new config page, mootools 1.3, removed old templates
Diffstat (limited to 'module/web/templates/default/base.html')
-rw-r--r-- | module/web/templates/default/base.html | 107 |
1 files changed, 61 insertions, 46 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">© 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>
|