2014-04-05 07:47:43 +00:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block title %}{{ photo["caption"] or "Photo" }}{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
{% macro nav_links() %}
|
|
|
|
<div class="right">
|
|
|
|
Photo {{ photo["position"] }} of {{ photo["siblings"] }}
|
|
|
|
{% if photo["siblings"] > 1 %}
|
|
|
|
|
|
|
|
[
|
|
|
|
<a href="{{ url_for('photo.view_photo', key=photo['previous']) }}">< Previous</a>
|
|
|
|
|
|
|
|
|
<a href="{{ url_for('photo.view_photo', key=photo['next']) }}">Next ></a>
|
|
|
|
]
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
<h1>Photo</h1>
|
|
|
|
|
|
|
|
<a href="{{ url_for('photo.album_index', name=photo['album']) }}">< Back to Album</a><p>
|
|
|
|
|
|
|
|
{{ nav_links() }}
|
|
|
|
|
2014-08-27 01:11:34 +00:00
|
|
|
{% if photo["caption"] %}
|
|
|
|
<h2>{{ photo["caption"] }}</h2>
|
|
|
|
{% endif %}
|
|
|
|
<a href="{{ url_for('photo.view_photo', key=photo['next']) }}">
|
|
|
|
<img src="{{ app['photo_url'] }}/{{ photo['large'] }}" class="portrait">
|
|
|
|
</a><p>
|
|
|
|
{% if photo["markdown"] %}
|
|
|
|
<div class="photo-description">{{ photo["markdown"]|safe }}</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<em>Uploaded by {{ author["name"] }} on {{ photo["pretty_time"] }}.</em>
|
2014-04-05 07:47:43 +00:00
|
|
|
|
|
|
|
{{ nav_links() }}
|
|
|
|
|
|
|
|
{% if session["login"] %}
|
|
|
|
<h1>Administrative Options</h1>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li><a href="{{ url_for('photo.upload') }}">Upload a Photo</a></li>
|
|
|
|
<li><a href="{{ url_for('photo.set_cover', album=photo['album'], key=photo['key']) }}">Set Album Cover</a></li>
|
|
|
|
<li><a href="{{ url_for('photo.set_profile', key=photo['key']) }}">Set as my Profile Picture</a></li>
|
|
|
|
<li><a href="{{ url_for('photo.edit', key=photo['key']) }}">Edit this photo</a></li>
|
2014-06-21 01:32:05 +00:00
|
|
|
<li><a href="{{ url_for('photo.crop', photo=photo['key']) }}">Change Thumbnail</a></li>
|
2014-04-05 07:47:43 +00:00
|
|
|
<li><a href="{{ url_for('photo.delete', key=photo['key']) }}">Delete this photo</a></li>
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
2014-04-07 16:44:20 +00:00
|
|
|
{{ include_page("comment.partial_index",
|
|
|
|
thread="photos-{}".format(photo["key"]),
|
|
|
|
subject="Photo Comment",
|
|
|
|
) | safe }}
|
|
|
|
|
2014-04-05 07:47:43 +00:00
|
|
|
{% endblock %}
|