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"><a href="./designers.html"><% $section->name %></a></div>

% if ( $id && ref $document ) {

%	if ( $m->comp_exists ("/comps/$prj/article.msn") ) {
<& "/comps/$prj/article.msn", doc => $document, show_header => 1 &>
<div style="padding:10px 0px 10px 15px" class="txt"><a href="javascript:history.back(1)"><span class="link-b">Вернуться к списку коллекций</span></a></div>
%	} else {
<& "/comps/article.msn", doc => $document, show_header => 1, show_dtime => 1 &>

%	}

% }
%
% if ( ref $documents && @$documents ) {
%
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top"><td width="49%">
%	my $i = 0;
%	foreach my $doc ( @$documents ) {
%		if ( $i++ == int((scalar @$documents)/2) ) {
</td>
<td width="2%"><spacer type="block" style="width: 20%;"></td>
<td width="49%">
%		}
<div class="dsrs"><b><% $i %>.</b> <a href="?id=<% $doc->id %>"><% $doc->name %></a></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" &>
% }
% ### /Футер
<%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 ($document, $documents);
  my ($section) = $keeper->get_sections (
		s	=> $root->id,
		class	=> 'promosuite::AnnoSection',
		limit	=> 1,
		status	=> 1,
	);
  if ( $id && ref $section ) {
	$document = $keeper->get_document_by_id ($id,
		s	=> $section->id,
		class	=> 'promosuite::Anons',
		status	=> 1,
        );
  } elsif ( ref $section ) {
	$documents = $keeper->get_documents (
		s	=> $section->id,
		class	=> 'promosuite::Anons',
		status	=> 1,
		order_by	=> 'name',
		return_mode	=> 'array_ref',
        );

  }

</%init>