Отбор документов
Выберите тип:
<& "/contenido/components/select.msn", name=>'class', values => $classes, start => '', style=>'width:100%;font-size:8pt;', onChange => 'ch(this.selectedIndex);' &>
Выберите статус:
<& "/contenido/components/select.msn", name=>'status', values => $states, start => '', style=>'width:100%;font-size:8pt;' &>
По дате:
<& "/contenido/components/inputs/date.msn", name => 'from' &>
<& "/contenido/components/inputs/date.msn", name => 'to' &>
Включая подразделы
<%once> use locale; %once> <%args> $sect_id => 1 $id => undef %args> <%init> use vars qw($state $project $keeper $request); if ($id > 0) { $sect_id = $id; } my ($DATA, @ST_IDS, @ST_NAMES); my @default_status = (); if (ref($keeper->default_status())) { @default_status = @{$keeper->default_status()}; } unshift @default_status, ['9999', '--- Любой ---']; push @$DATA, { id => '', name => '--- Любой ---', states => \@default_status }; foreach my $class (@ { $state->{available_documents} }) { my $object = $class->new($keeper); my @properties = $object->structure(); my @states = @{$keeper->default_status()}; foreach my $attr (@properties) { if ( ($attr->{attr} eq 'status') and ($attr->{type} eq 'status') ) { @states = @{$attr->{cases}} if (exists($attr->{cases}) and (ref($attr->{cases}) eq 'ARRAY')); } } unshift @states, ['9999', '--- Любой ---']; push (@$DATA, {id => $class, name => "".$object->class_name()." ($class)", states => \@states}); } my $classes; foreach my $C (sort {$a->{name} cmp $b->{name}} @$DATA) { push @$classes, $C->{id}, $C->{name}; my @st_ids; my @st_names; foreach my $st (@{$C->{states}}) { push @st_ids, $st->[0]; push @st_names, $st->[1]; } push @ST_IDS, join('|', @st_ids); push @ST_NAMES, join('|', @st_names); } my $states; foreach my $S (sort {$a->[1] cmp $b->[1]} @default_status) { push @$states, $S->[0], $S->[1]; } %init>