rophako/rophako/modules/photo/templates/photos/view.html

57 lines
1.9 KiB
HTML
Raw Normal View History

{% 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 %}
&nbsp;&nbsp;&nbsp;
[
<a href="{{ url_for('photo.view_photo', key=photo['previous']) }}">&lt; Previous</a>
|
<a href="{{ url_for('photo.view_photo', key=photo['next']) }}">Next &gt;</a>
]
{% endif %}
</div>
{% endmacro %}
<h1>Photo</h1>
<a href="{{ url_for('photo.album_index', name=photo['album']) }}">&lt; Back to Album</a><p>
{{ nav_links() }}
{% 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>
{{ 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>
<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 }}
{% endblock %}