{% extends "yacon/nexus_base.html" %}
{% load pagination_tags %}

{% block scripts %}
    {{ block.super }}
    <script type="text/JavaScript">
        $(document).ready(function(){
            $('#add_user').button().click(function() {
                document.location.href = '/yacon/nexus/users/add_user/';
            });
            $('#navbar').tabnav('select_by_id', 'nav_users');
        });
    </script>
{% endblock scripts %}

{% block content %}
<div class="inside">
    <br/>
    <button id="add_user">Add User</button>
    <br/>
    <h2>Users</h2>

    {% autopaginate profiles 25 %}
    <div id="paginator">
        {% paginate %}
    </div>
    <table>
        <thead>
            {% include "yacon/nexus/includes/users_header.html" %}
        </thead>
        <tbody>
        {% for profile in profiles %}
            <tr class="{% cycle 'odd' 'even' %}">
                {% include "yacon/nexus/includes/users_row.html" %}
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
{% endblock content %}
