List Images and Galleries, Access restrictions
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{% extends '../global.html' %}
|
||||
|
||||
{% load responsive_images %}
|
||||
|
||||
{% block content %}
|
||||
{% if gallery.title %}
|
||||
<h1>{{gallery.title}}</h1>
|
||||
{% endif %}
|
||||
<section class="RV-Images">
|
||||
<li class="RV-Images__list">
|
||||
{% for image in gallery.images.all %}
|
||||
<a href="{% url 'image' pk=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>
|
||||
<h2>You have gained access to the following people</h2>
|
||||
{% for visitor in gallery.visitors.all %}
|
||||
{{visitor.name}} <a href="{% url 'gallery_revoke_access' gallery_id=gallery.id visitor_id=visitor.id %}">Revoke access</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock content %}
|
Reference in New Issue
Block a user