% if ( $m->comp_exists ("/comps/$prj/header.msn") ) { <& "/comps/$prj/header.msn", alias => 'main' &> % } else { <& "/comps/header.msn", alias => 'main' &> % }
% if ( $m->comp_exists ("/comps/$prj/left.msn") ) { <& "/comps/$prj/left.msn", place => $place, id => (ref $document ? $document->id : undef) &> % } DIATON tonometer % if ( ref $document ) {

<% $document->name %>

% if ( $document->author ) {

by <% $document->author %>

% }
% if ( $document->body_html ) { <% $document->body_html %> % } else { <% $document->body %> % }
% if ( $document->source ) { % my ($a1, $a2) = $document->url ? ('','') : ('','');

<% $a1.$document->source.$a2 %>

% } % }
% ### Футер % ############################################## % if ( $m->comp_exists ("/comps/$prj/footer.msn") ) { <& "/comps/$prj/footer.msn" &> % } else { <& "/comps/footer.msn" &> % } % ### /Футер <%args> $document => undef $id => undef <%init> &abort404 unless ref $document || ( $id && $id =~ /^\d+$/ ); my $prj = $request->{project}; my $profile = $request->{project_profile}; my $root = $request->{project_section}; $document = $keeper->get_document_by_id ($id, class => 'promosuite::Article', status => 'positive', ) if !ref $document && $id; &abort404 unless ref $document; my @secs = $document->sections; &abort404 unless @secs; my $place; unless ( $secs[0] == $root->id ) { my $parent = $keeper->get_section_by_id( $secs[0] ); &abort404 unless ref $parent; $place = $parent->alias; &abort404 if $parent->pid != $root->id; }