{% extends "base.html" %}
{% load i18n %}
{% block headers %}
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.js"></script>
<script type="text/javascript" charset="utf-8">
//<![CDATA[{{ MEDIA_URL }}
var rj;
var ax_error = false;
//]]>
</script>
<script type="text/javascript" language="javascript" src="{{ MEDIA_URL }}js/jquery.address.js"></script>
<script type="text/javascript" language="javascript" src="{{ MEDIA_URL }}js/ajax-csrf-tokenize.js"></script>
<script type="text/javascript" language="javascript" src="{{ MEDIA_URL }}js/accounts.js"></script>
{% endblock headers %}
{% block submenu %}
{% if user.is_superuser %}
<ul>
  <li><a id="user-add" href="{% url create-account %}">{% trans "Create account" %}</a></li>
  <li><a href="{% url settings-index %}">{% trans "Domains" %}</a></li>
  <li><a href="{% url list-scanners %}">{% trans "Scanners" %}</a></li>
</ul>	
{% endif %}
{% endblock submenu %}
{% block title %}{% trans "Accounts" %}{% endblock title %}
{% block heading %}{% trans "Accounts :: " %}{% load pagination_heading %}{% pagination_heading %}{% endblock heading %}
{% block content %}
<div class="Grid_heading">
    <div class="Users_grid_hash">&nbsp;</div>
    <div class="Users_grid_username">{% trans "Username" %}</div>
    <div class="Users_grid_fullname">{% trans "Full names" %}</div>
    <div class="Users_grid_email">{% trans "Email address" %}</div>
	<div class="Users_grid_del"></div>
</div>
{% for user in object_list %}
<div id="account-id-{{ user.id }}" class="{% cycle 'LightBlue' 'LightGray' %}_div">
    <div class="hash">
        <a href="{% url user-profile user.id %}">
        {% if user.is_superuser %}
        <img src="{{ MEDIA_URL }}imgs/user_red.png" alt="x" title="{% trans "View account" %}" />
        {% else %}
        <img src="{{ MEDIA_URL }}imgs/user.png" alt="x" title="{% trans "View account" %}" />
        {% endif %}
        </a>
    </div>
    <div class="Users_username">
    {{ user.username }}
    </div>
    <div class="Users_fullname">
    {{ user.first_name }} {{ user.last_name }}
    </div>
    <div class="Users_email">
		{{ user.email }}
    </div>
	<div class="Users_del">
		<a href="{% url delete-account user.id %}"><img src="{{ MEDIA_URL }}imgs/action_delete.png" alt="Delete" title="Delete" /></a>
	</div>
</div>
{% endfor %}
{% endblock content %}
{% block paging %}
<div class="content_footer">
    <div id="paginator">
    {% load generic_paginator %}{% generic_paginator 3 %}
    </div>
</div>
{% endblock paging %}
