1 |
296 |
ahitrov |
% if ( $m->comp_exists ("/comps/$prj/header.msn") ) { |
2 |
|
|
<& "/comps/$prj/header.msn", alias => 'main' &> |
3 |
|
|
% } else { |
4 |
|
|
<& "/comps/header.msn", alias => 'main' &> |
5 |
|
|
% } |
6 |
|
|
|
7 |
|
|
|
8 |
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0"> |
9 |
|
|
<tr valign="top"><td style="padding:0 32px 0 18px;" width="1%" nowrap> |
10 |
|
|
<!--Menus--> |
11 |
|
|
% if ( $m->comp_exists ("/comps/$prj/left.msn") ) { |
12 |
|
|
<& "/comps/$prj/left.msn" &> |
13 |
|
|
% } |
14 |
|
|
<!--/Menus--> |
15 |
|
|
</td> |
16 |
|
|
|
17 |
|
|
<td width="1%"><img src="/i/<% $prj %>/diaton_device.png" width="84" height="334" alt="DIATON tonometer"></td> |
18 |
|
|
<td style="padding:0 30px 20px;" width="98%"> |
19 |
|
|
<!--Information--> |
20 |
|
|
|
21 |
|
|
|
22 |
|
|
% ### Список новостей |
23 |
|
|
% ####################################################### |
24 |
|
|
% if ( ref $document ) { |
25 |
|
|
% my $dt = Contenido::DateTime->new( postgres => $document->dtime ); |
26 |
|
|
<h2><a href="./news.html" style="text-decoration:underline;">news</a></h2> |
27 |
|
|
<h3><% $document->name %> |
28 |
|
|
<span style="padding-left:25px; color:gray; font-size:10px; font-weight:normal;"> <% $dt->dmy('.') %></span> |
29 |
|
|
</h3> |
30 |
|
|
<p><& /inc/text_format.msn, doc => $document &></p> |
31 |
|
|
% if ( @files ) { |
32 |
|
|
<ul> |
33 |
|
|
% foreach my $file ( @files ) { |
34 |
|
|
<li><a href="<% $file->{filename} %>" title="<% $file->{alt} %>"><% $file->{alt} || $file->{filename} %></a></li> |
35 |
|
|
% } |
36 |
|
|
</ul> |
37 |
|
|
% } |
38 |
|
|
% } elsif ( ref $section ) { |
39 |
|
|
% if ( $m->comp_exists ("/comps/$prj/news_list.msn") ) { |
40 |
|
|
<& "/comps/$prj/news_list.msn", id => $id, p => $p, size => $profile->news_count || 10, section => $section &> |
41 |
|
|
% } else { |
42 |
|
|
<& "/comps/news_list.msn", id => $id, p => $p, size => $profile->news_count || 10 &> |
43 |
|
|
% } |
44 |
|
|
% } |
45 |
|
|
|
46 |
|
|
|
47 |
|
|
<!--/Information--> |
48 |
|
|
</td></tr> |
49 |
|
|
</table> |
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
% ### Футер |
54 |
|
|
% ############################################## |
55 |
|
|
% if ( $m->comp_exists ("/comps/$prj/footer.msn") ) { |
56 |
|
|
<& "/comps/$prj/footer.msn" &> |
57 |
|
|
% } else { |
58 |
|
|
<& "/comps/footer.msn" &> |
59 |
|
|
% } |
60 |
|
|
% ### /Футер |
61 |
|
|
<%args> |
62 |
|
|
|
63 |
|
|
$p => 1 |
64 |
|
|
$id => undef |
65 |
|
|
|
66 |
|
|
</%args> |
67 |
|
|
<%init> |
68 |
|
|
|
69 |
|
|
my $prj = $request->{project}; |
70 |
|
|
my $profile = $request->{project_profile}; |
71 |
|
|
my $root = $request->{project_section}; |
72 |
|
|
&abort404 if $id && $id !~ /^\d+$/; |
73 |
|
|
|
74 |
|
|
my $document; |
75 |
|
|
my ($section) = $keeper->get_sections ( |
76 |
|
|
s => $root->id, |
77 |
|
|
class => 'promosuite::NewsSection', |
78 |
|
|
limit => 1, |
79 |
|
|
status => 1, |
80 |
|
|
); |
81 |
|
|
if ( $id && ref $section ) { |
82 |
|
|
$document = $keeper->get_document_by_id ($id, |
83 |
|
|
s => $section->id, |
84 |
|
|
class => 'promosuite::News', |
85 |
|
|
status => 'positive', |
86 |
|
|
); |
87 |
|
|
} |
88 |
|
|
my @files; |
89 |
|
|
if ( ref $document ) { |
90 |
|
|
foreach my $fname ( qw( file1 file2 ) ) { |
91 |
|
|
my $file = $document->get_image($fname); |
92 |
|
|
if ( ref $file && exists $file->{filename} ) { |
93 |
|
|
push @files, $file; |
94 |
|
|
} |
95 |
|
|
} |
96 |
|
|
} |
97 |
|
|
|
98 |
|
|
</%init> |