Staff members can inspect private pictures

This commit is contained in:
Alexandre Iooss 2022-01-30 12:29:27 +01:00
parent d7a39a0334
commit 696bc4d5c1
7 changed files with 49 additions and 53 deletions

View file

@ -1,3 +0,0 @@
{% extends "admin/change_list.html" %}
{% load i18n %}
{# Hide upload as zip #}

View file

@ -39,6 +39,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% endif %}
</h1>
{% if gallery.date_start %}<p class="text-muted small">{{ gallery.date_start }}{% if gallery.date_end and gallery.date_end != gallery.date_start %} {% trans "to" %} {{ gallery.date_end }}{% endif %}</p>{% endif %}
{% if not gallery.is_public %}<p><span class="badge rounded-pill bg-danger">PRIVATE</span></p>{% endif %}
{% if gallery.tags.all %}
<p class="text-muted">
Tags : {% for tag in gallery.tags.all %}

View file

@ -1,12 +1,13 @@
{% load i18n %}
<div class="card text-white bg-dark">
<div class="card text-white {% if not gallery.is_public %}bg-danger{% else %}bg-dark{% endif %}">
{% for photo in gallery.sample %}
<img src="{{ photo.get_thumbnail_url }}" class="card-img-top" alt="{{ photo.title }}">
{% endfor %}
<div class="card-body">
<h5 class="card-title">{{ gallery.title }}</h5>
{% if gallery.date_start %}<p class="card-text text-muted small mb-0">{{ gallery.date_start }}{% if gallery.date_end and gallery.date_end != gallery.date_start %} - {{ gallery.date_end }}{% endif %}</p>{% endif %}
{% if not gallery.is_public %}<p class="card-text small mb-0">(private)</p>{% endif %}
<a href="{{ gallery.get_absolute_url }}" class="stretched-link"></a>
</div>
</div>

View file

@ -2,7 +2,7 @@
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load photologue_tags i18n %}
{% load i18n %}
{% block title %}{{ object.title }}{% endblock %}