Line # Revision Author
1 8 ahitrov@rambler.ru <table border="0" width="100%">
2 <tr>
3 <td colspan="4" style="font-family:Tahoma;background-color:#dcdcdc;color:#000000;font-size:95%;padding: 5px;"><center>Настройка списков объектов</center></td>
4 </tr>
5
6 <tr>
7 <th>Идентификатор</th>
8 <th>Русское название</th>
9 <th>Начальная секция</th>
10 <th>Классы</th>
11 </tr>
12
13 % for my $obj_list (@totals)
14 % {
15
16 <tr>
17
18 <td width="15%" valign="top" style="font-size:80%; font-family:Tahoma;">
19 <% $obj_list->{attr} %>
20 </td>
21
22 <td width="20%" valign="top" style="font-size:80%; font-family:Tahoma;">
23 <% $obj_list->{rusname} %>
24 </td>
25
26 <td width="35%" valign="top">
27 <select name="<% $obj_list->{attr} %>.obj_list_root" style="width:90%;">
28 <option></option>
29 % if (exists($options->{ $obj_list->{attr} }))
30 % {
31 <& "/contenido/components/select_index_tree.msn", selected => $options->{ $obj_list->{attr} }->[0] &>
32 % } else {
33 <& "/contenido/components/select_index_tree.msn" &>
34 % }
35 </select>
36 </td>
37
38 <td>
39 %
40 % my @local_values = ();
41 % for my $class (@{ $state->{available_documents} })
42 % {
43 % push (@local_values, $class, $class);
44 % }
45 % my @local_checks = ();
46 % if (exists($options->{ $obj_list->{attr} }))
47 % {
48 % @local_checks = split(',', $options->{ $obj_list->{attr} }->[1] );
49 % }
50 %
51 <& "/contenido/components/select.msn", multiple=>1, size=>5, values=>\@local_values, width=>"90%;", name=>$obj_list->{attr}.'.obj_list_classes', check=>\@local_checks &>
52 </td>
53 </tr>
54
55 % }
56 </table>
57
58 <%ARGS>
59
60 $object => undef
61 $options => undef
62
63 </%ARGS>
64 <%INIT>
65 return if (! ref($object));
66
67 my @totals = ();
68 my @properties = $object->structure();
69 for (0..$#properties)
70 {
71 my $prop = $properties[$_];
72 if ($prop->{type} eq 'obj_list')
73 {
74 push (@totals, $prop );
75 }
76 }
77
78 return if (scalar(@totals) == 0);
79
80 </%INIT>