% if ( $m->comp_exists ("/comps/$prj/header_rambler.msn") ) { <& "/comps/$prj/header_rambler.msn", alias => 'main' &> % } else { <& "/comps/header_rambler.msn", alias => 'main' &> % } %#
% ### Левая колонка % ############################################### % if ( $m->comp_exists ("/comps/$prj/right.msn") ) { <& "/comps/$prj/right.msn", active => $document, sec => $section, docs => $documents &> % }else{ <& /comps/right.msn, active => $document, sec => $section, docs => $documents &> % } % ### /Левая колонка

% if ( ref $document ) {
Лог опроса <% spacer(h=>20) %> <& "/comps/$prj/results/voting.msn", voting => $document &>
% } else { % }
% ### Футер % ############################################## % if ( $m->comp_exists ("/comps/$prj/footer_rambler.msn") ) { <& "/comps/$prj/footer_rambler.msn" &> % } else { <& "/comps/footer_rambler.msn" &> % } % ### /Футер <%args> $p => 1 $id => undef $voted => undef <%init> my $prj = $request->{project}; my $profile = $request->{project_profile}; my $root = $request->{project_section}; &abort404 if $id && $id !~ /^\d+$/; my ($document, $documents); my ($section) = $keeper->get_sections ( s => $root->id, class => 'promosuite::VotingSection', limit => 1, status => 1, ); if ( $id && ref $section ) { $document = $keeper->get_document_by_id ($id, s => $section->id, class => 'promosuite::Voting', status => 1, ); } elsif ( ref $section ) { $documents = $keeper->get_documents ( s => $section->id, class => 'promosuite::Voting', status => 'positive', order_by => 'dtime desc', return_mode => 'array_ref', ); $document = shift @$documents if ref $documents eq 'ARRAY' && @$documents; }