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

{% block content %}
	<h2>Gallery: {{ gallery_name }}</h2>

	<div class="gallery-edit">
		{% if user.is_authenticated %}
			<a href="{% url add_photo gallery_id %}">add photos</a>
			<a href="{% url gallery_edit_page gallery_id 0 %}">edit</a>
		{% endif %}
	</div>

	<div class="gallery-list">
		{% include "itsapp/gallery_navigation.html"%}
		<table border="0">
		{% for row in photo_ids %}
			<tr>
			{% for photo in row %}
			<td>
				


				<div class="image">
					{% if user.is_authenticated %}
						{% if edit_gallery%}
							<div class="overlay">
								<a href="{% url photo_edit gallery_id photo.id %}">
									<img src="{{ STATIC_URL }}img/icon-settings.png" alt="edit permissions" title="edit permissions" />
								</a>
								<a href="{% url photo_delete gallery_id photo.id %}">
									<img src="{{ STATIC_URL }}img/icon-delete.png" alt="delete" title="delete" />
								</a>
							</div>
						{% endif %}
					{% endif %}
					<a href="{% url show_photo gallery_id photo.id %}">
						<img  src="{% url get_thumb_data2 photo.id 200%}"/>
					</a>
				</div>
				<div class="description">
					{{photo.name}}
				</div>













			</td>
			{% endfor %}
			</tr>
		{% endfor %}
		</table>
		{% include "itsapp/gallery_navigation.html"%}
	</div>
{% endblock %}
