Revision 8 (by ahitrov@rambler.ru, 2010/03/29 11:46:38) Contenido UTF-8 core files
<table border="0" width="100%">
<tr>
<td colspan="4" style="font-family:Tahoma;background-color:#dcdcdc;color:#000000;font-size:95%;padding: 5px;"><center>Настройка списков объектов</center></td>
</tr>

<tr>
<th>Идентификатор</th>
<th>Русское название</th>
<th>Начальная секция</th>
<th>Классы</th>
</tr>

%	for my $obj_list (@totals)
%	{

<tr>

<td width="15%" valign="top" style="font-size:80%; font-family:Tahoma;">
<% $obj_list->{attr} %>
</td>

<td width="20%" valign="top" style="font-size:80%; font-family:Tahoma;">
<% $obj_list->{rusname} %>
</td>

<td width="35%" valign="top">
<select name="<% $obj_list->{attr} %>.obj_list_root" style="width:90%;">
<option></option>
%	if (exists($options->{ $obj_list->{attr} }))
%	{
<& "/contenido/components/select_index_tree.msn", selected => $options->{ $obj_list->{attr} }->[0] &>
%	} else {
<& "/contenido/components/select_index_tree.msn" &>
%	}
</select>
</td>

<td>
%
%	my @local_values = ();
%	for my $class (@{ $state->{available_documents} })
%	{
%		push (@local_values, $class, $class);
%	}
%	my @local_checks = ();
%	if (exists($options->{ $obj_list->{attr} }))
%	{
%		@local_checks = split(',', $options->{ $obj_list->{attr} }->[1] );
%	}
%
<& "/contenido/components/select.msn", multiple=>1, size=>5, values=>\@local_values, width=>"90%;", name=>$obj_list->{attr}.'.obj_list_classes', check=>\@local_checks &>
</td>
</tr>

%	}
</table>

<%ARGS>

	$object => undef
	$options => undef

</%ARGS>
<%INIT>
	return		if (! ref($object));

	my @totals = ();
	my @properties = $object->structure();
	for (0..$#properties)
	{
		my $prop = $properties[$_];
		if ($prop->{type} eq 'obj_list')
		{
			push (@totals, $prop );
		}
	}

	return		if (scalar(@totals) == 0);

</%INIT>