{% extends "profiles/base.html" %}
{% load avatar_tags %}
{% load profile_tags %}
{% load i18n %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/iconrow.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/profiles.css">
{% endblock %}

{% block body %}
<div class="t">
{{ block.super }}
{% users_nav request.user user_this %}
	{% users_options request.user user_this %}
	<h1>{% trans "Upload / Change Avatar" %}</h1>
	 <div class="clear-right"></div>
	<h2>{% trans "User:" %} <a href="{{ user_this.get_absolute_url }}">{{user_this.first_name }} {{ user_this.last_name }}</a></h2>
    <p>{% trans "Current avatar:" %} </p>
    {% avatar user_this %}
    {% if not avatars %}
        <p>{% trans "You do not yet have an avatar.  Please upload one now." %}</p>
    {% else %}
        <form method="POST" action="">{% csrf_token %}
            <ul class="list-avatars">
                {{ primary_avatar_form.as_ul }}
            </ul>
            <input type="submit" value="Choose new Default" />
        </form>
    {% endif %}
    <form enctype="multipart/form-data" method="POST" action="">{% csrf_token %}
        <input type="file" name="avatar" value="Avatar Image" />
        <input type="submit" value="Upload New Image" />
    </form>
</div>

<script type="text/javascript" src="{{ STATIC_URL }}js/global/dropdown.js"></script>
<script type="text/javascript">
var iconrow = new dropdown({
	container:	'more-options-wrap',
	trigger:	'more-options-trigger',
	target:		'more-options-target'
});
</script>
{% endblock %}
