mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-09 01:44:31 +02:00
Improved image and attachment viewing on part info page
This commit is contained in:
parent
1de1eebc59
commit
fc7e436ca9
3 changed files with 12 additions and 3 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue