<% 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}; % } % } % }
Удалить Документ<% $prop->{shortname} || $prop->{rusname} %>Связь
<% $doc->name %> !!!висячая связь!!!<% $link->$field %>редактировать
% if ( @$links ) {
% if ( ref $destination ) { % } else { % }
% }
<%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 $document = $destination || $source; my @props = $links->[0]->structure; @props = sort { $a->{column} <=> $b->{column} } grep { $_->{attr} ne 'class' && $_->{type} =~ /string|integer/ } grep { $_->{column} } @props;