sub renderThumbnails { my $this = shift; #writeDebug("renderThumbnails()"); if (!@{$this->{images}}) { return renderError($this->{warn}); } my $maxCols = $this->{columns}; my $result = "
\n"; my $imageNr = 0; my @rowOfImages = (); my $skip = $this->{skip}; foreach my $image (@{$this->{images}}) { $this->computeImageSize($image); $skip--; next if $skip >= 0; last if $this->{limit} && $imageNr >= $this->{limit}; if ($this->{doThumbTitles}) { push @rowOfImages, $image; } if ($imageNr % $maxCols == 0) { $result .=""; } $result .= "\n"; if (!$this->createImg($image, 1)) { return renderError($this->{errorMsg}); } $imageNr++; if ($imageNr % $maxCols == 0) { $result .= "\n"; if ($this->{doThumbTitles}) { $result .= $this->renderTitleRow(\@rowOfImages); @rowOfImages = (); } } } if ($imageNr % $maxCols != 0) { while ($imageNr % $maxCols != 0) { $result .= "\n"; $imageNr++; } $result .= "\n"; if ($this->{doThumbTitles}) { $result .= $this->renderTitleRow(\@rowOfImages); } } $result .= "
{IGP_web}, $image->{IGP_topic}) . "?id=$this->{id}&filename=$image->{name}#igp$this->{id}\">" . "{imagesPubUrl}/thumb_$image->{name}" . (($image->{name} =~ /\.svgz?$/ )?'.png':'') . "\" title=\"$image->{IGP_comment}\" alt=\"$image->{name}\"/>
 
\n"; return $result; }