{% extends "admin_base.html" %}
{% load seahub_tags i18n %}

{% block nav_orgadmin_class %}class="cur"{% endblock %}

{% block right_panel %}
<h3>{% trans "All Organizations" %}</h3>
{% if orgs %}
<table>
    <tr>
        <th width="20%">{% trans "Name" %}</th>
        <th width="18%">{% trans "Url Prefix" %}</th>
        <th width="27%">{% trans "Creator" %}</th>
        <th width="23%">{% trans "Create At" %}</th>
        <th width="12%">{% trans "Operations" %}</th>
    </tr>
    {% for org in orgs %}
    <tr>
        <td>{{ org.org_name }}</td>
        <td>{{ org.url_prefix }}</td>
        <td>{{ org.creator }}</td>
        <td>{{ org.ctime|tsstr_sec }}</td>
        <td><a href="#" data-url="{{ SITE_ROOT}}org/remove/{{ org.org_id }}/" data-target="{{ org.org_name }}" class="org-remove-btn op vh">{% trans "Delete" %}</a></td>
    </tr>
    {% endfor %}
</table>

<!--
<div id="paginator">
    {% if current_page != 1 %}
    <a href="{{ SITE_ROOT }}groupadmin/?page={{ prev_page }}&per_page={{ per_page }}">上一页</a>
    {% endif %}
    {% if page_next %}
    <a href="{{ SITE_ROOT }}groupadmin/?page={{ next_page }}&per_page={{ per_page }}">下一页</a>
    {% endif %}
    <span>每页：</span> 
    {% if per_page == 25 %}
    <span> 25 </span> 
    {% else %}
    <a href="{{ SITE_ROOT }}groupadmin/?per_page=25" class="per-page">25</a>
    {% endif %}
    {% if per_page == 50 %}
    <span> 50 </span> 
    {% else %}
    <a href="{{ SITE_ROOT }}groupadmin/?per_page=50" class="per-page">50</a>
    {% endif %}
    {% if per_page == 100 %}
    <span> 100 </span> 
    {% else %}
    <a href="{{ SITE_ROOT }}groupadmin/?per_page=100" class="per-page">100</a>
    {% endif %}
</div>
-->
{% else %}
<p>{% trans "Empty" %}</p>
{% endif %}
{% endblock %}

{% block extra_script %}
<script type="text/javascript">
addConfirmTo($('.org-remove-btn'), {
        'title':"{% trans "Delete Organization" %}",
        'con':"{% trans "Are you sure you want to delete %s ?" %}"
});
</script>
{% endblock %}
 
