<!DOCTYPE html>
<html lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='css/base.css')}}"/>
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='css/window.css')}}"/>
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='vendor/MooTools/MooDialog/css/MooDialog.css')}}"/>

<script type="text/javascript" src="{{url_for('static', filename='vendor/MooTools/MooTools-Core.min.js')}}"></script>
<script type="text/javascript" src="{{url_for('static', filename='vendor/MooTools/MooTools-More.min.js')}}"></script>
<script type="text/javascript" src="{{url_for('static', filename='vendor/MooTools/MooDialog/MooDialog.js')}}"></script>
<script type="text/javascript" src="{{url_for('static', filename='vendor/MooTools/MooDialog/MooDialog.Confirm.js')}}"></script>
<script type="text/javascript" src="{{url_for('static', filename='vendor/MooTools/Purr/purr.js')}}"></script>
<script type="text/javascript" src="{{theme_template('js/base.js')}}" nopoll={{no_status_polling}}></script>

<link rel="icon" type="image/ico" href="{{url_for('static', filename='img/favicon.ico')}}" />

<title>{% block title %}pyLoad{% endblock %}</title>

{% block head %}
{% endblock %}
</head>
<body>
<a class="anchor" name="#" id="#"></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="{{url_for('static', filename='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="{{url_for('static', filename='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="{{url_for('app.logout')}}" class="action logout" rel="nofollow">{{_("Logout")}}</a></li>
        <li><a href="{{url_for('app.info')}}" class="action info" rel="nofollow">{{_("Status")}}</a></li>

    </ul>
{% else %}
    <span style="padding-right: 2px;">{{_("Please Login!")}}</span>
{% endif %}

    {% endblock %}
    </div>

    <a href="{{url_for('app.dashboard')}}"><img id="head-logo" src="{{url_for('static', filename='img/pyload-logo.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 name not in url and right -%}class="right"{%- endif %}
        {%- endmacro %}

        {% block menu %}
        <li>
            <a href="{{url_for('app.dashboard')}}" title=""><img src="{{url_for('static', filename='img/head-menu-home.png')}}" alt="" /> {{_("Dashboard")}}</a>
        </li>
        <li {{ selected('queue') }}>
            <a href="{{url_for('app.queue')}}" title=""><img src="{{url_for('static', filename='img/head-menu-queue.png')}}" alt="" /> {{_("Queue")}}</a>
        </li>
        <li {{ selected('collector') }}>
            <a href="{{url_for('app.collector')}}" title=""><img src="{{url_for('static', filename='img/head-menu-collector.png')}}" alt="" /> {{_("Packages")}}</a>
        </li>
        <li {{ selected('files') }}>
            <a href="{{url_for('app.files')}}" title=""><img src="{{url_for('static', filename='img/head-menu-development.png')}}" alt="" /> {{_("Files")}}</a>
        </li>
        <!-- <li {{ selected('filemanager') }}> -->
            <!-- <a href="/filemanager" title=""><img src="{{url_for('static', filename='img/head-menu-download.png')}}" alt="" /> {{_("File Manager")}}</a> -->
        <!-- </li> -->
        <li {{ selected('logs', True) }}>
            <a href="{{url_for('app.logs')}}"  class="action index" accesskey="x" rel="nofollow"><img src="{{url_for('static', filename='img/head-menu-index.png')}}" alt="" />{{_("Logs")}}</a>
        </li>
        <li {{ selected('settings', True) }}>
            <a href="{{url_for('app.settings')}}"  class="action index" accesskey="x" rel="nofollow"><img src="{{url_for('static', filename='img/head-menu-config.png')}}" alt="" />{{_("Settings")}}</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">{{_("Running:")}}</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">{{_("Queue:")}} <b id="actives" title="{{_("Active")}}">{{ status.active }}</b> | <b id="actives_from" title="{{_("Queued")}}">{{ status.queue }}</b> | <b id="actives_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{% endblock %}</h1>

{% block error %}
{% endblock error %}

{% block statusbar %}
{% endblock %}

<br/>

<div class="level1" style="clear:both">
</div>
<noscript><h1>Enable JavaScript to use the webinterface.</h1></noscript>

<div id="load-indicator" style="opacity: 0; float: right; margin-top: -10px;">
    <img src="{{url_for('static', filename='img/ajax-loader.gif')}}" alt="" style="padding-right: 5px"/>
    {{_("loading")}}
</div>

{% block content %}
{% endblock content %}

    <hr style="clear: both;" />

<div id="foot">&copy; 2008-2023 pyLoad team
<a href="#" class="action top" accesskey="x"><span>{{_("Back to top")}}</span></a><br />
<!--<div class="breadcrumbs"></div>-->

</div>
</div>
</div>

<div style="display: none;">
    {% include 'window.html' %}
    {% include 'captcha.html' %}
    {% block hidden %}
    {% endblock %}
</div>

</body>
</html>
