% if ( ref $favicon && exists $favicon->{filename} ) { % } % if ($state->development) { % }
% if ( ref $image ) { % my $img = $image->{"image_$num"}; % if ( exists $img->{filename} && $img->{filename} ) {
% }
<% $img->{alt} %>
% }
Фото <% $num |h %> из <% $maxnumber %>  % if ( $num > 1 ) { « предыдущая % }    % if ( $num < $maxnumber ) { следующая » % }
% if ( $doc->class eq 'promosuite::Photorep' ) {
Фоторепортаж: <% $doc->name %>
% }
<%args> $class => undef $id => undef $num => 1 <%init> my $prj = $request->{project}; my $profile = $request->{project_profile}; my $root = $request->{project_section}; my $favicon = $profile->get_image('favicon'); &abort404 unless $class && $class =~ /\w+::\w+/; &abort404 unless $id && $id =~ /^\d+$/; &abort404 unless $num && $num =~ /^\d+$/; my $doc = $keeper->get_document_by_id ( $id, class => $class, status => [1,2], ); &abort404 unless ref $doc; my $image = $doc->get_image('pictures'); my $maxnumber = $image->{maxnumber}; &abort404 if $num > $maxnumber;