{% extends "admin_base.html" %}
{% load i18n %}
{% block nav_seafadmin_class %}class="cur"{% endblock %}

{% block title_panel %}
<div class="tabnav">
    <ul class="tabnav-tabs">
        <li class="tabnav-tab tabnav-tab-cur">{% trans "All" %}</li>
        <li class="tabnav-tab"><a href="{% url 'sys_list_orphan' %}">{% trans "Orphan" %}</a></li>
        <li class="tabnav-tab"><a href="{% url 'sys_list_system' %}">{% trans "System" %}</a></li>
    </ul>
    <button class="icon-search fright" id="search-repo-btn"> {% trans "Search" %}</button>    
</div>

{% endblock %}

{% block main_panel %}
{% if repos %}
{% include "sysadmin/repoadmin_table.html" %}

<div id="paginator">
    {% if current_page != 1 %}
    <a href="?page={{ prev_page }}&per_page={{ per_page }}">{% trans "Previous" %}</a>
    {% endif %}
    {% if page_next %}
    <a href="?page={{ next_page }}&per_page={{ per_page }}">{% trans "Next" %}</a>
    {% endif %}
    {% if current_page != 1 or page_next %}
    |
    {% endif %}
    <span>{% trans "Per page: " %}</span> 
    {% if per_page == 25 %}
    <span> 25 </span> 
    {% else %}
    <a href="?per_page=25" class="per-page">25</a>
    {% endif %}
    {% if per_page == 50 %}
    <span> 50 </span> 
    {% else %}
    <a href="?per_page=50" class="per-page">50</a>
    {% endif %}
    {% if per_page == 100 %}
    <span> 100 </span> 
    {% else %}
    <a href="?per_page=100" class="per-page">100</a>
    {% endif %}
</div>
{% else %}
<p>{% trans "None" %}</p>
{% endif %}

{% include "sysadmin/repo_transfer_form.html" %}
{% endblock %}

{% block extra_script %}
<script type="text/javascript">
$('#search-repo-btn').click(function() {
    location.href = "{% url 'sys_repo_search' %}";
});
{% include "sysadmin/repoadmin_js.html" %}
</script>
{% endblock %}
 
