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", alias => 'main' &>
% } else {
<& "/comps/header.msn", alias => 'main' &>
% }


<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td style="padding:0 32px 0 18px;" width="1%" nowrap>
<!--Menus-->
% if ( $m->comp_exists ("/comps/$prj/left.msn") ) {
<& "/comps/$prj/left.msn" &>
% }
<!--/Menus-->
</td>

<td width="1%"><img src="/i/<% $prj %>/diaton_device.png" width="84" height="334" alt="DIATON tonometer"></td>
<td style="padding:0 30px 20px;" width="98%">
<!--Information-->
<h2><% $section->name %></h2>

% foreach my $doc (@documents ) {
%	my $logo = $doc->get_image('logo');
%	if ( $doc->country && $doc->country ne $country ) {
%		$country = $doc->country;
<h4 class="text"><% $doc->country %>:</h4>
%	}
%	if ( $doc->type ) { 
<p class="text"><% $doc->type %></p>
%	}
%	if ( ref $logo && exists $logo->{filename} ) {
%		my $mini = $logo->{mini}{'100x100'};
<img src="<% $mini->{filename} %>" width="<% $mini->{width} %>" height="<% $mini->{height} %>" vspace="6" hspace="5" align="left">
%	}
<p class="text"><b><% $doc->name %></b><br>
%	if ( $doc->address ) {
<& /inc/text_format.msn, doc => $doc, field => 'address' &><br>
%	}
%	if ( $doc->phone ) {
%		my @data = split /,\s*/, $doc->phone;
Tel: <% $data[0] %><br>
%		if ( scalar @data > 1 ) {
%			for ( 1..$#data ) {
&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;<% $data[$_] %><br>
%			}
%		}
%	}
%	if ( $doc->phonefax ) {
%		my @data = split /,\s*/, $doc->phonefax;
Tel/Fax: <% $data[0] %><br>
%		if ( scalar @data > 1 ) {
%			for ( 1..$#data ) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<% $data[$_] %><br>
%			}
%		}
%	}
%	if ( $doc->fax ) {
%		my @data = split /,\s*/, $doc->fax;
Fax: <% $data[0] %><br>
%		if ( scalar @data > 1 ) {
%			for ( 1..$#data ) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <% $data[$_] %><br>
%			}
%		}
%	}
%	if ( $doc->email ) {
%		my @data = split /,\s*/, $doc->email;
E-mail: <a href="mailto:<% $data[0] %>"><% $data[0] %></a><br>
%		if ( scalar @data > 1 ) {
%			for ( 1..$#data ) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:<% $data[$_] %>"><% $data[$_] %></a><br>
%			}
%		}
%	}
</p>
% }


<!--/Information-->
</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 @documents;
  my ($section) = $keeper->get_sections (
		s	=> $root->id,
		class	=> 'promosuite::AnnoSection',
		limit	=> 1,
		status	=> 1,
	);
  if ( ref $section ) {
	@documents = $keeper->get_documents (
		s	=> $section->id,
		class	=> 'promosuite::Company',
		status	=> [1,2],
		order_by	=> 'status desc, country, name',
	);
  }
  my $country = '';

</%init>