From 52cf3751b2fe74aa5029f4b605b91aa84d9cf914 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 4 Feb 2010 16:17:22 +0100 Subject: little fixes, closed #71 --- module/web/locale/de/LC_MESSAGES/django.po | 60 +++++++++++++++++++----------- module/web/locale/en/LC_MESSAGES/django.po | 60 +++++++++++++++++++----------- module/web/pyload/views.py | 7 +++- module/web/templates/default/base.html | 21 ++++++----- module/web/templates/default/logs.html | 3 +- module/web/templates/default/queue.html | 1 + module/web/templates/default/window.html | 2 +- 7 files changed, 97 insertions(+), 57 deletions(-) (limited to 'module/web') diff --git a/module/web/locale/de/LC_MESSAGES/django.po b/module/web/locale/de/LC_MESSAGES/django.po index 4a262d5ac..8a086dff1 100644 --- a/module/web/locale/de/LC_MESSAGES/django.po +++ b/module/web/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-02-03 15:16+0000\n" +"POT-Creation-Date: 2010-02-04 15:16+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,74 +30,78 @@ msgstr "" msgid "Download directory not found." msgstr "" -#: templates/default/base.html:21 templates/default/base.html.py:184 +#: templates/default/base.html:21 templates/default/base.html.py:185 msgid "Webinterface" msgstr "" -#: templates/default/base.html:126 +#: templates/default/base.html:31 +msgid "Please Enter a packagename." +msgstr "" + +#: templates/default/base.html:127 msgid "Logout" msgstr "" -#: templates/default/base.html:128 +#: templates/default/base.html:129 msgid "Administrate" msgstr "" -#: templates/default/base.html:134 +#: templates/default/base.html:135 msgid "Please Login!" msgstr "" -#: templates/default/base.html:146 templates/default/queue.html:78 +#: templates/default/base.html:147 templates/default/queue.html:79 msgid "Home" msgstr "" -#: templates/default/base.html:149 templates/default/queue.html:75 -#: templates/default/queue.html.py:79 +#: templates/default/base.html:150 templates/default/queue.html:75 +#: templates/default/queue.html.py:76 templates/default/queue.html:80 msgid "Queue" msgstr "" -#: templates/default/base.html:151 templates/default/downloads.html:20 -#: templates/default/queue.html:80 +#: templates/default/base.html:152 templates/default/downloads.html:20 +#: templates/default/queue.html:81 msgid "Downloads" msgstr "" -#: templates/default/base.html:153 templates/default/logs.html:4 -#: templates/default/queue.html:81 +#: templates/default/base.html:154 templates/default/logs.html:4 +#: templates/default/logs.html.py:5 templates/default/queue.html:82 msgid "Logs" msgstr "" -#: templates/default/base.html:165 +#: templates/default/base.html:166 msgid "Play" msgstr "" -#: templates/default/base.html:166 +#: templates/default/base.html:167 msgid "Cancel" msgstr "" -#: templates/default/base.html:167 +#: templates/default/base.html:168 msgid "Stop" msgstr "" -#: templates/default/base.html:168 +#: templates/default/base.html:169 msgid "Add" msgstr "" -#: templates/default/base.html:174 +#: templates/default/base.html:175 msgid "Speed:" msgstr "" -#: templates/default/base.html:175 +#: templates/default/base.html:176 msgid "Active:" msgstr "" -#: templates/default/base.html:176 +#: templates/default/base.html:177 msgid "Reload page" msgstr "" -#: templates/default/base.html:204 +#: templates/default/base.html:205 msgid "© 2008-2010 the pyLoad Team" msgstr "© 2008-2010 das pyLoad Team" -#: templates/default/base.html:206 +#: templates/default/base.html:207 msgid "Back to top" msgstr "" @@ -149,7 +153,19 @@ msgstr "" msgid "You were successfully logged out." msgstr "" -#: templates/default/queue.html:105 +#: templates/default/logs.html:26 +msgid "Start" +msgstr "" + +#: templates/default/logs.html:26 +msgid "prev" +msgstr "" + +#: templates/default/logs.html:26 +msgid "next" +msgstr "" + +#: templates/default/queue.html:106 msgid "Folder:" msgstr "" diff --git a/module/web/locale/en/LC_MESSAGES/django.po b/module/web/locale/en/LC_MESSAGES/django.po index 4f7f93de7..3676a800a 100644 --- a/module/web/locale/en/LC_MESSAGES/django.po +++ b/module/web/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-02-03 15:16+0000\n" +"POT-Creation-Date: 2010-02-04 15:16+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,74 +30,78 @@ msgstr "" msgid "Download directory not found." msgstr "" -#: templates/default/base.html:21 templates/default/base.html.py:184 +#: templates/default/base.html:21 templates/default/base.html.py:185 msgid "Webinterface" msgstr "" -#: templates/default/base.html:126 +#: templates/default/base.html:31 +msgid "Please Enter a packagename." +msgstr "" + +#: templates/default/base.html:127 msgid "Logout" msgstr "" -#: templates/default/base.html:128 +#: templates/default/base.html:129 msgid "Administrate" msgstr "" -#: templates/default/base.html:134 +#: templates/default/base.html:135 msgid "Please Login!" msgstr "" -#: templates/default/base.html:146 templates/default/queue.html:78 +#: templates/default/base.html:147 templates/default/queue.html:79 msgid "Home" msgstr "" -#: templates/default/base.html:149 templates/default/queue.html:75 -#: templates/default/queue.html.py:79 +#: templates/default/base.html:150 templates/default/queue.html:75 +#: templates/default/queue.html.py:76 templates/default/queue.html:80 msgid "Queue" msgstr "" -#: templates/default/base.html:151 templates/default/downloads.html:20 -#: templates/default/queue.html:80 +#: templates/default/base.html:152 templates/default/downloads.html:20 +#: templates/default/queue.html:81 msgid "Downloads" msgstr "" -#: templates/default/base.html:153 templates/default/logs.html:4 -#: templates/default/queue.html:81 +#: templates/default/base.html:154 templates/default/logs.html:4 +#: templates/default/logs.html.py:5 templates/default/queue.html:82 msgid "Logs" msgstr "" -#: templates/default/base.html:165 +#: templates/default/base.html:166 msgid "Play" msgstr "" -#: templates/default/base.html:166 +#: templates/default/base.html:167 msgid "Cancel" msgstr "" -#: templates/default/base.html:167 +#: templates/default/base.html:168 msgid "Stop" msgstr "" -#: templates/default/base.html:168 +#: templates/default/base.html:169 msgid "Add" msgstr "" -#: templates/default/base.html:174 +#: templates/default/base.html:175 msgid "Speed:" msgstr "" -#: templates/default/base.html:175 +#: templates/default/base.html:176 msgid "Active:" msgstr "" -#: templates/default/base.html:176 +#: templates/default/base.html:177 msgid "Reload page" msgstr "" -#: templates/default/base.html:204 +#: templates/default/base.html:205 msgid "© 2008-2010 the pyLoad Team" msgstr "" -#: templates/default/base.html:206 +#: templates/default/base.html:207 msgid "Back to top" msgstr "" @@ -149,7 +153,19 @@ msgstr "" msgid "You were successfully logged out." msgstr "" -#: templates/default/queue.html:105 +#: templates/default/logs.html:26 +msgid "Start" +msgstr "" + +#: templates/default/logs.html:26 +msgid "prev" +msgstr "" + +#: templates/default/logs.html:26 +msgid "next" +msgstr "" + +#: templates/default/queue.html:106 msgid "Folder:" msgstr "" diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py index 37470c98f..9d3b6dd29 100644 --- a/module/web/pyload/views.py +++ b/module/web/pyload/views.py @@ -148,7 +148,10 @@ def logs(request, page=0): log = file(join(settings.LOG_ROOT, "log.txt")).readlines() data = [] page = int(page) - for i in range(page, page + 20): - data.append({'line': i + 1, 'content':log[i]}) + try: + for i in range(page, page + 20): + data.append({'line': i + 1, 'content':log[i]}) + except: + pass return render_to_response(join(settings.TEMPLATE, 'logs.html'), RequestContext(request, {'log': data, 'next': str(page + 20), 'prev': 0 if page-20 < 0 else page-20}, [status_proc])) diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html index 720453a30..bb44433ce 100644 --- a/module/web/templates/default/base.html +++ b/module/web/templates/default/base.html @@ -6,14 +6,14 @@ - + - + - - - - + + + + @@ -28,6 +28,7 @@ document.addEvent("domready", function(){ add_box = new Fx.Tween($('add_box')); $('add_form').onsubmit=function() { + if ($('add_name').value == "") alert("{% trans "Please Enter a packagename." %}") $('add_form').target = 'upload_target'; //'upload_target' is the name of the iframe out(); } @@ -113,7 +114,7 @@ function AddBox() {% block head %} {% endblock %} - +
@@ -187,7 +188,7 @@ function AddBox() {% endblock %} -
+
@@ -207,8 +208,10 @@ function AddBox() +
{% include "default/window.html" %} - + + diff --git a/module/web/templates/default/logs.html b/module/web/templates/default/logs.html index c35c68706..8dbe5a382 100644 --- a/module/web/templates/default/logs.html +++ b/module/web/templates/default/logs.html @@ -2,6 +2,7 @@ {% load i18n %} {% block title %}{% trans "Logs" %} - {{block.super}} {% endblock %} +{% block subtitle %}{% trans "Logs" %}{% endblock %} {% block menu %}
  • @@ -22,5 +23,5 @@
  • {{line.line}}: {{line.content}}
  • {% endfor %} -<< Start < prev next > +<< {% trans "Start" %} < {% trans "prev" %} {% trans "next" %} > {% endblock %} \ No newline at end of file diff --git a/module/web/templates/default/queue.html b/module/web/templates/default/queue.html index a136e1213..4cc01eeef 100644 --- a/module/web/templates/default/queue.html +++ b/module/web/templates/default/queue.html @@ -73,6 +73,7 @@ document.addEvent("domready", function(){ {% endblock %} {% block title %}{% trans "Queue" %} - {{block.super}} {% endblock %} +{% block subtitle %}{% trans "Queue" %}{% endblock %} {% block menu %}
  • {% trans "Home" %}
  • diff --git a/module/web/templates/default/window.html b/module/web/templates/default/window.html index 11ac8056c..18de3b0e2 100644 --- a/module/web/templates/default/window.html +++ b/module/web/templates/default/window.html @@ -11,7 +11,7 @@ - +