{% load i18n %} {% load foirequest_tags %}
{% if object|can_write_foirequest:request and attachment.allow_link %} {# Link to attachment when unapproved, but write allowed and cannot redact #} {% include "foirequest/snippets/attachment_item.html" %} {% else %} {% comment %} When unapproved and user can redact and can write, disallow direct access and force to review. {% endcomment %} {{ attachment.name|truncatechars:20 }} {{ attachment.name }}   {{ attachment.size|filesizeformat }} {% endif %} {% blocktrans %}Not public!{% endblocktrans %}
{% if attachment.can_approve and object|can_write_foirequest:request %}
{% if attachment.can_redact %} {% trans "Review" %} {% endif %} {% csrf_token %}
{% endif %}