diff --git a/src/Services/Attachments/PartPreviewGenerator.php b/src/Services/Attachments/PartPreviewGenerator.php index a9273586..8fe1c72c 100644 --- a/src/Services/Attachments/PartPreviewGenerator.php +++ b/src/Services/Attachments/PartPreviewGenerator.php @@ -58,6 +58,14 @@ class PartPreviewGenerator $list[] = $attachment; } + //Then comes the other images of the part + foreach ($part->getAttachments() as $attachment) { + //Dont show the master attachment twice + if ($this->isAttachmentValidPicture($attachment) && $attachment !== $part->getMasterPictureAttachment()) { + $list[] = $attachment; + } + } + if ($part->getFootprint() instanceof Footprint) { $attachment = $part->getFootprint()->getMasterPictureAttachment(); if ($this->isAttachmentValidPicture($attachment)) { diff --git a/templates/components/attachments.macro.html.twig b/templates/components/attachments.macro.html.twig index 4ee0b304..d7daf2ee 100644 --- a/templates/components/attachments.macro.html.twig +++ b/templates/components/attachments.macro.html.twig @@ -19,14 +19,15 @@ {% endmacro %} -{% macro attachment_icon(attachment, attachment_helper, class = "fa-fw fas fa-3x hoverpic", link = true) %} +{% macro attachment_icon(attachment, attachment_helper, class = "fa-fw fas fa-2x hoverpic", link = true) %} + {# @var App\Entity\Attachments\Attachment attachment #} {% set disabled = attachment.secure and not is_granted("show_private", attachment) %} {% if not attachment_helper or attachment_helper.fileExisting(attachment) %} {% if link and not disabled %} {% endif %} {% if attachment.picture %} - + {% else %} {% endif %} diff --git a/templates/parts/info/_picture.html.twig b/templates/parts/info/_picture.html.twig index af91773d..b532f9b9 100644 --- a/templates/parts/info/_picture.html.twig +++ b/templates/parts/info/_picture.html.twig @@ -15,7 +15,7 @@