1 |
296 |
ahitrov |
% #<pre><% Dumper($photos) %></pre> |
2 |
|
|
<div class="photo">\ |
3 |
|
|
% for ( 1 .. ($max || $photos->{maxnumber})) { |
4 |
|
|
% my $img = $photos->{"image_$_"}; |
5 |
|
|
% my $mini = $img->{mini}->{'100x100'}; |
6 |
|
|
% if ( exists $mini->{filename} && $mini->{filename} ) { |
7 |
|
|
% my $display = $show eq 'all' ? 'inline' : $_ > $visual ? 'none' : 'inline'; |
8 |
|
|
% my $alt = $img->{alt}; |
9 |
|
|
% $alt =~ s/<[^>]+>//g; |
10 |
|
|
<span id="photo_<% $doc->id %>_<% $_ %>" style="display:<% $display %>; padding:0px 10px;"><a |
11 |
|
|
href="slide_show.html?id=<% $doc->id %>&num=<% $_ %>&class=<% $doc->class %>" |
12 |
|
|
onclick="openWin('Photo','slide_show.html?id=<% $doc->id %>&num=<% $_ %>&class=<% $doc->class %>',550,590); return false;"><img |
13 |
|
|
hspace="<% int((100 - $mini->{width})/2) %>" vspace="<% int((100 - $mini->{height})/2) %>" |
14 |
|
|
src="<% $mini->{filename} %>" width="<% $mini->{width} %>" height="<% $mini->{height} %>" border="0" title="<% $alt |h %>" alt="<% $alt |h %>" align="absmiddle"></a></span>\ |
15 |
|
|
% } |
16 |
|
|
% } |
17 |
|
|
</div> |
18 |
|
|
<%args> |
19 |
|
|
|
20 |
|
|
$doc => undef |
21 |
|
|
$show => 'all' |
22 |
|
|
$max => undef |
23 |
|
|
$visual => 7 |
24 |
|
|
|
25 |
|
|
</%args> |
26 |
|
|
<%init> |
27 |
|
|
|
28 |
|
|
return unless ref $doc; |
29 |
|
|
my $prj = $request->{project}; |
30 |
|
|
my $profile = $request->{project_profile}; |
31 |
|
|
my $root = $request->{project_section}; |
32 |
|
|
my $photos = $doc->get_image ('pictures'); |
33 |
|
|
return unless ref $photos && $photos->{maxnumber}; |
34 |
|
|
|
35 |
|
|
</%init> |