Revision 296 (by ahitrov, 2013/03/26 17:59:01) Promosite (anthill) project source
<h1><% $sec->name %></h1>
<div class="leftmenu">
<ul>
% foreach my $doc ( @$docs ) {
%	my $status = $doc->status == 1 ? 'активный' : $doc->status == 2 ? 'закончен' : $doc->status == 3 ? 'обсчитан' : 'скрытый';
%	if ( ref $active && $active->id == $doc->id ) {
<li><a href="?id=<% $doc->id %>"><b><% $doc->name %></b></a>
%	} else {
<li><a href="?id=<% $doc->id %>"><% $doc->name %></a>
%	}
(<% $status %>)
% }
</ul>
</div>
<%args>

	$docs	=> undef
	$sec	=> undef
	$active	=> undef
	$editor	=> undef

</%args>
<%init>

  return	unless ref $sec;
  $docs = $keeper->get_documents (
		s	=> $sec->id,
		class	=> 'promosuite::Voting',
		light	=> 1,
		order_by	=> 'status, dtime desc',
		return_mode	=> 'array_ref',
	);
  return	unless ref $docs eq 'ARRAY' && @$docs;

</%init>