<& "/contenido/components/header.msn" &> <& "/contenido/components/naviline.msn", sect=>$sect_id &>

Отобранные документы:

% if (@documents) % { % foreach my $document (@documents) % { % my $document_access = $user->section_accesses($user, $document->section); % } % } % else % { % }
Название документа Тип документа Действия
<% (!$document->status ? '' : '') %><% $document_access == 2 ? '' : '' %><% $document->name %> <% $document_access == 2 ? '' : '' %><% (!$document->status() ? '':'') %> <% $document->class_name() %>  
ДОКУМЕНТОВ НЕТ
<%ARGS> $sect_id => 1 <%INIT> my $from = $ARGS{'from_year'}.'-'.sprintf("%02d", $ARGS{'from_month'}).'-'.sprintf("%02d",$ARGS{'from_day'}); my $to = $ARGS{'to_year'}.'-'.sprintf("%02d", $ARGS{'to_month'}).'-'.sprintf("%02d",$ARGS{'to_day'}); my $filter = $m->comp('/contenido/components/context.msn', name => 'filter'); my %opts = ( s => $sect_id, include_parent => 1, date => [$from, $to], ); $opts{class} = $ARGS{class} if (length($ARGS{class}) > 0); $opts{status} = $ARGS{status} if ($ARGS{status} != 9999); $opts{dive} = 1 if ($ARGS{dive} > 0); my @documents_ = $keeper->get_documents(%opts); my @documents = (); if ($filter > 0) { for my $doc (@documents_) { my $ok = 0; map { if ($_ == $filter) { $ok = 1 } } ( $doc->sections() ); if ($ok) { push (@documents, $doc); } } } else { @documents = @documents_; }