1 |
296 |
ahitrov |
<h1><% $sec->name %></h1> |
2 |
|
|
<div class="leftmenu"> |
3 |
|
|
<ul> |
4 |
|
|
% foreach my $doc ( @$docs ) { |
5 |
|
|
% my $status = $doc->status == 1 ? 'активный' : $doc->status == 2 ? 'закончен' : $doc->status == 3 ? 'обсчитан' : 'скрытый'; |
6 |
|
|
% if ( ref $active && $active->id == $doc->id ) { |
7 |
|
|
<li><a href="?id=<% $doc->id %>"><b><% $doc->name %></b></a> |
8 |
|
|
% } else { |
9 |
|
|
<li><a href="?id=<% $doc->id %>"><% $doc->name %></a> |
10 |
|
|
% } |
11 |
|
|
(<% $status %>) |
12 |
|
|
% } |
13 |
|
|
</ul> |
14 |
|
|
</div> |
15 |
|
|
<%args> |
16 |
|
|
|
17 |
|
|
$docs => undef |
18 |
|
|
$sec => undef |
19 |
|
|
$active => undef |
20 |
|
|
$editor => undef |
21 |
|
|
|
22 |
|
|
</%args> |
23 |
|
|
<%init> |
24 |
|
|
|
25 |
|
|
return unless ref $sec; |
26 |
|
|
$docs = $keeper->get_documents ( |
27 |
|
|
s => $sec->id, |
28 |
|
|
class => 'promosuite::Voting', |
29 |
|
|
light => 1, |
30 |
|
|
order_by => 'status, dtime desc', |
31 |
|
|
return_mode => 'array_ref', |
32 |
|
|
); |
33 |
|
|
return unless ref $docs eq 'ARRAY' && @$docs; |
34 |
|
|
|
35 |
|
|
</%init> |