Revision 25
- Date:
- 2010/05/27 14:59:46
- Files:
Legend:
- Added
- Removed
- Modified
-
koi8/core/comps/contenido/components/document_links_list.msn
4 4 <tr> 5 5 <th>�������</th> 6 6 <th>��������</th> 7 % if ( @props ) { 8 % foreach my $prop ( @props ) { 9 <th><% $prop->{shortname} || $prop->{rusname} %></th> 10 % } 11 % } 7 12 <th>�����</th> 8 13 </tr> 9 14 % my $i = 0; … … 12 17 <tr bgcolor="<% $i++ % 2 ? 'white' : '#f0f0f0' %>"> 13 18 % if ( ref $doc ) { 14 19 % my $style = $link->status ? '' : ' color:#606060;'; 15 <td><input type="checkbox" name="links" value="link_<% $link->id %>_<% $doc->id %>_<% $link->class %>"></td> 20 <td style="width:40px; text-align:center;"><input type="checkbox" name="links" value="link_<% $link->id %>_<% $doc->id %>_<% $link->class %>"></td> 16 21 <td><a href="document.html?class=<% $doc->class %>&id=<% $doc->id %>" target="_blank" style="<% $style %>"><% $doc->name %></a></td> 17 22 % } else { 18 23 <td><input type="checkbox" name="links" value="link_<% $link->id %>_<% ref $destination ? $link->source_id : $link->dest_id %>_<% $link->class %>"></td> 19 <td><% ref $doc ? $doc->name : '!!!������� �����!!!' %></td> 24 <td>!!!������� �����!!!</td> 20 25 % } 26 % if ( @props ) { 27 % foreach my $prop ( @props ) { 28 % my $field = $prop->{attr}; 29 <td><% $link->$field %></td> 30 % } 31 % } 21 32 <td><a href="link.html?class=<% $link->class %>&id=<% $link->id %>" target="_blank">�������������</a></td> 22 33 </tr> 23 34 % } … … 49 60 return unless ref $links eq 'ARRAY' && @$links; 50 61 51 62 my $document = $destination || $source; 63 my @props = $links->[0]->structure; 64 @props = sort { $a->{column} <=> $b->{column} } grep { $_->{attr} ne 'class' && $_->{type} =~ /string|integer/ } grep { $_->{column} } @props; 52 65 53 66 </%init>