Show attachment preview also in part edit page.

This commit is contained in:
Jan Böhmer 2019-10-04 18:11:16 +02:00
parent f53cc08f52
commit 1b28006267
3 changed files with 11 additions and 2 deletions

View file

@ -356,8 +356,9 @@ btn-xs
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.thumbnail-sm {
height: 100px;
max-height: 100px;
}
img.img-attachement {

View file

@ -42,7 +42,7 @@
{% endif %}
{% if attach.picture %}
<a href="{{ attach | entityURL('file_view') }}" target="_blank" data-no-ajax>
<img class="img-fluid img-thumbnail" src="{{ attach | entityURL('file_view') }}" alt="{% trans %}attachment.preview.alt{% endtrans %}" />
<img class="img-fluid img-thumbnail thumbnail-sm" src="{{ attach | entityURL('file_view') }}" alt="{% trans %}attachment.preview.alt{% endtrans %}" />
</a>
{% else %}
<a href="{{ attach | entityURL('file_view') }}" target="_blank" data-no-ajax class="link-external">{% trans %}attachment.view{% endtrans %}</a>

View file

@ -39,6 +39,14 @@
</span>
</h6>
{% endif %}
{% if attach.picture %}
<a href="{{ attach | entityURL('file_view') }}" target="_blank" data-no-ajax>
<img class="img-fluid img-thumbnail thumbnail-sm" src="{{ attach | entityURL('file_view') }}" alt="{% trans %}attachment.preview.alt{% endtrans %}" />
</a>
{% else %}
<a href="{{ attach | entityURL('file_view') }}" target="_blank" data-no-ajax class="link-external">{% trans %}attachment.view{% endtrans %}</a>
{% endif %}
{% else %}
<br><br>
<h6>