{% extends "itsapp/base.html" %}

{% block content %}
	<h2>Group: {{ clan.name }}</h2>
	{% if user.is_authenticated %}
		<div class="group-info">
			<img src="{% url get_avatar_data "group" clan.cover_id %}" width="100px" height="100px" class="fl" />
			<ul class="fl" >
				<li>owner: {{ clan.owner }}</li>
				{% if user == clan.owner %}
					<li><a href="{% url group_invite clan.id %}">invite users</a></li>
					<li><a href="{% url group_edit clan.id %}">edit</a></li>
				{% endif %}
			</ul>
			<div class="cb"></div>
		</div>
		<div class="members">
			<ul>
				<li>
					<img src="{% url get_avatar_data "user" clan.owner.id %}" width="20px" height="20px" title="{{ clan.owner }}" />
				</li>
				{% for member in members %}
					<li>
						<img src="{% url get_avatar_data "user" member.user.id %}" width="20px" height="20px" title="{{ member }}" />
					</li>
				{% endfor %}
			</ul>
			<div class="cb"></div>
		</div>
		<hr />
		<h2>Group's galleries</h2>
		<div class="galleries">
		{% for gallery in group_galleries %}
			{% include "itsapp/gallery_item.html"%}
		{% endfor %}
		<div class="cb"></div>
	</div>
	
	{% endif %}
{% endblock %}
