mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-21 01:29:33 +00:00
Added a link to view external version from attachment edit
This commit is contained in:
parent
ae5dfbfc52
commit
41ae9b5f75
3 changed files with 21 additions and 2 deletions
|
|
@ -152,9 +152,10 @@
|
|||
</button>
|
||||
|
||||
{% set attach = form.vars.value %}
|
||||
{# @var \App\Entity\Attachments\Attachment attach #}
|
||||
|
||||
{% if attach is not null %}
|
||||
{% if not attach.hasInternal() %}
|
||||
{% if not attach.hasInternal() and attach.external %}
|
||||
<div class="mt-2">
|
||||
<span class="badge bg-primary">
|
||||
<i class="fas fa-fw fa-globe"></i> {% trans %}attachment.external_only{% endtrans %}
|
||||
|
|
@ -194,7 +195,13 @@
|
|||
<i class="fas fa-exclamation-circle fa-fw"></i> {% trans %}attachment.file_not_found{% endtrans %}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if attach.external %}
|
||||
<div>
|
||||
<a href="{{ attach.externalPath }}" rel="noopener" target="_blank" data-turbo="false" class="link-external"
|
||||
title="{% trans with {"%host%": attach.host} %}attachment.view_external.view_at{% endtrans %}">{% trans %}attachment.view_external{% endtrans %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue