Связанные объекты % foreach my $class ( @{$state->{tag}->tag_destinations} ) { % next unless exists $objects{$class}; % my %props = map { $_->{attr} => $_ } grep { $_->{attr} eq 'id' || $_->{attr} eq 'name' || $_->{attr} eq 'status' || exists $_->{column} && $_->{column} } $class->new( $keeper )->structure;

<% $class->class_name %> <% $class %>

<%doc> % if ( exists $props{status} ) { % } % foreach my $object ( @{$objects{$class}} ) { % my $style = $object->contenido_status_style || ( exists $props{status} && $props{status} == 0 ? 'color:gray;' : '' ); <%doc> % if ( exists $props{status} ) { % my $prop = $props{status}; % my $status_map = exists $prop->{cases} && ref $prop->{cases} eq 'ARRAY' ? $prop->{cases} : $keeper->default_status(); % my %cases = map { $_->[0] => $_->[1] } @$status_map; % } % } % } <%args> $tag => undef <%init> return unless ref $tag; my %objects; my $found = 0; foreach my $class ( @{$state->{tag}->tag_destinations} ) { my $objects = $tag->get_objects( class => $class ); if ( ref $objects eq 'ARRAY' && @$objects ) { $objects{$class} = $objects; $found = 1; } }
id НазваниеСтатус
><% $object->id %> ><% $object->name %><% exists $cases{$object->status} ? $cases{$object->status}.' ('.$object->status.')' : 'н/с ('.$object->status.')' %>