1 |
3 |
ahitrov@rambler.ru |
<html> |
2 |
|
|
<style> |
3 |
|
|
body, td { font-size:85%; } |
4 |
|
|
</style> |
5 |
|
|
<body text="#000000" link="#0000FF" vlink="#0000FF" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> |
6 |
|
|
% if ($id) |
7 |
|
|
% { |
8 |
|
|
[<a href="objects_view.html?classes=<% $classes %>" style="color:#000000;">root</a>] /\ |
9 |
|
|
% my $node_id = $keeper->get_section_by_id( $id ); |
10 |
|
|
% my @path = $node_id->trace(); |
11 |
|
|
% my ($cur) = splice( @path, -1 ); |
12 |
|
|
% my $node_cur = $keeper->get_section_by_id( $cur ); |
13 |
|
|
% map { |
14 |
|
|
% my $child = $keeper->get_section_by_id ($_); |
15 |
|
|
% $m->out( '<a href="objects_view.html?classes='.$classes.'&id='.$child->id.'" title="'.$child->name.'" style="color:#000000;">..</a> /' ) |
16 |
|
|
% } @path; |
17 |
|
|
<% $node_cur->name %>: |
18 |
|
|
% } else { |
19 |
|
|
<b>[root]</b> |
20 |
|
|
% } |
21 |
|
|
<table width="98%" border="0" cellspacing="0" cellpadding="0"> |
22 |
|
|
<tr><td height="2"><form name="form"></td></tr> |
23 |
|
|
% foreach my $kid (@kids) |
24 |
|
|
% { |
25 |
|
|
% my $child = $keeper->get_section_by_id($kid); |
26 |
|
|
<tr valign="top"><td width="10"> </td><td><a href="objects_view.html?classes=<% $classes %>&id=<% $child->id %>"><% $child->name %></a></td></tr> |
27 |
|
|
% } |
28 |
|
|
% foreach my $object (@objects) |
29 |
|
|
% { |
30 |
|
|
% my $obj_name_escaped = $object->name; |
31 |
|
|
% $obj_name_escaped =~ s/"/"/g; |
32 |
|
|
<tr valign="top"><td width="10"><input type="checkbox" name="<% $object->id %>" value="<% $obj_name_escaped %>"> </td><td><b><% $object->name %></b></td></tr> |
33 |
|
|
% } |
34 |
|
|
<tr><td height="6"></td></tr> |
35 |
|
|
</table> |
36 |
|
|
</form> |
37 |
|
|
|
38 |
|
|
</body> |
39 |
|
|
</html> |
40 |
|
|
|
41 |
|
|
<%args> |
42 |
|
|
|
43 |
|
|
$id => 0 |
44 |
|
|
$classes => undef |
45 |
|
|
|
46 |
|
|
</%args> |
47 |
|
|
<%init> |
48 |
|
|
|
49 |
|
|
warn "$id -> $classes\n"; |
50 |
|
|
|
51 |
|
|
use vars qw($keeper); |
52 |
|
|
my $node = $keeper->get_section_by_id( $id || $Contenido::Section::ROOT || 1 ); |
53 |
|
|
my @kids = $node->childs(); |
54 |
|
|
|
55 |
|
|
my %opts = ( |
56 |
|
|
's' => $id || $Contenido::Section::ROOT || 1, |
57 |
|
|
'order' => ['date','direct'], |
58 |
|
|
); |
59 |
|
|
if (length($classes) > 0) |
60 |
|
|
{ |
61 |
|
|
$opts{class} = $classes; |
62 |
|
|
} |
63 |
|
|
my @objects = $keeper->get_documents(%opts); |
64 |
|
|
|
65 |
|
|
</%init> |