2023-02-05 20:50:19 +01:00
|
|
|
{% import "helper.twig" as helper %}
|
|
|
|
|
2020-04-03 14:53:12 +02:00
|
|
|
<table class="table table-striped table-sm table-hover table-responsive-sm">
|
2019-08-06 18:47:09 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th></th>
|
|
|
|
<th>{% trans %}attachment.name{% endtrans %}</th>
|
|
|
|
<th>{% trans %}attachment.attachment_type{% endtrans %}</th>
|
|
|
|
<th>{% trans %}attachment.file_name{% endtrans %}</th>
|
|
|
|
<th>{% trans %}attachment.file_size{% endtrans %}</th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
|
|
|
|
{% for attachment in part.attachments %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
2022-10-09 20:49:24 +02:00
|
|
|
{% import "components/attachments.macro.html.twig" as attachments %}
|
|
|
|
{{ attachments.attachment_icon(attachment, attachment_manager) }}
|
2019-08-06 18:47:09 +02:00
|
|
|
</td>
|
|
|
|
<td class="align-middle">{{ attachment.name }}</td>
|
2019-08-26 23:30:35 +02:00
|
|
|
<td class="align-middle">{{ attachment.attachmentType.fullPath }}</td>
|
2019-08-06 18:47:09 +02:00
|
|
|
<td class="align-middle">
|
2025-02-22 17:29:14 +01:00
|
|
|
{% if attachment.hasInternal() %}
|
2019-08-10 19:16:56 +02:00
|
|
|
{{ attachment.filename }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
2020-03-30 17:09:31 +02:00
|
|
|
<td class="align-middle h6">
|
2025-02-22 17:29:14 +01:00
|
|
|
{% if not attachment.hasInternal() %}
|
2022-07-24 22:39:32 +02:00
|
|
|
<span class="badge bg-primary">
|
2025-02-22 17:29:14 +01:00
|
|
|
<i class="fas fa-fw fa-globe"></i> {% trans %}attachment.external_only{% endtrans %}
|
2020-03-30 17:09:31 +02:00
|
|
|
</span>
|
2025-02-22 17:29:14 +01:00
|
|
|
{% elseif attachment_manager.internalFileExisting(attachment) %}
|
2022-07-24 22:39:32 +02:00
|
|
|
<span class="badge bg-secondary">
|
2020-04-03 14:53:12 +02:00
|
|
|
<i class="fas fa-hdd fa-fw"></i> {{ attachment_manager.humanFileSize(attachment) }}
|
2020-03-30 17:09:31 +02:00
|
|
|
</span>
|
2019-08-06 18:47:09 +02:00
|
|
|
{% else %}
|
2022-07-24 22:39:32 +02:00
|
|
|
<span class="badge bg-warning">
|
2020-03-30 17:09:31 +02:00
|
|
|
<i class="fas fa-exclamation-circle fa-fw"></i> {% trans %}attachment.file_not_found{% endtrans %}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
{% if attachment.secure %}
|
2022-07-24 22:39:32 +02:00
|
|
|
<br><span class="badge bg-success">
|
2020-03-30 17:09:31 +02:00
|
|
|
<i class="fas fa-fw fa-shield-alt"></i> {% trans %}attachment.secure{% endtrans %}
|
|
|
|
</span>
|
2019-08-06 18:47:09 +02:00
|
|
|
{% endif %}
|
2020-04-03 14:53:12 +02:00
|
|
|
{% if attachment == part.masterPictureAttachment %}
|
|
|
|
<br>
|
2022-07-24 22:39:32 +02:00
|
|
|
<span class="badge bg-primary">
|
2020-04-03 14:53:12 +02:00
|
|
|
<i class="fas fa-id-card"></i> {% trans %}attachment.preview{% endtrans %}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
2019-08-06 18:47:09 +02:00
|
|
|
</td>
|
|
|
|
|
2019-10-13 17:34:59 +02:00
|
|
|
<td><div class="btn-group" role="group" aria-label="">
|
2025-02-22 17:29:14 +01:00
|
|
|
<a {% if attachment.hasExternal() %}href="{{ attachment.externalPath }}"{% endif %} target="_blank"
|
|
|
|
class="btn btn-secondary {% if not attachment.hasExternal() %}disabled{% endif %}"
|
|
|
|
data-turbo="false" title="{% trans with {"%host%": attachment.host} %}attachment.view_external.view_at{% endtrans %}" rel="noopener">
|
|
|
|
<i class="fas fa-globe fa-fw"></i>
|
|
|
|
</a>
|
|
|
|
<a {% if attachment_manager.isInternalFileExisting(attachment) %}href="{{ entity_url(attachment, 'file_view') }}"{% endif %} target="_blank"
|
|
|
|
class="btn btn-secondary {% if not attachment_manager.isInternalFileExisting(attachment) or (attachment.secure and not is_granted("show_private", attachment)) %}disabled{% endif %}"
|
|
|
|
data-turbo="false" title="{% trans %}attachment.view_local{% endtrans %}" rel="noopener">
|
2019-08-10 18:22:08 +02:00
|
|
|
<i class="fas fa-eye fa-fw"></i>
|
|
|
|
</a>
|
2025-02-22 17:29:14 +01:00
|
|
|
<a {% if attachment_manager.isInternalFileExisting(attachment) %}href="{{ entity_url(attachment, 'file_download') }}"{% endif %} data-turbo="false"
|
|
|
|
class="btn btn-secondary {% if not attachment_manager.isInternalFileExisting(attachment) or (attachment.secure and not is_granted("show_private", attachment)) %}disabled{% endif %}"
|
|
|
|
title="{% trans %}attachment.download_local{% endtrans %}">
|
2019-08-10 18:22:08 +02:00
|
|
|
<i class="fas fa-download fa-fw"></i>
|
|
|
|
</a>
|
2019-08-06 18:47:09 +02:00
|
|
|
|
|
|
|
<div class="btn-group" role="group">
|
2022-07-24 18:08:21 +02:00
|
|
|
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-boundary="window">
|
2019-08-06 18:47:09 +02:00
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="btnGroupDrop1">
|
|
|
|
<span class="text-muted dropdown-item-text" ><i class="fas fa-lightbulb fa-fw"></i> <b>ID:</b> {{ attachment.iD }}</span>
|
2023-02-05 20:50:19 +01:00
|
|
|
<span class="text-muted dropdown-item-text" ><i class="fas fa-history fa-fw"></i> <b>{% trans %}lastModified{% endtrans %}:</b> {{ helper.entity_last_modified(attachment) }}</span>
|
|
|
|
<span class="text-muted dropdown-item-text" ><i class="fas fa-calendar-plus fa-fw"></i> <b>{% trans %}createdAt{% endtrans %}:</b> {{ helper.entity_created_at(attachment) }}</span>
|
|
|
|
|
2019-08-06 18:47:09 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
|
|
</table>
|