{% extends "base.html" %}

{% block content %}
    {% if users %}
    <table class="table table-bordered">
        <thead>
            <tr><td>uid</td><td>第三方帐号</td><td>名字</td><td>头像</td><td>当前登录用户</td></tr>
        </thead>
        {% for u in users %}
            <tr>
                <td>{{ u.id }}</td>
                <td>
                    {% if u.social %}
                        {{ u.social }}
                    {% else %}
                        <i class="icon-remove"></i>
                    {% endif %}
                </td>
                <td>{{ u.username }}</td>
                <td>
                    <div style="width:50px; height:50px;">
                    {% if u.avatar %}
                        <img src="{{ u.avatar }}" />
                    {% else %}
                        <i class="icon-ban-circle"></i>
                    {% endif %}
                    </div>
                </td>
                <td>
                    {% if u.current %}
                        <i class="icon-ok"></i>
                    {% else %}
                        <i class="icon-remove"></i>
                    {% endif %}
                </td>
            </tr>
        {% endfor %}
    </table>
    {% else %}
        <h2>No users</h2>
    {% endif %}
    
    <div>
        {% if request.siteuser %}
            通知
            <span id="siteuserNotify"></span>
            <br/>
            {% if not request.siteuser.is_social %}
            <a href="{% url "account_settings" %}">Settings</a>
            {% endif %}
            <a href="#" id="siteuserLogout">Logout</a>
        {% else %}
            <a href="{% url "siteuser_login" %}">Login</a>
            <a href="{% url "siteuser_register" %}">Register</a>
        {% endif %}
    </div>
{% endblock  %}