Added a link to view external version from attachment edit

This commit is contained in:
Jan Böhmer 2025-02-22 17:15:37 +01:00
parent ae5dfbfc52
commit 41ae9b5f75
3 changed files with 21 additions and 2 deletions

View file

@ -58,7 +58,7 @@
<td><div class="btn-group" role="group" aria-label="">
<a {% if attachment.hasExternal() %}href="{{ attachment.externalPath }}"{% endif %} target="_blank"
class="btn btn-secondary {% if not attachment.hasExternal() %}disabled{% endif %}"
data-turbo="false" title="View at {{ attachment.host }}" rel="noopener"> {# TODO: translate #}
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"