<% $section->name %>
% if ( ref $document ) { % my ($a1, $a2) = $document->url ? ('','') : ('',''); % my $img = $document->get_image('icon'); % if ( ref $img && exists $img->{filename} ) {

% } % my $dtime = Contenido::DateTime::new ( postgres => $document->dtime );

<% sprintf("%02d.%02d %02d:%02d",$dtime->day,$dtime->month,$dtime->hour,$dtime->min) %> | % if ( $document->source ) { <% $a1.$document->source.$a2 %> % }
% }
% foreach my $doc ( @$documents ) { % my $dtime = Contenido::DateTime::new ( postgres => $doc->dtime );
<% sprintf("%02d.%02d",$dtime->day,$dtime->month) %> <% sprintf("%02d:%02d",$dtime->hour,$dtime->min) %> <% $doc->name %>
% }
<%init> my $prj = $request->{project}; my $profile = $request->{project_profile}; my $root = $request->{project_section}; my ($section) = $keeper->get_sections ( s => $root->id, class => 'promosuite::NewsSection', limit => 1, status => 1, ); my ($document) = $keeper->get_documents ( s => $section->id, # class => 'promosuite::Article', class => 'promosuite::News', status => 2, order => ['date', 'direct'], ); my $documents = $keeper->get_documents ( s => $section->id, # class => 'promosuite::Article', class => 'promosuite::News', status => [1,2], order => ['date', 'direct'], limit => 3, ref $document ? (excludes => [$document->id]) : (), return_mode => 'array_ref', ); unless ( ref $document ) { $document = shift @$documents if @$documents; }