<& "/contenido/components/title.msn", title=>'Создание связей' &> % if (ref $document) { % ### Source 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 %>
Список связей
%#
<% Dumper(\@properties) %>
% }else{ % ### Source is not available % ###################################################### % <& /contenido/components/link_browse.msn, class => $class, source_class => $source_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 $p => 1 $restrict_class => undef $use_section => undef $alpha => undef $alpha_search => undef $search_by => undef $search => undef <%init> my $document; if ($source_id) { $document = $keeper->get_document_by_id ($source_id, class => $source_class, ); } else { $source_class = $class->available_sources; }