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

{% block content %}
	{% if user.is_authenticated %}
		<h2>My groups</h2>
		<div class="galleries">
			<div class="groups">
			{% for group in myclans %}
				{% include "itsapp/group_item.html"%}
			{% endfor %}
			</div>
			<div class="cb"></div>
		</div>

		<h2>Shared groups</h2>
		<div class="galleries">
			<div class="groups">
			{% for group in sharedclans %}
				<div class="gallery">
					<div class="image">
						<a href="{% url group_detail group.clan.id %}">
							<img  src="{% url get_thumb_data2 group.clan.cover_id "200"%}"/>
						</a>
					</div>
					<div class="title">
						<a href="{% url group_detail group.clan.id %}">
							{{ group.clan.name }}
						</a>
					</div>
					<a class="owner" href="{% url user_page group.clan.owner.id %}">{{group.clan.owner.username}}</a>
				</div>
			{% endfor %}
			</div>
			<div class="cb"></div>
		</div>

	{% else %}
		<a href="/login">login</a>
	{% endif %}
{% endblock %}
