<& "/contenido/components/title.msn", title=>'Создание связей' &> % if (ref $document) { % ### Destination is available % ###################################################### % % my @properties = $document->structure(); % my ($prop) = grep { $_->{'attr'} eq 'status' } @properties; % my ($status) = grep { $_->[0] == $document->status } @{ $m->comp( '/contenido/components/inputs/status.msn', prop => $prop, object=>$document, name => $prop->{attr}, mode => 'get') }; % $status = $status->[1];
Цель
Название: <% $document->name %>
Класс: <% $document->class %>
Статус: <% $status %>
Список связей
% }else{ % ### Destination is not available % ###################################################### % <& /contenido/components/link_browse.msn, class => $class, dest_class => $dest_class, p => $p, use_section => $use_section, alpha => $alpha, alpha_search => $alpha_search, search => $search, search_by => $search_by, restrict_class => $restrict_class, &> % } <%args> $class => '' $source_class => '' $source_id => '' $dest_class => '' $dest_id => '' $save => 0 $status => 0 $back => undef $p => 1 $use_section => undef $alpha => undef $alpha_search => undef $search_by => undef $search => undef $restrict_class => undef <%init> my $document; if ($dest_id) { $document = $keeper->get_document_by_id ($dest_id, class => $dest_class, ); } else { $dest_class = $class->available_destinations; }