Revision 296 (by ahitrov, 2013/03/26 17:59:01) |
Promosite (anthill) project source
|
% #<pre><% Dumper($max) %></pre>
<div class="photo">\
% foreach my $photos (@$photo) {
% my $img = $photos->get_image ('picture');
% my $mini = $img->{mini}->{'100x100'};
% if ( exists $mini->{filename} && $mini->{filename} ) {
% my $display = $show eq 'all' ? 'inline' : $_ > $visual ? 'none' : 'inline';
% my $alt = $img->{alt};
% $alt =~ s/<[^>]+>//g;
<span id="photo_<% $doc->id %>_<% $_ %>" style="display:<% $display %>; padding:0px 10px;"><a
href="video.html?id=<% $photos->id %>"><img hspace="<% int((100 - $mini->{width})/2) %>" vspace="<% int((100 - $mini->{height})/2) %>" src="<% $mini->{filename} %>" width="<% $mini->{width} %>" height="<% $mini->{height} %>" border="0" title="<% $alt |h %>" alt="<% $alt |h %>" align="absmiddle"
></a></span>\
% last if $i == $visual;
% $i++;
% }
% }
</div>
<%args>
$doc => undef
$show => 'all'
$max => undef
$visual => 7
</%args>
<%init>
return unless ref $doc;
my $prj = $request->{project};
my $profile = $request->{project_profile};
my $root = $request->{project_section};
my $photo = $keeper->get_documents (
s => $doc->id,
class => 'promosuite::Promoblock',
status => 1,
order => ['date', 'direct'],
return_mode => 'array_ref',
);
my $i = 0;
</%init>