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

62 lines
2.1 KiB
HTML
Raw Normal View History

{% extends "layout.html" %}
{% block title %}{{ album }}{% endblock %}
{% block content %}
<h1>Album: {{ album }}</h1>
{% if album_info["description"] %}
<div class="photo-description">{{ markdown|safe }}</div><p>
{% endif %}
{% if album_info["format"] == "vertical" %}
{% for photo in photos %}
{% set data = photo["data"] %}
{% if data["caption"] %}
<h2>{{ data["caption"] }}</h2>
{% endif %}
<a href="{{ url_for('photo.view_photo', key=photo['key']) }}">
<img src="{{ app['photo_url'] }}/{{ data['large'] }}" class="portrait">
</a><p>
{% if data["description"] %}
<div class="photo-description">{{ data["markdown"]|safe }}</div>
{% endif %}
{% if loop.index < photos|length %}<hr>{% endif %}
{% endfor %}
{% else %}{# classic layout #}
<ul class="photo-grid">
{% for photo in photos %}
<li class="portrait">
<div class="dummy"></div>
<div class="photo-grid-item">
<a href="{{ url_for('photo.view_photo', key=photo['key']) }}">
<img src="{{ app['photo_url'] }}/{{ photo['data']['thumb'] }}" width="100%" height="100%">
<span class="name">{{ photo["data"]["caption"] }}</span>
</a>
</div>
</li>
{% endfor %}
</ul>
<div class="clear"></div>
{% endif %}
{% if session["login"] %}
<h1>Administrative Options</h1>
<ul>
<li><a href="{{ url_for('photo.upload') }}">Upload a Photo</a></li>
{% if photos|length > 0 %}
<li><a href="{{ url_for('photo.edit_album', album=album) }}">Edit Album Settings</a></li>
<li><a href="{{ url_for('photo.bulk_captions', album=album) }}">Edit Image Titles/Descriptions</a></li>
<li><a href="{{ url_for('photo.arrange_photos', album=album) }}">Rearrange Photos</a></li>
<li><a href="{{ url_for('photo.delete_album', album=album) }}">Delete Album</a></li>
{% endif %}
</ul>
{% endif %}
{% endblock %}