{% extends "gallery/photo_list.html" %}
{% load i18n comments %}

{% block title %} {{ photo.name }} - {{ photo.event.name }} {% endblock %}

{% block opengraph %}
<meta property="og:type" content="photo" />
<meta property="og:title" content="{{photo.name}} - Foto" />
<meta property="og:url" content="http://www.kasu.at{{photo.get_absolute_url}}" />
<meta property="og:image" content="http://www.kasu.at{{photo.thumbnail.url}}" />
{% if photo.description %}<meta property="og:description" content="{{photo.description}}" />{% endif %} 
{% endblock %}

{% block maincontent %}
  <h2 class="grid_12"><a href="{% url 'event-photo-list' photo.event.id %}">{{photo.event.name}}</a> &raquo; {{ photo.name }}</h2>
  <div id="display" class="grid_12 clearfix">
   <img src="{{photo.display.url}}" alt="{{photo.name}}" title="{{photo.name}}"/>
   {% if photo.previous_photo %}
    <a href="{{ photo.previous_photo.get_absolute_url }}" class="previous">{% trans 'previous' %}</a>
   {% endif %}
   {% if photo.next_photo %}
    <a href="{{ photo.next_photo.get_absolute_url }}" class="next">Next</a>
   {% endif %}
  </div>
    <p class="grid_10 push_1">{{ photo.description }}</p>
  <div class="grid_12 more_link">
    <a href="https://m.google.com/app/plus/x/?v=compose&amp;content={{photo.headline|urlencode}}+-+http%3A%2F%2Fwww.kasu.at/{{photo.get_absolute_url|urlencode}}" target="_blank"><img src="{{STATIC_URL}}img/google_plus.png" alt="Google+" title="{% trans 'Share on Google+'%}" /></a>
    <a href="https://twitter.com/share?url=http%3A%2F%2Fwww.kasu.at/{{photo.get_absolute_url|urlencode}}" target='_blank'><img src="{{STATIC_URL}}img/twitter.png" alt="Twitter" title="{% trans 'Share on Twitter' %}" /></a>
    <a href="http://facebook.com/sharer.php?u=http%3A%2F%2Fwww.kasu.at{{photo.get_absolute_url|urlencode}}" target="_blank"><img src="{{STATIC_URL}}img/facebook.png" alt="Facebook" title="{% trans 'Share on Facebook'%}" /></a>
  </div>

<ul class="info grid_12">
 	<li class="user"><strong>{% trans 'Photographer' %}: </strong>{{ photo.photographer }}</li>
 	<li class="date"><strong>{% trans 'on' %}</strong> {{ photo.created_date }}</li>
</ul>
{% endblock %}

{% block comment %}
  {% render_comment_list for photo %}
  {% render_comment_form for photo %}
{% endblock %}

{% block buttonbar %}
{% if perms.events.change_photo %}
    <form method="post" enctype="multipart/form-data" class="grid_12">
    {% csrf_token %}
      <p class="buttonbar">
 	  	<a href="{{ photo.image.url }}" class="button" type="application/octet-stream"><img src="{{ STATIC_URL}}icons/drive_go.png" alt="{% trans 'download' %}" title="{% trans 'download' %}" /></a>
 		<button type="submit" name="rotate" value="counter-clockwise"><img src="{{STATIC_URL}}icons/shape_rotate_anticlockwise.png" title="Gegen den Uhrzeiger drehen"></button>
 		<button type="submit" name="rotate" value="clockwise"><img src="{{STATIC_URL}}icons/shape_rotate_clockwise.png" title="Im Uhrzeiger drehen"></button>
 		<button type="submit"><img src="{{STATIC_URL}}icons/disk.png" alt=""> {% trans "save" %}</button>
	  </p>
    </form>
{% endif %}
{% endblock %}


