diff options
Diffstat (limited to 'module/web/templates/default/settings.html')
-rw-r--r-- | module/web/templates/default/settings.html | 337 |
1 files changed, 133 insertions, 204 deletions
diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html index a4443025a..1f9be3db0 100644 --- a/module/web/templates/default/settings.html +++ b/module/web/templates/default/settings.html @@ -1,204 +1,133 @@ -{% 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> {{ _("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> {{ _("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 %}{{ _("Config") }} - {{ super() }} {% endblock %}
+{% block subtitle %}{{ _("Config") }}
+{% 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="<% this.name %>"><a href="#"><% this.label %></a></li>
+ <%/each%>
+ <%/if%>
+ <li class="divider"></li>
+ <li class="nav-header"><i class="icon-th-large icon-white"></i> {{ _("Addons") }}</li>
+ <li class="divider"></li>
+ <li class="nav-header"><i class="icon-th-list icon-white"></i> {{ _("Other") }}</li>
+ </script>
+{% endblock %}
+
+{% block content %}
+ <div class="span2">
+ <ul class="nav nav-list well settings-menu">
+ </ul>
+ </div>
+ <!-- Info Popup -->
+ <div class="modal hide fade in" id="info">
+ <div class="modal-header">
+ <button type="button" class="close">×</button>
+ <h3>Info Popup</h3>
+ </div>
+ <div class="modal-body">
+ <h4>General</h4>
+
+ <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem.</p>
+
+ <h4>And...</h4>
+
+ <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in,
+ egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
+
+ </div>
+ <div class="modal-footer">
+ <button class="btn">Close</button>
+ </div>
+ </div>
+ <!-- End Info Popup -->
+ <div class="span10">
+ <div class="well setting-box">
+ <form class="form-horizontal">
+ <legend>
+ <div class="page-header">
+ <h1>Example Settings
+ <small>Subtext for header</small>
+ <a class="btn btn-small " href="#"><i
+ class="icon-question-sign"></i></a>
+ </h1>
+ </div>
+ </legend>
+ <div class="control-group">
+ <label class="control-label">Max Parallel Downloads</label>
+
+ <div class="controls">
+ <input id="in_mpd" type="text" placeholder="3">
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label">Limit Download Speed</label>
+
+ <div class="controls">
+ <div class="btn-group" data-toggle="buttons-radio">
+ <button type="button" class="btn bnmaxspeed" id="onmaxspeed">On</button>
+ <button type="button" class="btn bnmaxspeed active" id="offmaxspeed">Off</button>
+ </div>
+ <div id="downloadspeed" style="display:none">
+ <label>Max Download Speed in kb/s</label>
+ <input type="text" placeholder="Tipp etwas ...">
+ </div>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label">Allow IPv6</label>
+
+ <div class="controls">
+ <div class="btn-group" data-toggle="buttons-radio">
+ <button type="button" class="btn bnip6" id="onip6">On</button>
+ <button type="button" class="btn bnip6 active" id="offip6">Off</button>
+ </div>
+ </div>
+ </div>
+ <div class="form-actions">
+ <button type="submit" class="btn btn-primary">Änderungen Speichern</button>
+ <button type="button" class="btn">Abbrechen</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ <script src="static/js/libs/jquery-1.9.0.js"></script>
+ {# <script src="static/js/libs/bootstrap-2.1.1.js"></script>#}
+ <script type="text/javascript">
+ $(".bnmaxspeed").click(function() {
+ $(".bnmaxspeed").removeClass("active");
+ $(this).toggleClass("active");
+ if ($("#onmaxspeed").hasClass("active")) {
+ $("#downloadspeed").show();
+ }
+ else {
+ $("#downloadspeed").hide();
+ }
+
+ });
+ $(".bnip6").click(function() {
+ $(".bnip6").removeClass("active");
+ $(this).toggleClass("active");
+ });
+ $('#info').modal('toggle');
+
+ $('#in_mpd').tooltip({
+ placement: 'right',
+ title: 'Gib an wie viele Downloads gleichzeitg laufen dürfen.'
+ });
+
+ </script>
+{% endblock %}
\ No newline at end of file |