summaryrefslogtreecommitdiffstats
path: root/module/web/templates/default
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/templates/default')
-rw-r--r--module/web/templates/default/accounts.html54
-rw-r--r--module/web/templates/default/admin.html321
-rwxr-xr-xmodule/web/templates/default/backbone/accountDialog.html40
-rw-r--r--module/web/templates/default/backbone/confirmDialog.html11
-rwxr-xr-xmodule/web/templates/default/backbone/linkgrabber.html46
-rwxr-xr-xmodule/web/templates/default/backbone/modal.html15
-rwxr-xr-xmodule/web/templates/default/backbone/pluginChooserDialog.html23
-rwxr-xr-xmodule/web/templates/default/backbone/queryDialog.html33
-rw-r--r--module/web/templates/default/base.html407
-rw-r--r--module/web/templates/default/captcha.html42
-rw-r--r--module/web/templates/default/dashboard.html214
-rw-r--r--module/web/templates/default/downloads.html29
-rw-r--r--module/web/templates/default/filemanager.html80
-rw-r--r--module/web/templates/default/filemanager_ui.js291
-rw-r--r--module/web/templates/default/folder.html15
-rw-r--r--module/web/templates/default/home.html266
-rw-r--r--module/web/templates/default/info.html81
-rw-r--r--module/web/templates/default/login.html61
-rw-r--r--module/web/templates/default/logout.html9
-rw-r--r--module/web/templates/default/logs.html41
-rw-r--r--module/web/templates/default/pathchooser.html76
-rw-r--r--module/web/templates/default/queue.html104
-rw-r--r--module/web/templates/default/settings.html309
-rw-r--r--module/web/templates/default/settings_item.html48
-rw-r--r--module/web/templates/default/setup.html19
-rw-r--r--module/web/templates/default/window.html46
26 files changed, 1043 insertions, 1638 deletions
diff --git a/module/web/templates/default/accounts.html b/module/web/templates/default/accounts.html
new file mode 100644
index 000000000..a509a010d
--- /dev/null
+++ b/module/web/templates/default/accounts.html
@@ -0,0 +1,54 @@
+{% extends 'default/base.html' %}
+
+{% block title %}{{ _("Accounts") }} - {{ super() }} {% endblock %}
+{% block subtitle %}{{ _("Accounts") }}
+{% endblock %}
+
+{% block css %}
+ <link href="static/css/default/accounts.less" rel="stylesheet/less" type="text/css" media="screen"/>
+{% endblock %}
+
+{% block require %}
+ App.initAccountView();
+{% endblock %}
+
+{% block head %}
+ <script type="text/template" id="template-account">
+ <td><% plugin %></td>
+ <td><% loginname %></td>
+ <td><% valid %></td>
+ <td><% premium %></td>
+ <td><% trafficleft %></td>
+ <td><% shared %></td>
+ <td><% activated %></td>
+ <td><button type="button" class="btn btn-danger">Delete</button> </td>
+ </script>
+{% endblock %}
+
+{% block actionbar %}
+ <span class="span9">
+ <button class="btn btn-small btn-blue btn-add">Add Account</button>
+ </span>
+{% endblock %}
+
+{% block content %}
+ {# TODO: responsive layout instead of table #}
+ <div class="span10 offset2">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Plugin</th>
+ <th>Name</th>
+ <th>Valid</th>
+ <th>Premium</th>
+ <th>Traffic</th>
+ <th>Shared</th>
+ <th>Activated</th>
+ <th>Delete</th>
+ </tr>
+ </thead>
+ <tbody id="account-content">
+ </tbody>
+ </table>
+ </div>
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/admin.html b/module/web/templates/default/admin.html
index b049411fd..9bbcc2104 100644
--- a/module/web/templates/default/admin.html
+++ b/module/web/templates/default/admin.html
@@ -1,98 +1,223 @@
-{% extends 'default/base.html' %}
-
-{% block head %}
- <script type="text/javascript" src="media/js/admin.js"></script>
-{% endblock %}
-
-
-{% block title %}{{ _("Administrate") }} - {{ super() }} {% endblock %}
-{% block subtitle %}{{ _("Administrate") }}{% endblock %}
-
-{% block content %}
-
- <a href="#" id="quit-pyload" style="font-size: large; font-weight: bold;">{{_("Quit pyLoad")}}</a> |
- <a href="#" id="restart-pyload" style="font-size: large; font-weight: bold;">{{_("Restart pyLoad")}}</a>
- <br>
- <br>
-
- {{ _("To add user or change passwords use:") }} <b>python pyLoadCore.py -u</b><br>
- {{ _("Important: Admin user have always all permissions!") }}
-
- <form action="" method="POST">
- <table class="settable wide">
- <thead style="font-size: 11px">
- <th>
- {{ _("Name") }}
- </th>
- <th>
- {{ _("Change Password") }}
- </th>
- <th>
- {{ _("Admin") }}
- </th>
- <th>
- {{ _("Permissions") }}
- </th>
- </thead>
-
- {% for name, data in users.iteritems() %}
- <tr>
- <td>{{ name }}</td>
- <td><a class="change_password" href="#" id="change_pw|{{name}}">{{ _("change") }}</a></td>
- <td><input name="{{ name }}|admin" type="checkbox" {% if data.perms.admin %}
- checked="True" {% endif %}"></td>
- <td>
- <select multiple="multiple" size="{{ permlist|length }}" name="{{ name }}|perms">
- {% for perm in permlist %}
- {% if data.perms|getitem(perm) %}
- <option selected="selected">{{ perm }}</option>
- {% else %}
- <option>{{ perm }}</option>
- {% endif %}
- {% endfor %}
- </select>
- </td>
- </tr>
- {% endfor %}
-
-
- </table>
-
- <button class="styled_button" type="submit">{{ _("Submit") }}</button>
- </form>
-{% endblock %}
-{% block hidden %}
- <div id="password_box" class="window_box" style="z-index: 2">
- <form id="password_form" action="/json/change_password" method="POST" enctype="multipart/form-data">
- <h1>{{ _("Change Password") }}</h1>
-
- <p>{{ _("Enter your current and desired Password.") }}</p>
- <label for="user_login">{{ _("User") }}
- <span class="small">{{ _("Your username.") }}</span>
- </label>
- <input id="user_login" name="user_login" type="text" size="20"/>
-
- <label for="login_current_password">{{ _("Current password") }}
- <span class="small">{{ _("The password for this account.") }}</span>
- </label>
- <input id="login_current_password" name="login_current_password" type="password" size="20"/>
-
- <label for="login_new_password">{{ _("New password") }}
- <span class="small">{{ _("The new password.") }}</span>
- </label>
- <input id="login_new_password" name="login_new_password" type="password" size="20"/>
-
- <label for="login_new_password2">{{ _("New password (repeat)") }}
- <span class="small">{{ _("Please repeat the new password.") }}</span>
- </label>
- <input id="login_new_password2" name="login_new_password2" type="password" size="20"/>
-
-
- <button id="login_password_button" type="submit">{{ _("Submit") }}</button>
- <button id="login_password_reset" style="margin-left: 0" type="reset">{{ _("Reset") }}</button>
- <div class="spacer"></div>
-
- </form>
-
- </div>
-{% endblock %}
+{% extends 'default/base.html' %}
+
+{% block title %}{{ _("Admin") }} - {{ super() }} {% endblock %}
+{% block subtitle %}{{ _("Admin") }}
+{% endblock %}
+
+{% block css %}
+ <link href="static/css/default/admin.less" rel="stylesheet/less" type="text/css" media="screen"/>
+ <link rel="stylesheet" type="text/css" href="static/css/fontawesome.css" />
+{% endblock %}
+
+{% block require %}
+{% endblock %}
+
+{% block content %}
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div id="userlist" class="span10">
+ <div class="page-header">
+ <h1>Admin Bereich
+ <small>Userverwaltung, Systeminfos</small>
+ <a id="btn_newuser" class="btn btn-warning btn-large" type="button"><i class="iconf-plus-sign iconf-large "></i></a>
+ </h1>
+
+
+
+ </div>
+
+ <div class="dropdown">
+ <span class="label name">User</span>
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="iconf-user iconf-8x"></i></a>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
+ <li><a tabindex="-1" id="useredit" href="#" role="button" data-backdrop="true" data-controls-modal="event-modal" data-keyboard="true"><i class="icon-pencil"></i>Edit</a></li>
+ <li><a tabindex="-1" href="#"><i class="icon-tasks"></i>Statistik</a></li>
+ <li class="divider"></li>
+ <li><a tabindex="-1" href="#"><i class="icon-remove-sign"></i>Delete</a></li>
+ </ul>
+ </div>
+
+ <div id="event-modal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" id="useredit_close" href="#">x</a>
+ <h3>User Settings</h3>
+ </div>
+ <div class="modal-body">
+ <p>Set password and permissions</p>
+ <table style="width:100%;" class="table ">
+ <td>
+ <div class="input-prepend">
+ <span class="add-on"><i class="iconf-key"></i></span>
+ <input class="span2" style="min-width:120px;" id="prependedInput" type="text" placeholder="New Password">
+ </div>
+ <div class="input-prepend">
+ <span class="add-on"><i class="icon-repeat"></i></span>
+ <input class="span2" style="min-width:120px;" id="prependedInput" type="text" placeholder="Repeat">
+ </div>
+ <br>
+ <br>
+ <br>
+ <form class="form-horizontal">
+ <div class="control-group">
+ <label class="control-label" for="onoff">Administrator</label>
+
+ <div class="controls">
+ <div class="btn-group" id="onoff" data-toggle="buttons-radio">
+ <button type="button" class="btn btn-primary" >On</button>
+ <button type="button" class="btn btn-primary active">Off</button>
+ </div>
+ </div>
+ </div>
+ </form>
+ </td>
+ <td>
+ <div id="user_permissions">
+ <h3>Permissions</h3>
+ <div class="btn-group btn-group-vertical" data-toggle="buttons-checkbox">
+ <button type="button" class="btn btn-inverse userperm">Accounts</button>
+ <button type="button" class="btn btn-inverse userperm active">Add</button>
+ <button type="button" class="btn btn-inverse userperm">Delete</button>
+ <button type="button" class="btn btn-inverse userperm active">Download</button>
+ <button type="button" class="btn btn-inverse userperm active">List</button>
+ <button type="button" class="btn btn-inverse userperm">Logs</button>
+ <button type="button" class="btn btn-inverse userperm">Modify</button>
+ <button type="button" class="btn btn-inverse userperm">Settings</button>
+ <button type="button" class="btn btn-inverse userperm active">Status</button>
+ </div>
+ </div>
+ </td>
+ </table>
+ </div>
+ <div class="modal-footer">
+ <a class="btn btn-primary" id="useredit_save"href="#">Save</a>
+
+ </div>
+ </div>
+
+
+
+ </div>
+
+ <div class="span2">
+ <br>
+ <h2>Support</h2>
+ <table>
+ <tr>
+ <td>
+ <i class="icon-globe"></i>
+ </td>
+ <td>
+ <a href="#">Wiki |</a>
+ <a href="#">Forum |</a>
+ <a href="#">Chat</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <i class="icon-book"></i>
+ </td>
+ <td>
+ <a href="#">Documentation</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <i class="icon-fire"></i>
+ </td>
+ <td>
+ <a href="#">Development</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <i class="icon-bullhorn"></i>
+ </td>
+ <td>
+ <a href="#">Issue Tracker</a>
+ </td>
+ </tr>
+ </table>
+ <br>
+ <a href="#" class="btn btn-inverse" id="info" rel="popover" data-content="<table class='table table-striped'>
+ <tbody>
+ <tr>
+ <td>Python:</td>
+ <td>2.6.4 </td>
+ </tr>
+ <tr>
+ <td>Betriebssystem:</td>
+ <td>nt win32</td>
+ </tr>
+ <tr>
+ <td>pyLoad Version:</td>
+ <td>0.4.9</td>
+ </tr>
+ <tr>
+ <td>Installationsordner:</td>
+ <td>C:\pyLoad</td>
+ </tr>
+ <tr>
+ <td>Konfigurationsordner:</td>
+ <td>C:\Users\Marvin\pyload</td>
+ </tr>
+ <tr>
+ <td>Downloadordner:</td>
+ <td>C:\Users\Marvin\new</td>
+ </tr>
+ <tr>
+ <td>HDD:</td>
+ <td>1.67 TiB <div class='progress progress-striped active'>
+ <div class='bar' style='width: 40%;'></div>
+</div></td>
+ </tr>
+ <tr>
+ <td>Sprache:</td>
+ <td>de</td>
+ </tr>
+ <tr>
+ <td>Webinterface Port:</td>
+ <td>8000</td>
+ </tr>
+ <tr>
+ <td>Remote Interface Port:</td>
+ <td>7227</td>
+ </tr>
+ </tbody>
+ </table>" title="Systeminformationen">System</a>
+
+ </div>
+ </div>
+ </div>
+
+ <script src="static/js/libs/jquery-1.9.0.js"></script>
+ {##}
+ <script src="static/js/libs/bootstrap-2.2.2.js"></script>
+ <script type="text/javascript">
+ $('#info').popover({
+ placement: 'left',
+ trigger: 'click',
+ html:'true',
+ });
+
+ $('.dropdown-toggle').dropdown();
+
+ $("#btn_newuser").click(function() {
+
+ str = "<div class='dropdown1'><span class='label name'>User</span><a class='dropdown-toggle' data-toggle='dropdown1' href='#'><i class='iconf-user iconf-8x'></i></a><ul class='dropdown-menu' role='menu' aria-labelledby='dropdownMenu'><li><a tabindex='-1' href='#'>Action</a></li><li><a tabindex='-1' href='#'>Another action</a></li><li><a tabindex='-1' href='#'>Something else here</a></li><li class='divider'></li><li><a tabindex='-1' href='#'>Separated link</a></li></ul></div>";
+
+ $("#userlist").append(str);
+
+ });
+
+ $("#useredit").click(function() {
+ $('#event-modal').modal();
+ });
+ $("#useredit_close").click(function() {
+ $('#event-modal').modal('hide');
+ });
+ $("#useredit_save").click(function() {
+ $('#event-modal').modal('hide');
+ });
+
+ </script>
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/backbone/accountDialog.html b/module/web/templates/default/backbone/accountDialog.html
new file mode 100755
index 000000000..7961ad2ba
--- /dev/null
+++ b/module/web/templates/default/backbone/accountDialog.html
@@ -0,0 +1,40 @@
+{% extends 'default/backbone/modal.html' %}
+{% block header %}
+ Add an account
+{% endblock %}
+{% block content %}
+ <form class="form-horizontal" action="#" autocomplete="off">
+ <legend>
+ Please enter your account data
+ </legend>
+ <div class="control-group">
+ <label class="control-label" for="pluginSelect">
+ Plugin
+ </label>
+ <div class="controls">
+ <input type="hidden" id="pluginSelect">
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="login">
+ Loginname
+ </label>
+ <div class="controls">
+ <input type="text" id="login">
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="password">
+ Password
+ </label>
+ <div class="controls">
+ <input type="password" id="password">
+ </div>
+ </div>
+
+ </form>
+{% endblock %}
+{% block buttons %}
+ <a href="#" class="btn btn-success btn-add">Add</a>
+ <a href="#" class="btn btn-close">Close</a>
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/backbone/confirmDialog.html b/module/web/templates/default/backbone/confirmDialog.html
new file mode 100644
index 000000000..cf30f5f8e
--- /dev/null
+++ b/module/web/templates/default/backbone/confirmDialog.html
@@ -0,0 +1,11 @@
+{% extends 'default/backbone/modal.html' %}
+{% block header %}
+ Please confirm
+{% endblock %}
+{% block content %}
+ Do you want to delete the selected items?
+{% endblock %}
+{% block buttons %}
+ <a href="#" class="btn btn-danger btn-confirm"><i class="icon-trash icon-white"></i> Delete</a>
+ <a href="#" class="btn btn-close">Cancel</a>
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/backbone/linkgrabber.html b/module/web/templates/default/backbone/linkgrabber.html
new file mode 100755
index 000000000..4bedd922c
--- /dev/null
+++ b/module/web/templates/default/backbone/linkgrabber.html
@@ -0,0 +1,46 @@
+{% extends 'default/backbone/modal.html' %}
+{% block header %}
+ AddPackage
+ <small>paste&add links to pyLoad</small>
+{% endblock %}
+{% block content %}
+ <div class="alert alert-error hidden">
+ Upload files container failed. Please try again.
+ </div>
+ <form class="form-horizontal">
+ <div class="control-group">
+ <label class="control-label" for="inputPackageName">Package name</label>
+
+ <div class="controls">
+ <input type="text" class="span4" id="inputPackageName" placeholder="Name of your package">
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="inputLinks">Links</label>
+
+ <div class="controls">
+ <textarea id="inputLinks" class="span4" rows="10" placeholder="Paste your links here..."></textarea>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="inputPassword">Password</label>
+
+ <div class="controls">
+ <input type="text" id="inputPassword" class="span4" placeholder="Password for .rar files">
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="inputContainer">Upload links container</label>
+
+ <div class="controls controls-row">
+ <input type="text" id="inputContainer" class="span3" placeholder="Path to your container">
+ <button id="inputContainer-btn" class="btn span1" type="button">Browse&hellip;</button>
+ </div>
+ </div>
+
+ </form>
+{% endblock %}
+{% block buttons %}
+ <a href="#" class="btn btn-success"><i class="icon-plus icon-white"></i> Add</a>
+ <a href="#" class="btn btn-close">Close</a>
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/backbone/modal.html b/module/web/templates/default/backbone/modal.html
new file mode 100755
index 000000000..ed618f3d0
--- /dev/null
+++ b/module/web/templates/default/backbone/modal.html
@@ -0,0 +1,15 @@
+<div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h3>{% block header%}Dialog{% endblock %}</h3>
+</div>
+<div class="modal-body">
+ {% block content %}
+ <% content %>
+ {% endblock %}
+</div>
+<div class="modal-footer">
+ {% block buttons %}
+ <a href="#" class="btn btn-close">Close</a>
+ <a href="#" class="btn btn-primary">Save</a>
+ {% endblock %}
+</div> \ No newline at end of file
diff --git a/module/web/templates/default/backbone/pluginChooserDialog.html b/module/web/templates/default/backbone/pluginChooserDialog.html
new file mode 100755
index 000000000..a455b0cfd
--- /dev/null
+++ b/module/web/templates/default/backbone/pluginChooserDialog.html
@@ -0,0 +1,23 @@
+{% extends 'default/backbone/modal.html' %}
+{% block header %}
+ Choose a plugin
+{% endblock %}
+{% block content %}
+ <form class="form-horizontal" action="#">
+ <legend>
+ Please choose a plugin, which you want to configure
+ </legend>
+ <div class="control-group">
+ <label class="control-label" for="pluginSelect">
+ Plugin
+ </label>
+ <div class="controls">
+ <input type="hidden" id="pluginSelect">
+ </div>
+ </div>
+ </form>
+{% endblock %}
+{% block buttons %}
+ <a href="#" class="btn btn-success btn-add">Add</a>
+ <a href="#" class="btn btn-close">Close</a>
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/backbone/queryDialog.html b/module/web/templates/default/backbone/queryDialog.html
new file mode 100755
index 000000000..fd6eb55ee
--- /dev/null
+++ b/module/web/templates/default/backbone/queryDialog.html
@@ -0,0 +1,33 @@
+{% extends 'default/backbone/modal.html' %}
+{% block header %}
+ <% title %>
+ <small style="background: url('icons/<% plugin %>') no-repeat right 0; background-size: 20px; padding-right: 22px">
+ <% plugin %>
+ </small>
+{% endblock %}
+{% block content %}
+ <form class="form-horizontal" action="#">
+ <legend><% description %></legend>
+ <%= if captcha %>
+ <div class="control-group">
+ <label class="control-label" for="captchaImage">
+ Captcha Image
+ </label>
+ <div class="controls">
+ <img id="captchaImage" src="data:image/<% type %>;base64,<% captcha %>">
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="inputField">Captcha Text</label>
+ <div class="controls" id="inputField">
+ </div>
+ </div>
+ <% else %>
+ <% content %>
+ <%/if%>
+ </form>
+{% endblock %}
+{% block buttons %}
+ <a href="#" class="btn btn-success">Submit</a>
+ <a href="#" class="btn btn-close">Close</a>
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index 0b20ecdb0..bf16f545a 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -1,180 +1,241 @@
-<?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">
+<!DOCTYPE html>
+{# TODO: set language from config #}
+<html lang="en">
<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"/>
-<link rel="stylesheet" type="text/css" href="/media/default/css/MooDialog.css"/>
-
-<script type="text/javascript" src="/media/js/mootools-core-1.4.1.js"></script>
-<script type="text/javascript" src="/media/js/mootools-more-1.4.0.1.js"></script>
-<script type="text/javascript" src="/media/js/MooDialog_static.js"></script>
-<script type="text/javascript" src="/media/js/purr_static.js"></script>
-
-
-<script type="text/javascript" src="/media/js/base.js"></script>
-
-<title>{% block title %}pyLoad {{_("Webinterface")}}{% endblock %}</title>
-
-{% 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 %}
-
-
-{% if update %}
-<span>
-<span style="font-weight: bold; margin: 0 2px 0 2px;">{{_("pyLoad Update available!")}}</span>
-</span>
-{% endif %}
-
-
-{% if plugins %}
-<span>
-<span style="font-weight: bold; margin: 0 2px 0 2px;">{{_("Plugins updated, please restart!")}}</span>
-</span>
-{% endif %}
-
-<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_admin %}
- <li><a href="/admin" class="action profile" rel="nofollow">{{_("Administrate")}}</a></li>
- {% endif %}
- <li><a href="/info" class="action info" rel="nofollow">{{_("Info")}}</a></li>
-
- </ul>
-{% else %}
- <span style="padding-right: 2px;">{{_("Please Login!")}}</span>
-{% endif %}
-
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <title>{% block title %}pyLoad WebUI{% endblock %}</title>
+ <meta name="description" content="pyLoad WebUI">
+ <meta name="viewport" content="width=device-width">
+
+ <!-- TODO Include this font -->
+ <link href="http://fonts.googleapis.com/css?family=Abel" rel="stylesheet" type="text/css"/>
+ <link href="/static/css/bootstrap.css" rel="stylesheet" type="text/css"/>
+ <link href="/static/css/select2.css" rel="stylesheet" type="text/css"/>
+ <link href="/static/css/font.css" rel="stylesheet" type="text/css"/>
+ <link href="/static/css/fontawesome.css" rel="stylesheet" type="text/css"/>
+ <link href="/static/css/default/style.less" rel="stylesheet/less" type="text/css" media="screen"/>
+ {% block css %}
{% 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>
-
- {% macro selected(name, right=False) -%}
- {% if name in url -%}class="{% if right -%}right {% endif %}selected"{%- endif %}
- {% if not name in url and right -%}class="right"{%- endif %}
- {%- endmacro %}
-
-
- {% block menu %}
- <li>
- <a href="/" title=""><img src="/media/default/img/head-menu-home.png" alt="" /> {{_("Home")}}</a>
- </li>
- <li {{ selected('queue') }}>
- <a href="/queue/" title=""><img src="/media/default/img/head-menu-queue.png" alt="" /> {{_("Queue")}}</a>
- </li>
- <li {{ selected('collector') }}>
- <a href="/collector/" title=""><img src="/media/default/img/head-menu-collector.png" alt="" /> {{_("Collector")}}</a>
- </li>
- <li {{ selected('downloads') }}>
- <a href="/downloads/" title=""><img src="/media/default/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>
- </li>
-{# <li {{ selected('filemanager') }}>#}
-{# <a href="/filemanager/" title=""><img src="/media/default/img/head-menu-download.png" alt="" /> {{_("FileManager")}}</a>#}
-{# </li>#}
- <li {{ selected('logs', True) }}>
- <a href="/logs/" class="action index" accesskey="x" rel="nofollow"><img src="/media/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>
- </li>
- <li {{ selected('settings', True) }}>
- <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="#" class="action add" accesskey="o" rel="nofollow" >{{_("Add")}}</a></li>
-</ul>
-{% endif %}
-{% if perms.LIST %}
-<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></a></li>
- <li><a class="action cog">{{_("Active:")}} <b id="aktiv" title="{{_("Active")}}">{{ status.active }}</b> / <b id="aktiv_from" title="{{_("Queued")}}">{{ status.queue }}</b> / <b id="aktiv_total" title="{{_("Total")}}">{{ status.total }}</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 %}
-
-<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>
-
-{% 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>
-
-<div style="display: none;">
- {% include "default/window.html" %}
- {% include "default/captcha.html" %}
- {% block hidden %}
+ <script src="/static/js/libs/less-1.3.0.min.js" type="text/javascript"></script>
+ <script type="text/javascript" data-main="static/js/config" src="/static/js/libs/require-2.1.5.js"></script>
+ <script>
+ window.dates = {
+ weeks: ['week', 'weeks'],
+ days: ['day', 'days'],
+ hours: ['hour', 'hours'],
+ minutes: ['minute', 'minutes'],
+ seconds: ['second', 'seconds']
+ }; // TODO carefully when translating
+
+ window.wsAddress = "{{ ws }}";
+ window.pathPrefix = ""; // TODO
+
+ require(['default'], function(App) {
+ App.init();
+ {% block require %}
+ {% endblock %}
+ });
+ </script>
+ <script type="text/template" id="template-header">
+ <%= if single %>
+ <% name %> (<% statusmsg %>)
+ <% else %>
+ <%= if downloads %>
+ <% downloads %> downloads running <%= if speed %>(<% formatSize speed %>/s)<%/if%>
+ <% else %>
+ No running tasks
+ <%/if%>
+ <%/if%>
+ <i class="iconf-list pull-right"></i>
+
+{# TODO: active animation #}
+ <div class="progress" id="globalprogress">
+ <%= if single %>
+ <div class="bar" style="width: <% percent %>%">
+ <% else %>
+ <div class="bar <%= if downloads %>running<%/if%>">
+ <%/if%>
+ </div>
+ </div>
+ <div class="sub">
+ <%= if linksqueue %>
+ <% linksqueue %> downloads left (<% formatSize sizequeue %>)
+ <%/if%>
+ <span class="pull-right">
+ <% formatTime etaqueue %>
+ </span>
+ </div>
+ </script>
+ <script type="text/template" id="template-header-status">
+ <span class="pull-right maxspeed"><% formatSize maxspeed %>/s</span><br>
+ <span class="pull-right running"><% paused %></span><br>
+ <span class="pull-right reconnect"><%= if reconnect %>true<% else %>false<%/if%></span>
+ </script>
+
+ <script type="text/template" id="template-header-progress">
+ {# background-image for logo #}
+ <% name %>
+ <span class="pull-right"><% plugin %></span>
+
+ <div class="progress">
+ <div class="bar" style="width: <% percent %>%"></div>
+ </div>
+ <%= if downloading %>
+ <% formatSize done %> of <% formatSize total %> (<% formatSize download.speed %>/s)
+ <% else %>
+ <% statusmsg %>
+ <%/if%>
+ <span class="pull-right">
+{# <% percent %>%#}
+ <% formatTime eta %>
+ </span>
+ </script>
+
+ <script type="text/template" id="template-notification">
+ <%= if queries %>
+ <span class="btn-query">
+ Queries <span class="badge badge-info"><% queries %></span>
+ </span>
+ <%/if%>
+ <%= if notifications %>
+ <span class="btn-notification">
+ Notifications <span class="badge badge-success"><% notifications %></span>
+ </span>
+ <%/if%>
+ </%if%>
+ </script>
+
+ {% block head %}
{% endblock %}
+</head>
+<body>
+<div id="wrap">
+ <header>
+ <div class="left">
+ <div class="logo"></div>
+ <span class="title visible-large-screen">pyLoad</span>
+ </div>
+ <div class="right">
+ {% if user %}
+ <div class="header_block">
+ {# <a class="header-link" href="/settings"><i class="icon-cog icon-white"></i> Settings</a>#}
+ {# <a class="header-link" href="#"><i class="icon-list-alt icon-white"></i> Accounts</a>#}
+ <span class="iconbar">
+ <i class="iconf-play iconf-large"></i>&nbsp; Running&nbsp;&nbsp;
+ <i class="iconf-repeat iconf-large"></i>&nbsp; Reconnect
+ </span>
+ <br>
+ <a class="btn btn-success btn-grabber" href="#"><i class="icon-plus icon-white"></i> Add</a>
+
+ <div class="btn-group">
+ <a class="btn btn-blue" href="#"><i class="icon-user icon-white"></i> User</a>
+ <a class="btn btn-blue dropdown-toggle" data-toggle="dropdown" href="#"><span
+ class="caret"></span></a>
+ <ul class="dropdown-menu" style="right: 0; left: -100%">
+ <li><a href="/"><i class="iconf-list-alt"></i> Dashboard</a></li>
+ <li><a href="/settings"><i class="iconf-wrench"></i> Settings</a></li>
+ <li><a href="/accounts"><i class="iconf-key"></i> Accounts</a></li>
+ <li><a href="/admin"><i class="iconf-cogs"></i> Admin</a></li>
+ <li class="divider"></li>
+ <li><a href="/logout"><i class="iconf-signout"></i> Logout</a></li>
+ </ul>
+ </div>
+
+ </div>
+
+ <div id="speedgraph" class="visible-desktop"></div>
+
+ <div class="header_block right-border status-block">
+ </div>
+ <div class="header_block left-border">
+ <i class="icon-download-alt icon-white"></i> Max. Speed:<br>
+ <i class=" icon-off icon-white"></i> Running:<br>
+ <i class="icon-refresh icon-white"></i> Reconnect:<br>
+ </div>
+
+ <div id="progress-area">
+ <span id="progress-info">
+ </span>
+ <div class="popover bottom">
+ <div class="arrow"></div>
+ <div class="popover-inner">
+ <h3 class="popover-title">
+ Running...
+ <button type="button" class="close" aria-hidden="true">&times;</button>
+ </h3>
+ <div class="popover-content">
+ <ul class="progress-list"></ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ {% endif %}
+ </div>
+ <div id="notification-area">
+ </div>
+ <div id="selection-area">
+ </div>
+ </header>
+ <div id="content-container" class="container-fluid">
+ <div class="row-fluid">
+ <div class="span2 offset1">
+ {# just a placeholder #}
+ </div>
+ {% block actionbar %}
+ {% endblock %}
+ </div>
+ <div class="row-fluid" id="content">
+ {# TODO: messages #}
+ {% for msg in messages %}
+ <p>{{ msg }}</p>
+ {% endfor %}
+
+ {% block content %}
+ {% endblock content %}
+ </div>
+ </div>
</div>
+<footer>
+ <div class="center">
+ <div class="logo"></div>
+ <div class="block copyright">
+ © 2008-2013<br>
+ <a href="http://pyload.org/" target="_blank">The pyLoad Team</a><br>
+ </div>
+
+ <div class="block">
+ <h2 class="block-title">Powered by</h2>
+ Bootstrap <br>
+ Backbone <br>
+ sdf dsg <br>
+ </div>
+
+ <div class="block">
+ <h2 class="block-title">pyLoad</h2>
+ <a href="/toggle_mobile">{{ _("Mobile Version") }}</a> <br>
+ dsfdsf <br>
+ sdf dsg <br>
+ </div>
+
+ <div class="block">
+ <h2 class="block-title">Community</h2>
+ asd <br>
+ dsfdsf <br>
+ sdf dsg <br>
+ </div>
+
+ <div class="block">
+ <h2 class="block-title">Development</h2>
+ asd <br>
+ dsfdsf <br>
+ sdf dsg <br>
+ </div>
+ </div>
+</footer>
+<div id="modal-overlay" class="hide"></div>
+{% block deferred %}
+{% endblock deferred %}
</body>
</html>
diff --git a/module/web/templates/default/captcha.html b/module/web/templates/default/captcha.html
deleted file mode 100644
index 332a9c102..000000000
--- a/module/web/templates/default/captcha.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!-- Captcha box -->
-<div id="cap_box" class="window_box">
-
- <form id="cap_form" action="/json/set_captcha" method="POST" enctype="multipart/form-data" onsubmit="return false;">
-
- <h1>{{_("Captcha reading")}}</h1>
- <p id="cap_title">{{_("Please read the text on the captcha.")}}</p>
-
- <div id="cap_textual">
-
- <input id="cap_id" name="cap_id" type="hidden" value="" />
-
- <label>{{_("Captcha")}}
- <span class="small">{{_("The captcha.")}}</span>
- </label>
- <span class="cont">
- <img id="cap_textual_img" src="">
- </span>
-
- <label>{{_("Text")}}
- <span class="small">{{_("Input the text on the captcha.")}}</span>
- </label>
- <input id="cap_result" name="cap_result" type="text" size="20" />
-
- </div>
-
- <div id="cap_positional" style="text-align: center">
- <img id="cap_positional_img" src="" style="margin: 10px; cursor:pointer">
- </div>
-
- <div id="button_bar" style="text-align: center">
- <span>
- <button id="cap_submit" type="submit" style="margin-left: 0">{{_("Submit")}}</button>
- <button id="cap_reset" type="reset" style="margin-left: 0">{{_("Close")}}</button>
- </span>
- </div>
-
- <div class="spacer"></div>
-
- </form>
-
-</div> \ No newline at end of file
diff --git a/module/web/templates/default/dashboard.html b/module/web/templates/default/dashboard.html
new file mode 100644
index 000000000..41da71c6c
--- /dev/null
+++ b/module/web/templates/default/dashboard.html
@@ -0,0 +1,214 @@
+{% extends 'default/base.html' %}
+{% block title %}
+ {{ _("Dashboard") }} - {{ super() }}
+{% endblock %}
+
+{% block css %}
+ <link href="static/css/default/dashboard.less" rel="stylesheet/less" type="text/css" media="screen"/>
+{% endblock %}
+
+{% block require %}
+ App.initDashboard();
+{% endblock %}
+
+{% block head %}
+ <script type="text/template" id="template-package">
+ <%= if selected %>
+ <i class="iconf-check select"></i>
+ <% else %>
+ <i class="iconf-check-empty select"></i>
+ <%/if%>
+ <span class="package-name">
+ <% name %>
+ </span>
+
+ <div class="package-frame">
+ <div class="tag-area">
+ <span class="badge badge-success"><i class="iconf-tag"></i>video</span>
+ <span class="badge badge-success badge-ghost"><i class="iconf-tag"></i> Add Tag</span>
+ </div>
+ <div class="package-indicator">
+ <i class="iconf-plus-sign btn-move" data-toggle="tooltip" title="Move files here"></i>
+ <i class="iconf-pause" data-toggle="tooltip" title="Pause Package"></i>
+ <i class="iconf-refresh" data-toggle="tooltip" title="Restart Package"></i>
+ <%= if shared %>
+ <i class="iconf-eye-open" data-toggle="tooltip" title="Package is public"></i>
+ <% else %>
+ <i class="iconf-eye-close" data-toggle="tooltip" title="Package is private"></i>
+ <%/if%>
+ <i class="iconf-chevron-down" data-toggle="dropdown">
+ </i>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="#" class="btn-open"><i class="iconf-folder-open-alt"></i> Open</a></li>
+ <li><a href="#"><i class="iconf-plus-sign"></i> Add links</a></li>
+ <li><a href="#"><i class="iconf-edit"></i> Details</a></li>
+ <li><a href="#" class="btn-delete"><i class="iconf-trash"></i> Delete</a></li>
+ <li><a href="#" class="btn-recheck"><i class="iconf-refresh"></i> Recheck</a></li>
+ <li class="divider"></li>
+ <li class="dropdown-submenu">
+ <a>Addons</a>
+ <ul class="dropdown-menu">
+ <li><a>Test</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <div class="progress">
+ <span style="position: absolute; left: 5px">
+ <% stats.linksdone %> / <% stats.linkstotal %>
+ </span>
+ <div class="bar bar-info" style="width: <% percent %>%"></div>
+ <span style="position: absolute; right: 5px">
+ <% formatSize stats.sizedone %> / <% formatSize stats.sizetotal %>
+ </span>
+ </div>
+ </div>
+ </script>
+
+ <script type="text/template" id="template-file">
+ <div class="file-row first span6">
+ <i class="checkbox"></i>&nbsp;
+ <span class="name">
+ <% name %>
+ </span>
+ </div>
+ <div class="file-row second span3 <% fileClass this %>">
+ <% fileStatus this %>
+ </div>
+
+ <div class="file-row third span3 pull-right">
+ <i class="<% fileIcon media %>"></i>&nbsp;
+ <% formatSize size %>
+ <span class="pull-right">
+ <img src="icons/<% download.plugin %>"/>
+ <% download.plugin %>&nbsp;
+ <i class="iconf-chevron-down" data-toggle="dropdown"></i>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="#" class="btn-delete"><i class="iconf-trash"></i> Delete</a></li>
+ <li><a href="#" class="btn-restart"><i class="iconf-refresh"></i> Restart</a></li>
+ {# TODO: only show when finished #}
+ <li><a href="download/<% fid %>" target="_blank" class="btn-dowload"><i class="iconf-download"></i> Download</a></li>
+ <li><a href="#" class="btn-share"><i class="iconf-share"></i> Share</a></li>
+ <li class="divider"></li>
+ <li class="dropdown-submenu pull-left">
+ <a>Addons</a>
+ <ul class="dropdown-menu">
+ <li><a>Test</a></li>
+ </ul>
+ </li>
+ </ul>
+ </span>
+ </div>
+ </script>
+
+ <script type="text/template" id="template-select">
+ <i class="iconf-check" data-toggle="tooltip" title="Deselect"></i>&nbsp;
+ <%= if packs %><% packs %> package(s)<%/if %>
+ <%= if files %>
+ <%= if packs %>, <%/if %>
+ <% files %> file(s)
+ <%/if %>
+ selected
+ &nbsp;|&nbsp;
+ <i class="iconf-pause" data-toggle="tooltip" title="Pause"></i>&nbsp;
+ <i class="iconf-trash" data-toggle="tooltip" title="Delete"></i>&nbsp;
+ <i class="iconf-refresh" data-toggle="tooltip" title="Restart"></i>
+ </script>
+
+{% endblock %}
+
+{% block actionbar %}
+ <ul class="actionbar nav nav-pills span9">
+ <li>
+ <ul class="breadcrumb">
+ <li><a href="#">{{ _("Local") }}</a> <span class="divider">/</span></li>
+ <li class="active"></li>
+ </ul>
+ </li>
+
+ <li style="float: right;">
+ <form class="form-search" action="#">
+ <div class="input-append">
+ <input type="text" class="search-query" style="width: 120px">
+ <button type="submit" class="btn">{{ _("Search") }}</button>
+ </div>
+ </form>
+ </li>
+ <li style="float: right">
+ <a href="#"><i class="iconf-check-empty btn-check"></i></a>
+ </li>
+ <li class="dropdown" style="float: right;">
+ <a class="dropdown-toggle type"
+ data-toggle="dropdown"
+ href="#">
+ Type
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a class="filter-type" data-type="2" href="#"><i class="icon-ok"></i>&nbsp;Audio</a></li>
+ <li><a class="filter-type" data-type="4" href="#"><i class="icon-ok"></i>&nbsp;Image</a></li>
+ <li><a class="filter-type" data-type="8" href="#"><i class="icon-ok"></i>&nbsp;Video</a></li>
+ <li><a class="filter-type" data-type="16" href="#"><i class="icon-ok"></i>&nbsp;Document</a></li>
+ <li><a class="filter-type" data-type="32" href="#"><i class="icon-remove"></i>&nbsp;Archive</a></li>
+ <li><a class="filter-type" data-type="1" href="#"><i class="icon-remove"></i>&nbsp;Other</a></li>
+ </ul>
+ </li>
+ <li class="dropdown" style="float: right;">
+ <a class="dropdown-toggle"
+ data-toggle="dropdown"
+ href="#">
+ <span class="state">
+ All
+ </span>
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a class="filter-state" data-state="0" href="#">All</a></li>
+ <li><a class="filter-state" data-state="1" href="#">Finished</a></li>
+ <li><a class="filter-state" data-state="2" href="#">Unfinished</a></li>
+ <li><a class="filter-state" data-state="3" href="#">Failed</a></li>
+ </ul>
+ </li>
+ </ul>
+{% endblock %}
+
+
+{% block content %}
+
+ <div class="span3">
+ <div class="sidebar-header">
+ <i class="iconf-hdd"></i> Local
+ <div class="pull-right" style="font-size: medium; line-height: normal">
+ {# <input type="text" class="input">#}
+ <i class="iconf-chevron-down" style="font-size: 20px"></i>
+ </div>
+ <div class="clearfix"></div>
+ </div>
+ <ul class="package-list">
+ {# Build up by js #}
+ </ul>
+ <div class="sidebar-header">
+ <i class="iconf-group"></i> Shared
+ </div>
+ <ul class="package-list">
+ <li>Content from</li>
+ <li>Other user</li>
+ <li>which they shared</li>
+ </ul>
+ <div class="sidebar-header">
+ <i class="iconf-sitemap"></i> Remote
+ </div>
+ <ul>
+ <li>Content from</li>
+ <li>remote sites</li>
+ <li>mega</li>
+ <li>dropbox</li>
+ <li>other pyloads</li>
+ </ul>
+ </div>
+ <div class="span9">
+ <ul class="file-list">
+ {# Build up by js #}
+ </ul>
+ </div>
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/downloads.html b/module/web/templates/default/downloads.html
deleted file mode 100644
index 450b8a102..000000000
--- a/module/web/templates/default/downloads.html
+++ /dev/null
@@ -1,29 +0,0 @@
-{% extends 'default/base.html' %}
-
-{% block title %}Downloads - {{super()}} {% 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/default/filemanager.html b/module/web/templates/default/filemanager.html
deleted file mode 100644
index 97095c13e..000000000
--- a/module/web/templates/default/filemanager.html
+++ /dev/null
@@ -1,80 +0,0 @@
-{% extends 'default/base.html' %}
-
-{% block head %}
-
-<script type="text/javascript" src="/filemanager_ui.js"></script>
-
-<script type="text/javascript">
-
-document.addEvent("domready", function(){
- var fmUI = new FilemanagerUI("url",1);
-});
-</script>
-{% endblock %}
-
-{% block title %}Downloads - {{super()}} {% endblock %}
-
-
-{% block subtitle %}
-{{_("FileManager")}}
-{% endblock %}
-
-{% macro display_file(file) %}
- <li class="file">
- <input type="hidden" name="path" class="path" value="{{ file.path }}" />
- <input type="hidden" name="name" class="name" value="{{ file.name }}" />
- <span>
- <b>{{ file.name }}</b>
- <span class="buttons" style="opacity:0">
- <img title="{{_("Rename Directory")}}" class="rename" style="cursor: pointer" height="12px" src="/media/default/img/pencil.png" />
- &nbsp;&nbsp;
- <img title="{{_("Delete Directory")}}" class="delete" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/media/default/img/delete.png" />
- </span>
- </span>
- </li>
-{%- endmacro %}
-
-{% macro display_folder(fld, open = false) -%}
- <li class="folder">
- <input type="hidden" name="path" class="path" value="{{ fld.path }}" />
- <input type="hidden" name="name" class="name" value="{{ fld.name }}" />
- <span>
- <b>{{ fld.name }}</b>
- <span class="buttons" style="opacity:0">
- <img title="{{_("Rename Directory")}}" class="rename" style="cursor: pointer" height="12px" src="/media/default/img/pencil.png" />
- &nbsp;&nbsp;
- <img title="{{_("Delete Directory")}}" class="delete" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/media/default/img/delete.png" />
- &nbsp;&nbsp;
- <img title="{{_("Add subdirectory")}}" class="mkdir" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/media/default/img/add_folder.png" />
- </span>
- </span>
- {% if (fld.folders|length + fld.files|length) > 0 %}
- {% if open %}
- <ul>
- {% else %}
- <ul style="display:none">
- {% endif %}
- {% for child in fld.folders %}
- {{ display_folder(child) }}
- {% endfor %}
- {% for child in fld.files %}
- {{ display_file(child) }}
- {% endfor %}
- </ul>
- {% else %}
- <div style="display:none">{{ _("Folder is empty") }}</div>
- {% endif %}
- </li>
-{%- endmacro %}
-
-{% block content %}
-
-<div style="clear:both"><!-- --></div>
-
-<ul id="directories-list">
-{{ display_folder(root, true) }}
-</ul>
-
-{% include "default/rename_directory.html" %}
-
-{% endblock %}
diff --git a/module/web/templates/default/filemanager_ui.js b/module/web/templates/default/filemanager_ui.js
deleted file mode 100644
index ed64ab69d..000000000
--- a/module/web/templates/default/filemanager_ui.js
+++ /dev/null
@@ -1,291 +0,0 @@
-var load, rename_box, confirm_box;
-
-document.addEvent("domready", function() {
- load = new Fx.Tween($("load-indicator"), {link: "cancel"});
- load.set("opacity", 0);
-
- rename_box = new Fx.Tween($('rename_box'));
- confirm_box = new Fx.Tween($('confirm_box'));
- $('rename_reset').addEvent('click', function() {
- hide_rename_box()
- });
- $('delete_reset').addEvent('click', function() {
- hide_confirm_box()
- });
-
- /*$('filemanager_actions_list').getChildren("li").each(function(action) {
- var action_name = action.className;
- if(functions[action.className] != undefined)
- {
- action.addEvent('click', functions[action.className]);
- }
- });*/
-});
-
-function indicateLoad() {
- //$("load-indicator").reveal();
- load.start("opacity", 1)
-}
-
-function indicateFinish() {
- load.start("opacity", 0)
-}
-
-function indicateSuccess() {
- indicateFinish();
- notify.alert('{{_("Success")}}.', {
- 'className': 'success'
- });
-}
-
-function indicateFail() {
- indicateFinish();
- notify.alert('{{_("Failed")}}.', {
- 'className': 'error'
- });
-}
-
-function show_rename_box() {
- bg_show();
- $("rename_box").setStyle('display', 'block');
- rename_box.start('opacity', 1)
-}
-
-function hide_rename_box() {
- bg_hide();
- rename_box.start('opacity', 0).chain(function() {
- $('rename_box').setStyle('display', 'none');
- });
-}
-
-function show_confirm_box() {
- bg_show();
- $("confirm_box").setStyle('display', 'block');
- confirm_box.start('opacity', 1)
-}
-
-function hide_confirm_box() {
- bg_hide();
- confirm_box.start('opacity', 0).chain(function() {
- $('confirm_box').setStyle('display', 'none');
- });
-}
-
-var FilemanagerUI = new Class({
- initialize: function(url, type) {
- this.url = url;
- this.type = type;
- this.directories = [];
- this.files = [];
- this.parseChildren();
- },
-
- parseChildren: function() {
- $("directories-list").getChildren("li.folder").each(function(ele) {
- var path = ele.getElements("input.path")[0].get("value");
- var name = ele.getElements("input.name")[0].get("value");
- this.directories.push(new Item(this, path, name, ele))
- }.bind(this));
-
- $("directories-list").getChildren("li.file").each(function(ele) {
- var path = ele.getElements("input.path")[0].get("value");
- var name = ele.getElements("input.name")[0].get("value");
- this.files.push(new Item(this, path, name, ele))
- }.bind(this));
- }
-});
-
-var Item = new Class({
- initialize: function(ui, path, name, ele) {
- this.ui = ui;
- this.path = path;
- this.name = name;
- this.ele = ele;
- this.directories = [];
- this.files = [];
- this.actions = new Array();
- this.actions["delete"] = this.del;
- this.actions["rename"] = this.rename;
- this.actions["mkdir"] = this.mkdir;
- this.parseElement();
-
- var pname = this.ele.getElements("span")[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));
-
- },
-
- parseElement: function() {
- this.ele.getChildren('span span.buttons img').each(function(img) {
- img.addEvent('click', this.actions[img.className].bind(this));
- }, this);
-
- //click on the directory name must open the directory itself
- this.ele.getElements('b')[0].addEvent('click', this.toggle.bind(this));
-
- //iterate over child directories
- var uls = this.ele.getElements('ul');
- if(uls.length > 0)
- {
- uls[0].getChildren("li.folder").each(function(fld) {
- var path = fld.getElements("input.path")[0].get("value");
- var name = fld.getElements("input.name")[0].get("value");
- this.directories.push(new Item(this, path, name, fld));
- }.bind(this));
- uls[0].getChildren("li.file").each(function(fld) {
- var path = fld.getElements("input.path")[0].get("value");
- var name = fld.getElements("input.name")[0].get("value");
- this.files.push(new Item(this, path, name, fld));
- }.bind(this));
- }
- },
-
- reorderElements: function() {
- //TODO sort the main ul again (to keep data ordered after renaming something)
- },
-
- del: function(event) {
- $("confirm_form").removeEvents("submit");
- $("confirm_form").addEvent("submit", this.deleteDirectory.bind(this));
-
- $$("#confirm_form p").set('html', '{{_(("Are you sure you want to delete the selected item?"))}}');
-
- show_confirm_box();
- event.stop();
- },
-
- deleteDirectory: function(event) {
- hide_confirm_box();
- new Request.JSON({
- method: 'POST',
- url: "/json/filemanager/delete",
- data: {"path": this.path, "name": this.name},
- onSuccess: function(data) {
- if(data.response == "success")
- {
- new Fx.Tween(this.ele).start('opacity', 0);
- var ul = this.ele.parentNode;
- this.ele.dispose();
- //if this was the only child, add a "empty folder" div
- if(!ul.getChildren('li')[0])
- {
- var div = new Element("div", { 'html': '{{ _("Folder is empty") }}' });
- div.replaces(ul);
- }
-
- indicateSuccess();
- } else
- {
- //error from json code...
- indicateFail();
- }
- }.bind(this),
- onFailure: indicateFail
- }).send();
-
- event.stop();
- },
-
- rename: function(event) {
- $("rename_form").removeEvents("submit");
- $("rename_form").addEvent("submit", this.renameDirectory.bind(this));
-
- $("path").set("value", this.path);
- $("old_name").set("value", this.name);
- $("new_name").set("value", this.name);
-
- show_rename_box();
- event.stop();
- },
-
- renameDirectory: function(event) {
- hide_rename_box();
- new Request.JSON({
- method: 'POST',
- url: "/json/filemanager/rename",
- onSuccess: function(data) {
- if(data.response == "success")
- {
- this.name = $("new_name").get("value");
- this.ele.getElements("b")[0].set('html', $("new_name").get("value"));
- this.reorderElements();
- indicateSuccess();
- } else
- {
- //error from json code...
- indicateFail();
- }
- }.bind(this),
- onFailure: indicateFail
- }).send($("rename_form").toQueryString());
-
- event.stop();
- },
-
- mkdir: function(event) {
- new Request.JSON({
- method: 'POST',
- url: "/json/filemanager/mkdir",
- data: {"path": this.path + "/" + this.name, "name": '{{_("New folder")}}'},
- onSuccess: function(data) {
- if(data.response == "success")
- {
- new Request.HTML({
- method: 'POST',
- url: "/filemanager/get_dir",
- data: {"path": data.path, "name": data.name},
- onSuccess: function(li) {
- //add node as first child of ul
- var ul = this.ele.getChildren('ul')[0];
- if(!ul)
- {
- //remove the "Folder Empty" div
- this.ele.getChildren('div').dispose();
-
- //create new ul to contain subfolder
- ul = new Element("ul");
- ul.inject(this.ele, 'bottom');
- }
- li[0].inject(ul, 'top');
-
- //add directory as a subdirectory of the current item
- this.directories.push(new Item(this.ui, data.path, data.name, ul.firstChild));
- }.bind(this),
- onFailure: indicateFail
- }).send();
- indicateSuccess();
- } else
- {
- //error from json code...
- indicateFail();
- }
- }.bind(this),
- onFailure: indicateFail
- }).send();
-
- event.stop();
- },
-
- toggle: function() {
- var child = this.ele.getElement('ul');
- if(child == null)
- child = this.ele.getElement('div');
-
- if(child != null)
- {
- if (child.getStyle('display') == "block") {
- child.dissolve();
- } else {
- child.reveal();
- }
- }
- }
-});
diff --git a/module/web/templates/default/folder.html b/module/web/templates/default/folder.html
deleted file mode 100644
index b385e80cb..000000000
--- a/module/web/templates/default/folder.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<li class="folder">
- <input type="hidden" name="path" class="path" value="{{ path }}" />
- <input type="hidden" name="name" class="name" value="{{ name }}" />
- <span>
- <b>{{ name }}</b>
- <span class="buttons" style="opacity:0">
- <img title="{{_("Rename Directory")}}" class="rename" style="cursor: pointer" height="12px" src="/media/default/img/pencil.png" />
- &nbsp;&nbsp;
- <img title="{{_("Delete Directory")}}" class="delete" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/media/default/img/delete.png" />
- &nbsp;&nbsp;
- <img title="{{_("Add subdirectory")}}" class="mkdir" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/media/default/img/add_folder.png" />
- </span>
- </span>
- <div style="display:none">{{ _("Folder is empty") }}</div>
-</li> \ No newline at end of file
diff --git a/module/web/templates/default/home.html b/module/web/templates/default/home.html
deleted file mode 100644
index 0efb1bcf8..000000000
--- a/module/web/templates/default/home.html
+++ /dev/null
@@ -1,266 +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.fid
- });
-
- 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.fid != this},id);
- this.ids = this.ids.erase(id)
- }, this);
-
- data.links.each(function(link, i){
- if (this.ids.contains(link.fid)){
-
- var index = this.ids.indexOf(link.fid);
- this.entries[index].update(link)
-
- }else{
- var entry = new LinkEntry(link.fid);
- entry.insert(link);
- this.entries.push(entry);
- this.ids.push(link.fid);
- 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.fid = 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}_bleft".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 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>#}
-{# <a href="/filemanager/" title=""><img src="/media/default/img/head-menu-download.png" alt="" /> {{_("FileManager")}}</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 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 }}_bleft">{{ link.format_size }}</td>
- <td>
- <span id="link_{{ link.id }}_percent">{{ link.percent }}% /{{ link.bleft }}</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/default/info.html b/module/web/templates/default/info.html
deleted file mode 100644
index 77ae57376..000000000
--- a/module/web/templates/default/info.html
+++ /dev/null
@@ -1,81 +0,0 @@
-{% extends 'default/base.html' %}
-
-{% block head %}
- <script type="text/javascript">
- window.addEvent("domready", function() {
- var ul = new Element('ul#twitter_update_list');
- var script1 = new Element('script[src=http://twitter.com/javascripts/blogger.js][type=text/javascript]');
- var script2 = new Element('script[src=http://twitter.com/statuses/user_timeline/pyLoad.json?callback=twitterCallback2&count=6][type=text/javascript]');
- $("twitter").adopt(ul, script1, script2);
- });
- </script>
-{% endblock %}
-
-{% block title %}{{ _("Information") }} - {{ super() }} {% endblock %}
-{% block subtitle %}{{ _("Information") }}{% endblock %}
-
-{% block content %}
- <h3>{{ _("News") }}</h3>
- <div id="twitter"></div>
-
- <h3>{{ _("Support") }}</h3>
-
- <ul>
- <li style="font-weight:bold;">
- <a href="http://pyload.org/wiki" target="_blank">Wiki</a>
- &nbsp;&nbsp;|&nbsp;&nbsp;
- <a href="http://forum.pyload.org/" target="_blank">Forum</a>
- &nbsp;&nbsp;|&nbsp;&nbsp;
- <a href="http://pyload.org/irc/" target="_blank">Chat</a>
- </li>
- <li style="font-weight:bold;"><a href="http://docs.pyload.org" target="_blank">Documentation</a></li>
- <li style="font-weight:bold;"><a href="https://bitbucket.org/spoob/pyload/overview" target="_blank">Development</a></li>
- <li style="font-weight:bold;"><a href="https://bitbucket.org/spoob/pyload/issues?status=new&status=open" target="_blank">Issue Tracker</a></li>
-
- </ul>
-
- <h3>{{ _("System") }}</h3>
- <table class="system">
- <tr>
- <td>{{ _("Python:") }}</td>
- <td>{{ python }}</td>
- </tr>
- <tr>
- <td>{{ _("OS:") }}</td>
- <td>{{ os }}</td>
- </tr>
- <tr>
- <td>{{ _("pyLoad version:") }}</td>
- <td>{{ version }}</td>
- </tr>
- <tr>
- <td>{{ _("Installation Folder:") }}</td>
- <td>{{ folder }}</td>
- </tr>
- <tr>
- <td>{{ _("Config Folder:") }}</td>
- <td>{{ config }}</td>
- </tr>
- <tr>
- <td>{{ _("Download Folder:") }}</td>
- <td>{{ download }}</td>
- </tr>
- <tr>
- <td>{{ _("Free Space:") }}</td>
- <td>{{ freespace }}</td>
- </tr>
- <tr>
- <td>{{ _("Language:") }}</td>
- <td>{{ language }}</td>
- </tr>
- <tr>
- <td>{{ _("Webinterface Port:") }}</td>
- <td>{{ webif }}</td>
- </tr>
- <tr>
- <td>{{ _("Remote Interface Port:") }}</td>
- <td>{{ remote }}</td>
- </tr>
- </table>
-
-{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/login.html b/module/web/templates/default/login.html
index 9e91ad309..c8cd78a33 100644
--- a/module/web/templates/default/login.html
+++ b/module/web/templates/default/login.html
@@ -1,36 +1,43 @@
{% 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>
+<br>
+{% if logout %}
+<div id="logged_out">
+ <b>{{_("You were successfully logged out.")}}</b>
+</div>
+{% endif %}
+<br>
+<div class="login">
+ <form action="/login" method="post" class="form-horizontal">
<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>
-
+ <div class="control-group">
+ <label class="control-label" for="inputEmail">Username</label>
+ <div class="controls">
+ <input type="text" id="inputEmail" placeholder="Username" name="username">
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="inputPassword">Password</label>
+ <div class="controls">
+ <input type="password" id="inputPassword" placeholder="Password" name="password">
+ </div>
+ </div>
+ <div class="control-group">
+ <div class="controls">
+ <label class="checkbox">
+ <input type="checkbox"> Remember me
+ </label>
+ <button type="submit" class="btn">Login</button>
+ </div>
+ </div>
+ </form>
+</div>
+<br>
+<div style="text-align: center">
{% if errors %}
<p>{{_("Your username and password didn't match. Please try again.")}}</p>
{{ _("To reset your login data or add an user run:") }} <b> python pyLoadCore.py -u</b>
{% endif %}
-
</div>
-<br>
-
-{% endblock %}
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/logout.html b/module/web/templates/default/logout.html
deleted file mode 100644
index d3f07472b..000000000
--- a/module/web/templates/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/default/logs.html b/module/web/templates/default/logs.html
deleted file mode 100644
index d6288df0e..000000000
--- a/module/web/templates/default/logs.html
+++ /dev/null
@@ -1,41 +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 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/default/pathchooser.html b/module/web/templates/default/pathchooser.html
deleted file mode 100644
index d00637055..000000000
--- a/module/web/templates/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/default/queue.html b/module/web/templates/default/queue.html
deleted file mode 100644
index c88fa3568..000000000
--- a/module/web/templates/default/queue.html
+++ /dev/null
@@ -1,104 +0,0 @@
-{% extends 'default/base.html' %}
-{% block head %}
-
-<script type="text/javascript" src="/media/js/package_ui.js"></script>
-
-<script type="text/javascript">
-
-document.addEvent("domready", function(){
- var pUI = new PackageUI("url", {{ target }});
-});
-</script>
-{% endblock %}
-
-{% if target %}
- {% set name = _("Queue") %}
-{% else %}
- {% set name = _("Collector") %}
-{% endif %}
-
-{% block title %}{{name}} - {{super()}} {% endblock %}
-{% block subtitle %}{{name}}{% 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 %}
-{% autoescape true %}
-
-<ul id="package-list" style="list-style: none; padding-left: 0; margin-top: -10px;">
-{% for package in content %}
- <li>
-<div id="package_{{package.pid}}" 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")}}" style="margin-left: -10px; cursor: pointer" height="12px" src="/media/default/img/package_go.png" />
- </span>
- </div>
- {% set progress = (package.linksdone * 100) / package.linkstotal %}
-
- <div id="progress" style="border-radius: 4px; border: 1px solid #AAAAAA; width: 50%; height: 1em">
- <div style="width: {{ progress }}%; height: 100%; background-color: #add8e6;"></div>
- <label style="font-size: 0.8em; font-weight: bold; padding-left: 5px; position: relative; top: -17px">
- {{ package.sizedone|formatsize }} / {{ package.sizetotal|formatsize }}</label>
- <label style="font-size: 0.8em; font-weight: bold; padding-right: 5px ;float: right; position: relative; top: -17px">
- {{ package.linksdone }} / {{ package.linkstotal }}</label>
- </div>
- <div style="clear: both; margin-bottom: -10px"></div>
-
- <div id="children_{{package.pid}}" style="display: none;" class="children">
- <span class="child_secrow">{{_("Folder:")}} <span class="folder">{{package.folder}}</span> | {{_("Password:")}} <span class="password">{{package.password}}</span></span>
- <ul id="sort_children_{{package.pid}}" style="list-style: none; padding-left: 0">
- </ul>
- </div>
-</div>
- </li>
-{% endfor %}
-</ul>
-{% endautoescape %}
-{% endblock %}
-
-{% block hidden %}
-<div id="pack_box" class="window_box" 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_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>
-{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html
index a4443025a..20424606f 100644
--- a/module/web/templates/default/settings.html
+++ b/module/web/templates/default/settings.html
@@ -1,204 +1,105 @@
-{% extends 'default/base.html' %}
-
-{% block title %}{{ _("Config") }} - {{ super() }} {% endblock %}
-{% block subtitle %}{{ _("Config") }}{% endblock %}
-
-{% block head %}
- <script type="text/javascript" src="/media/js/tinytab_static.js"></script>
- <script type="text/javascript" src="/media/js/MooDropMenu_static.js"></script>
- <script type="text/javascript" src="/media/js/settings.js"></script>
-
-{% endblock %}
-
-{% block content %}
-
- <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 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>
- <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>{{ _("Max Parallel") }}</th>
- <th>{{ _("Delete?") }}</th>
- </tr>
- </thead>
-
-
- {% for account in conf.accs %}
- {% set plugin = account.type %}
- <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="12"/>
- </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}}|limitdl;{{account.login}}"
- name="{{plugin}}|limitdl;{{account.login}}" type="text"
- size="2" value="{{account.limitdl}}"/>
- </td>
- <td>
- <input id="{{plugin}}|delete;{{account.login}}"
- name="{{plugin}}|delete;{{account.login}}" type="checkbox"
- value="True"/>
- </td>
- </tr>
- {% 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>
-{% endblock %}
-{% block hidden %}
-<div id="account_box" class="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="password" 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 types|sort %}
- <option value="{{ type }}">{{ type }}</option>
- {% endfor %}
- </select>
-
-<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 %} \ No newline at end of file
+{% extends 'default/base.html' %}
+
+{% block title %}{{ _("Settings") }} - {{ super() }} {% endblock %}
+{% block subtitle %}{{ _("Settings") }}
+{% endblock %}
+
+{% block css %}
+ <link href="static/css/default/settings.less" rel="stylesheet/less" type="text/css" media="screen"/>
+{% endblock %}
+
+{% block require %}
+ App.initSettingsView();
+{% endblock %}
+
+{% block head %}
+ <script type="text/template" id="template-menu">
+ <%=if core%>
+ <li class="nav-header"><i class="icon-globe icon-white"></i> {{ _("General") }}</li>
+ <%= each core%>
+ <li data-name="<% name %>"><a href="#"><% label %></a></li>
+ <%/each%>
+ <%/if%>
+ <li class="divider"></li>
+ <li class="nav-header"><i class="icon-th-large icon-white"></i> {{ _("Addons") }}</li>
+ <%= each addon %>
+ <li class="addon" data-name="<% name %>">
+ <a href="#" style="background-image: url(icons/<% name %>);">
+ <% label %>
+ <i class="iconf-remove pull-right"></i>
+ <%= if activated %>
+ <div class="addon-on">
+ active
+ <%else%>
+ <div class="addon-off">
+ inactive
+ <%/if%>
+ <%= if user_context %>
+ {# TODO: tooltip #}
+ <i class="iconf-user pull-right"></i>
+ <%else%>
+ <i class="iconf-globe pull-right"></i>
+ <%/if%>
+ </div>
+ </a>
+ </li>
+ <%/each%>
+ <li class="divider"></li>
+ <li class="nav-header"><i class="icon-th-list icon-white"></i> {{ _("Plugin Configs") }}</li>
+ <%= each plugin %>
+ <li class="plugin" data-name="<% name %>">
+ <a href="#" style="background-image: url(icons/<% name %>);">
+ <% label %>
+ <i class="iconf-remove pull-right"></i>
+ </a>
+ </li>
+ <%/each%>
+ </script>
+ <script type="text/template" id="template-config">
+ <legend>
+ <div class="page-header">
+ <h1><% label %>
+ <small><% description %></small>
+ <a class="btn btn-small" href="#" data-title="Help" data-content="<% long_description %>"><i
+ class="icon-question-sign"></i></a>
+ </h1>
+ </div>
+ </legend>
+ <div class="control-content">
+ </div>
+ <div class="form-actions">
+ <button type="button" class="btn btn-primary">Save changes</button>
+ <button type="button" class="btn btn-reset">Reset</button>
+ </div>
+ </script>
+ <script type="text/template" id="template-config-item">
+ <div class="control-group">
+ <label class="control-label"><% label %></label>
+
+ <div class="controls">
+ {# <span class="help-inline"><% description %></span>#}
+ </div>
+ </div>
+ </script>
+
+{% endblock %}
+
+{% block actionbar %}
+ <span class="span9">
+ <button class="btn btn-small btn-blue btn-add">Add Plugin</button>
+ </span>
+{% endblock %}
+
+{% block content %}
+ <div class="span2">
+ <ul class="nav nav-list well settings-menu">
+ </ul>
+ </div>
+ <div class="span10">
+ <div class="well setting-box">
+ <form class="form-horizontal" action="#">
+ <h1>Please choose a config section</h1>
+ </form>
+ </div>
+ </div>
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/settings_item.html b/module/web/templates/default/settings_item.html
deleted file mode 100644
index 813383343..000000000
--- a/module/web/templates/default/settings_item.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<table class="settable">
- {% if section.outline %}
- <tr><th colspan="2">{{ section.outline }}</th></tr>
- {% endif %}
- {% for okey, option in section.iteritems() %}
- {% if okey not in ("desc","outline") %}
- <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/default/setup.html b/module/web/templates/default/setup.html
index 39ef6f1e8..e5c9f4b8c 100644
--- a/module/web/templates/default/setup.html
+++ b/module/web/templates/default/setup.html
@@ -1,13 +1,16 @@
{% extends 'default/base.html' %}
-
-{% block title %}{{ _("Setup") }} - {{ super() }} {% endblock %}
-{% block subtitle %}{{ _("Setup") }}{% endblock %}
-{% block headpanel %}Welcome to pyLoad{% endblock %}
-{% block menu %}
- <li style="height: 25px"> <!-- Needed to get enough margin -->
- </li>
+{% block title %}
+ {{_("Setup")}} - {{ super()}}
{% endblock %}
{% block content %}
- Comming Soon.
+ <div class="hero-unit">
+ <h1>You did it!</h1>
+ <p>pyLoad is running and ready for configuration.</p>
+ <p>
+ <a class="btn btn-primary btn-large">
+ Go on
+ </a>
+ </p>
+ </div>
{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/window.html b/module/web/templates/default/window.html
deleted file mode 100644
index b61fa7149..000000000
--- a/module/web/templates/default/window.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<iframe id="upload_target" name="upload_target" src="" style="display: none; width:0;height:0"></iframe>
-
-<div id="add_box" class="window_box">
-<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 or any text and press the filter button.")}}</span>
-<span class="small"> {{ _("Filter urls") }}
-<img alt="URIParsing" Title="Parse Uri" src="/media/default/img/parseUri.png" style="cursor:pointer; vertical-align: text-bottom;" onclick="parseUri()"/>
-</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