Revision 3 (by ahitrov@rambler.ru, 2010/03/24 15:19:32) |
The CORE
|
<& "/contenido/components/header.msn" &>
<& "/contenido/components/naviline.msn", sect=>$sect_id &>
<font face="arial" size="-1">
<blockquote>
<h4 style="margin-bottom:5px;">���������� ���������:</h4>
<blockquote style="margin-top:5px;">
<table width="70%" border="1" cellpadding="3" cellspacing="0">
<tr bgcolor="#efefef">
<td><font size="-1" face="arial"><b>�������� ���������</b></font></td>
<td><font size="-1" face="arial"><b>��� ���������</b></font></td>
<td><font size="-1" face="arial"><b>��������</b></font></td>
</tr>
% if (@documents)
% {
% foreach my $document (@documents)
% {
% my $document_access = $user->section_accesses($user, $document->section);
<tr>
<td><font face="times" size="-1"><% (!$document->status ? '<span class="hiddensect">' : '') %><% $document_access == 2 ? '<a href="document.html?id=' . $document->id . '&class='. $document->class .'">' : '' %><% $document->name %> <% $document_access == 2 ? '</a>' : '' %><% (!$document->status() ? '</span>':'') %></font></td>
<td><font face="times" size="-1"><% $document->class_name() %></font></td>
<td><font face="times" size="-1"> </font></td>
</tr>
% }
% }
% else
% {
<td align="center" colspan="3"><font face="times" size="-1">���������� ���</font></td>
% }
</table>
</blockquote>
</blockquote>
</font>
</body>
</html>
<%ARGS>
$sect_id => 1
</%ARGS>
<%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_;
}
</%INIT>