| 1 |
3 |
ahitrov@rambler.ru |
<style> |
| 2 |
|
|
<!-- |
| 3 |
|
|
.tab { font:9pt Verdana; padding:1px 5px 2px 5px; |
| 4 |
|
|
border-top:1px solid silver; border-left:1px solid silver; border-right:2px solid silver; } |
| 5 |
|
|
.tab a { text-decoration:none; } |
| 6 |
|
|
.tabi { font:9pt Verdana; padding:1px 5px 1px 5px; background: #d0d0d0; |
| 7 |
|
|
border-top:1px solid #f0f0f0; border-left:1px solid #f0f0f0; border-right:2px solid silver; } |
| 8 |
|
|
.tabi a { text-decoration:none; } |
| 9 |
|
|
--> |
| 10 |
|
|
</style> |
| 11 |
|
|
<script language="javascript"> |
| 12 |
|
|
<!-- |
| 13 |
|
|
var Controls = [\ |
| 14 |
|
|
% if ( ref $links eq 'ARRAY' && scalar @$links ) { |
| 15 |
|
|
% for ( 0 .. (scalar(@$links)-1) ) { |
| 16 |
|
|
% if ( $_ ) { $m->out(',') } |
| 17 |
|
|
'tab_<% $_ %>'\ |
| 18 |
|
|
% } |
| 19 |
|
|
% } |
| 20 |
|
|
]; |
| 21 |
|
|
function SetActive ( sControl ) { |
| 22 |
|
|
var oControl; |
| 23 |
|
|
for (sC in Controls) { |
| 24 |
|
|
oControl = document.getElementById(Controls[sC]); |
| 25 |
|
|
oControl.style.backgroundColor = '#d0d0d0'; |
| 26 |
|
|
oControl.style.borderTop = '1px solid #f0f0f0'; |
| 27 |
|
|
oControl.style.borderLeft = '1px solid #f0f0f0'; |
| 28 |
|
|
} |
| 29 |
|
|
oControl = document.getElementById(sControl); |
| 30 |
|
|
oControl.style.backgroundColor = 'white'; |
| 31 |
|
|
oControl.style.borderTop = '1px solid silver'; |
| 32 |
|
|
oControl.style.borderLeft = '1px solid silver'; |
| 33 |
|
|
} |
| 34 |
|
|
//--> |
| 35 |
|
|
</script> |
| 36 |
|
|
% if ( ref $links eq 'ARRAY' && scalar @$links ) { |
| 37 |
|
|
% my $deflink = $links->[0]; |
| 38 |
|
|
% my $auto = ''; |
| 39 |
|
|
% if ( exists $deflink->{auto} && ref $deflink->{auto} eq 'HASH' ) { |
| 40 |
|
|
% while ( my ($from, $to) = each %{ $deflink->{auto} } ) { |
| 41 |
|
|
% $auto .= '&from='.$from.'&to='.$document->$to; |
| 42 |
|
|
% } |
| 43 |
|
|
% } |
| 44 |
|
|
<fieldset style="width:97%;"> |
| 45 |
|
|
<legend>����������� ����� ���������</legend> |
| 46 |
|
|
<div style="border-bottom:2px solid gray; padding:1px 0 2px;"> |
| 47 |
|
|
% my $i = 0; |
| 48 |
|
|
% foreach my $link ( @$links ) { |
| 49 |
|
|
% my $auto = ''; |
| 50 |
|
|
% if ( exists $link->{auto} && ref $link->{auto} eq 'HASH' ) { |
| 51 |
|
|
% while ( my ($from, $to) = each %{ $link->{auto} } ) { |
| 52 |
|
|
% $auto .= '&from='.$from.'&to='.$document->$to; |
| 53 |
|
|
% } |
| 54 |
|
|
% } |
| 55 |
|
|
<span id="tab_<% $i %>" class="tab<% $i ? 'i' : '' %>"><a onclick="SetActive('tab_<% $i %>')" |
| 56 |
|
|
href="document_filter_list.html?class=<% $link->{class} %>&filter=<% $link->{filter} %>&field=<% $link->{field} %><% $auto %>&id=<% $document->id %><% exists $link->{order_by} ? '&order_by='.$link->{order_by} : '' %>" |
| 57 |
|
|
target="filtered"><% $link->{name} %></a></span>\ |
| 58 |
|
|
% $i++; |
| 59 |
|
|
% } |
| 60 |
|
|
</div> |
| 61 |
|
|
<iframe id="filtered" name="filtered" src="document_filter_list.html?class=<% $deflink->{class} %>&filter=<% $deflink->{filter} %>&field=<% $deflink->{field} %><% $auto %>&id=<% $document->id %><% exists $deflink->{order_by} ? '&order_by='.$deflink->{order_by} : '' %>" |
| 62 |
|
|
width="100%" height="470" frameborder="0"></iframe> |
| 63 |
|
|
</fieldset> |
| 64 |
|
|
% } |
| 65 |
|
|
<%args> |
| 66 |
|
|
|
| 67 |
|
|
$document => undef |
| 68 |
|
|
|
| 69 |
|
|
</%args> |
| 70 |
|
|
<%init> |
| 71 |
|
|
|
| 72 |
|
|
return unless ref $document; |
| 73 |
|
|
my $links = $document->table_links; |
| 74 |
|
|
|
| 75 |
|
|
</%init> |