<% spacer(h=>5) %>
% if ( @props ) { % foreach my $prop ( @props ) { % } % } % my $i = 0; % foreach my $link ( @$links ) { % my $doc = ref $destination ? $docs->{$link->source_id} : $docs->{$link->dest_id}; % if ( ref $doc ) { % my $style = $link->status ? '' : ' color:#606060;'; % } else { % } % if ( @props ) { % foreach my $prop ( @props ) { % my $field = $prop->{attr}; % if ( exists $prop->{inline} ) { % $inline_status = 1; % if ( $prop->{type} =~ /^(string|integer|float)$/ ) { % } elsif ($prop->{type} eq 'checkbox') { % my $checked = $link->$field ? ' checked' : ''; % } % } % } % }
Удалить Документ<% $prop->{shortname} || $prop->{rusname} %>Связь
<% $doc->name %> !!!висячая связь!!!> % } elsif ($prop->{type} eq 'select') { % my $options = {}; % if ($toopi && (ref($toopi) eq 'HASH') && (exists($toopi->{$link->class}))) { % %{ $options } = %{ $toopi->{$link->class} }; % } % my $values = $options->{$prop->{attr}}; % } elsif ($prop->{type} eq 'status') { % my $cases = $prop->{cases}; % if ( ref $cases eq 'ARRAY' ) { % } % } % } else { <% $link->$field %>редактировать % if ( $inline_status ) { % }
% if ( @$links ) {
% if ( ref $destination ) { % } else { % } % if ( $inline_status ) { % }
% }
<%args> $links => undef $docs => undef $destination => undef $source => undef <%init> return if !ref $destination && !ref $source; return unless ref $docs; return unless ref $links eq 'ARRAY' && @$links; my $inline_status = 0; my $document = $destination || $source; my @props = $links->[0]->structure; @props = sort { $a->{column} <=> $b->{column} } grep { $_->{attr} ne 'class' && $_->{type} =~ /string|integer/ } grep { $_->{column} } @props; my $toopi = $project->links();