mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-04 10:14:44 +02:00
59 lines
No EOL
3 KiB
Twig
59 lines
No EOL
3 KiB
Twig
<table class="table table-striped table-hover">
|
|
<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>
|
|
{% if attachment_helper.fileExisting(attachment) %}
|
|
<i class="fas fa-file fa-3x"></i>
|
|
{% else %}
|
|
<i class="fas fa-exclamation-triangle fa-3x text-danger"></i>
|
|
{% endif %}
|
|
</td>
|
|
<td class="align-middle">{{ attachment.name }}</td>
|
|
<td class="align-middle">{{ attachment.type.fullPath }}</td>
|
|
<td class="align-middle">{{ attachment.filename }}</td>
|
|
<td class="align-middle">
|
|
{% if attachment_helper.fileExisting(attachment) %}
|
|
{{ attachment_helper.humanFileSize(attachment) }}
|
|
{% else %}
|
|
<b class="text-danger">{% trans %}attachment.file_not_found{% endtrans %}</b>
|
|
{% endif %}
|
|
</td>
|
|
|
|
<td><div class="btn-group" role="group" aria-label="Button group with nested dropdown">
|
|
<button type="button" class="btn btn-secondary" title="{% trans %}attachment.view{% endtrans %}"><i class="fas fa-eye fa-fw"></i></button>
|
|
<button type="button" class="btn btn-secondary" title="{% trans %}attachment.download{% endtrans %}"><i class="fas fa-download fa-fw"></i></button>
|
|
|
|
<div class="btn-group" role="group">
|
|
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-boundary="window">
|
|
</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>
|
|
<span class="text-muted dropdown-item-text" ><i class="fas fa-calendar fa-fw"></i> <b>{% trans %}createdAt{% endtrans %}:</b> {{ attachment.addedDate | localizeddate("short")}}</span>
|
|
<span class="text-muted dropdown-item-text" ><i class="fas fa-history fa-fw"></i> <b>{% trans %}createdAt{% endtrans %}:</b> {{ attachment.addedDate | localizeddate("short")}}</span>
|
|
<div class="dropdown-divider"></div>
|
|
<a class="dropdown-item" href="#">{% trans %}attachment.edit{% endtrans %}</a>
|
|
<a class="dropdown-item" href="#">{% trans %}attachment.delete{% endtrans %}</a>
|
|
</div>
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table> |