django-web-galleries/django_web_galleries/web_galleries/templates/gallery/gallery_detail.html

28 lines
1.2 KiB
HTML
Raw Permalink Normal View History

{% extends '../global.html' %}
2022-12-29 21:31:11 +01:00
{% load i18n %}
{% load responsive_images %}
{% block content %}
{% if gallery.title %}
<h1>{{gallery.title}}</h1>
{% endif %}
2022-12-29 21:31:11 +01:00
<a href="{% url 'gallery_upload' gallery_id=gallery.id %}">{% translate 'Upload image to this gallery' %}</a>
<section class="RV-Images">
<li class="RV-Images__list">
{% for image in gallery.images.all %}
<a href="{% url 'image_through_gallery' gallery_id=gallery.id image_id=image.id %}" class="RV-Image__link RV-Image__link--detail">
<img class="RV-Image__source" src="{% src image.image_file 200x200 %}">
</a>
{% endfor %}
</li>
{% if gallery.private and gallery.visitors.all|length > 0 and gallery.created_by == visitor %}
<div>
2022-12-29 21:31:11 +01:00
<h2>{% translate 'You have gained access to the following people' %}</h2>
{% for visitor in gallery.visitors.all %}
2022-12-29 21:31:11 +01:00
{{visitor.name}} <a href="{% url 'gallery_revoke_access' gallery_id=gallery.id visitor_id=visitor.id %}">{% translate 'Revoke access' %}</a>
{% endfor %}
</div>
{% endif %}
</section>
{% endblock content %}