mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 01:34:34 +02:00
Allow to select the master picture attachment.
This commit is contained in:
parent
fe9526e0eb
commit
e2b643c52b
5 changed files with 47 additions and 6 deletions
|
@ -5,6 +5,7 @@
|
|||
</button>
|
||||
{% endset %}
|
||||
|
||||
{{ form_row(form.master_picture_attachment) }}
|
||||
|
||||
<table class="table table-striped table-sm" id="attachments_table" data-prototype="{{ form_widget(form.attachments.vars.prototype)|e('html_attr') }}">
|
||||
<tbody>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{% if part.masterPictureAttachement %}
|
||||
<img src="{{ part.masterPictureAttachement | entityURL('file_view') }}" class="img-fluid img-thumbnail bg-light" alt="Part main image" height="300" width="300">
|
||||
{% if part.masterPictureAttachment and part.masterPictureAttachment.picture %}
|
||||
<img src="{{ part.masterPictureAttachment | entityURL('file_view') }}" class="img-fluid img-thumbnail bg-light" alt="Part main image" height="300" width="300">
|
||||
{% else %}
|
||||
<img src="{{ asset('img/part_placeholder.svg') }}" class="img-fluid img-thumbnail bg-light" alt="Part main image" height="300" width="300">
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue