1 |
296 |
ahitrov |
% if ( $doc->html ) { |
2 |
|
|
% my $html = $doc->html; |
3 |
|
|
% $html =~ s/<%\ +\$prj\ +%>/$prj/gi; |
4 |
|
|
<% $html %> |
5 |
|
|
% }else{ |
6 |
|
|
% ### Некоторая стандартная верстка промоблока |
7 |
|
|
% ############################################ |
8 |
|
|
% my $img = $doc->get_image ('picture'); |
9 |
|
|
% my $href = $doc->url; |
10 |
|
|
% my $target; |
11 |
|
|
% if ( $href && $href =~ /^http:/ ) { |
12 |
|
|
% $href = 'http://www.rambler.ru/click?from=market_'.$prj.'&_URL='.$href; |
13 |
|
|
% $target = ' target="_blank"'; |
14 |
|
|
% } |
15 |
|
|
% my ($a1, $a2) = $href ? ('<a href="'.$href.'"'.$target.'>','</a>') : ('',''); |
16 |
|
|
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="infoblock"> |
17 |
|
|
<tr> |
18 |
|
|
<td class="cc" width="100%"> |
19 |
|
|
<h1><% $doc->name %></h1> |
20 |
|
|
<div class="promocontent"> |
21 |
|
|
<% $a1 %>\ |
22 |
|
|
% if ( ref $img && exists $img->{filename} ) { |
23 |
|
|
<center><img src="<% $img->{filename} %>" width="<% $img->{width} %>" height="<% $img->{height} %>" alt="<% $img->{alt} %>" border="0" class="imageBorder"><br></center> |
24 |
|
|
% } |
25 |
|
|
<& /inc/text_format.msn, doc => $doc, field => 'abstr' &> |
26 |
|
|
<% $a2 %> |
27 |
|
|
</div> |
28 |
|
|
</td> |
29 |
|
|
</tr> |
30 |
|
|
</table> |
31 |
|
|
% ### /Некоторая стандартная верстка промоблока |
32 |
|
|
% } |
33 |
|
|
<%args> |
34 |
|
|
|
35 |
|
|
$doc => undef |
36 |
|
|
|
37 |
|
|
</%args> |
38 |
|
|
<%init> |
39 |
|
|
|
40 |
|
|
return unless ref $doc; |
41 |
|
|
my $prj = $request->{project}; |
42 |
|
|
|
43 |
|
|
</%init> |