1 |
3 |
ahitrov@rambler.ru |
|
2 |
|
|
<fieldset> |
3 |
|
|
<legend>��������� �������</legend> |
4 |
|
|
<table cellspacing="2" cellpadding="0" border="0" class="tform"> |
5 |
|
|
<tr><td height="3"></td></tr> |
6 |
|
|
<tr><td align="right">��������: </td><td><b><% $section->name %></b></td></tr> |
7 |
|
|
<tr><td align="right">��� ������: </td><td><b><% $section->class_name %></b></td></tr> |
8 |
|
|
% if ($section->alias) { |
9 |
|
|
<tr><td align="right">��� �����: </td><td><b><% $section->alias %></b></td></tr> |
10 |
|
|
% } |
11 |
|
|
<tr><td align="right">������: </td><td><b><% $status %></b></td></tr> |
12 |
|
|
<tr><td align="right">ID: </td><td><b><% $section->id %></b></td></tr> |
13 |
|
|
<tr><td align="right">Class: </td><td><b><% $section->class %></b></td></tr> |
14 |
|
|
<tr><td height="5"></td></tr> |
15 |
|
|
% if ($section_access == 2) { |
16 |
|
|
<tr><td colspan="2"><b><a href="section.html?id=<% $section->id %>">�������� ��������� »</a></b></td></tr> |
17 |
|
|
% } |
18 |
|
|
<tr><td height="5"></td></tr> |
19 |
|
|
</table> |
20 |
|
|
</fieldset> |
21 |
|
|
|
22 |
|
|
<%args> |
23 |
|
|
$section => undef |
24 |
|
|
</%args> |
25 |
|
|
|
26 |
|
|
<%init> |
27 |
|
|
return undef if (! ref($section)); |
28 |
|
|
my $section_access = $user->section_accesses($user, $section->id); |
29 |
|
|
|
30 |
|
|
my $prop; |
31 |
|
|
foreach ($section->structure()) { |
32 |
|
|
if ($_->{attr} eq 'status') { |
33 |
|
|
$prop = $_; |
34 |
|
|
last; |
35 |
|
|
} |
36 |
|
|
} |
37 |
|
|
my $status_map = ref $prop->{cases} eq 'ARRAY' ? $prop->{cases} : $keeper->default_status(); |
38 |
|
|
|
39 |
|
|
my $status; |
40 |
|
|
foreach (@$status_map) { |
41 |
|
|
if ($_->[0] == $section->status) { |
42 |
|
|
$status = $_->[1]; |
43 |
|
|
last; |
44 |
|
|
} |
45 |
|
|
} |
46 |
|
|
$status ||= '<font color="red">Unknown!!!</font>'; |
47 |
|
|
</%init> |