{% extends theme("management/management_layout.html") %} {% set page_title = _("Attachments") %} {% set active = "management.attachments" %} {% block breadcrumb %} {% endblock %} {% block management_content %} {%- from theme('_macros/pagination.html') import render_pagination -%} {%- from theme('_macros/form.html') import render_input_field, action_confirm, bulk_action -%}
{% trans %}Attachments{% endtrans %}
{% if current_user|is_admin %} {{ action_confirm( id="cleanup-attachments", url=url_for('management.cleanup_attachments'), title=_("Cleanup"), icon="fas fa-broom", btn="btn btn-warning btn-xs", icon_only=False ) }} {{ action_confirm( id="purge-attachments", url=url_for('management.purge_attachments'), title=_("Purge all"), icon="far fa-trash-alt", btn="btn btn-danger btn-xs", icon_only=False ) }} {% endif %}
{% trans %}File{% endtrans %}
{% trans %}Uploader{% endtrans %}
{% trans %}Topic{% endtrans %}
{% trans %}Date{% endtrans %}
{% for attachment in attachments.items %}
{{ attachment.original_filename|truncate(32, killwords=True, leeway=0) }} {% if attachment.id in missing %} {% trans %}file missing{% endtrans %} {% endif %}
{{ attachment.content_type }}, {{ attachment.size|filesizeformat }}
{% if attachment.user %} {{ attachment.user.username }} {% else %} {% trans %}Guest{% endtrans %} {% endif %}
{{ attachment.date_created|format_date }}
{{ action_confirm( id="delete-" ~ attachment.id, url=url_for('management.delete_attachment', attachment_id=attachment.id), title=_("Delete"), icon="far fa-trash-alt text-danger" ) }}
{% else %}
{% trans %}No attachments found.{% endtrans %}
{% endfor %}
{% include theme("_partials/confirm_dialog.html") %} {% endblock %}