Revision 296 (by ahitrov, 2013/03/26 17:59:01) Promosite (anthill) project source
% if ( $m->comp_exists ("/comps/$prj/header.msn") ) {
<& "/comps/$prj/header.msn" &>
% } else {
<& "/comps/header.msn" &>
% }


% ### контент

<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr><td width="4%"><div style="width: 10px; height: 1px"><spacer height="1" width="10" type="block"></div></td>
<td width="92%" valign="top" style="padding-top:11px;">
<div style="padding:14px 15px; width:890px;"  class="hdr"><% $section->name %></div>


% if ( ref $desc && $desc->abstr ) {
<div class="about" ><% $desc->abstr %></div>
% }


<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="98%">
% my ($wday, $wcount) = (0,0);
% foreach my $event (@$documents) {
%	my $date = Contenido::DateTime->new( postgres => $event->start );
%	my $dw = $date->wday;
%	if ($dw != $wday) {
%		if ( $wcount && !($wcount % 4) && 1==0 ) {
</td>
<td width="2%"><spacer type="block" style="width: 2%;"></td>
<td width="49%">
%		}
%		$wcount++;
%		$wday = $dw;
<div style="background:#333333;padding:10px 15px;" class="hdr"><% $date->day.' '.Encode::encode('utf-8', $date->month_name) %>, <% $wdays{$dw} %></div>
%	}
<div class="plan"><b><% $date->hour %>.<% sprintf("%02d",$date->min) %></b> <span><% $event->name %></span> <% $event->abstr %></div>
% }

<div style="background:#333333;padding:10px 15px;" class="hdr">Показы дизайнеров RFW вне основного расписания:</div>

% if ( ref $desc && $desc->body ) {
<div class="about"><% $desc->body %></div>
% }

</td>
</tr>
</table>


</td>
<td width="4%"><div style="width: 10px; height: 1px"><spacer height="1" width="10" type="block"></div></td>
</tr>
</table>

% ### Футер
% ##############################################
% if ( $m->comp_exists ("/comps/$prj/footer.msn") ) {
<& "/comps/$prj/footer.msn" &>
% } else {
<& "/comps/footer.msn" &>
% }
% ### /Футер
<%once>

	my %wdays = (
		1	=> 'понедельник',
		2	=> 'вторник',
		3	=> 'среда',
		4	=> 'четверг',
		5	=> 'пятница',
		6	=> 'суббота',
		7	=> 'воскресенье',
	);

</%once>
<%args>

        $p      => 1
        $id     => undef

</%args>
<%init>

  my $prj = $request->{project};
  my $profile = $request->{project_profile};
  my $root = $request->{project_section};
  &abort404     if $id && $id !~ /^\d+$/;

  my $documents;
  my ($section) = $keeper->get_sections (
		s	=> $root->id,
		class	=> 'promosuite::EventSection',
		limit	=> 1,
		status	=> 1,
	);
  my $desc;
  if ( ref $section ) {
	$documents = $keeper->get_documents (
		s	=> $section->id,
		class	=> 'promosuite::Event',
		status	=> 1,
		order_by	=> 'start',
		return_mode	=> 'array_ref',
        );
	($desc) = $keeper->get_documents (
		s	=> $section->id,
		class	=> 'promosuite::Article',
		status	=> 'positive',
		limit	=> 1,
        );
  }

</%init>