Line # Revision Author
1 296 ahitrov % if ( $m->comp_exists ("/comps/$prj/header.msn") ) {
2 <& "/comps/$prj/header.msn" &>
3 % } else {
4 <& "/comps/header.msn" &>
5 % }
6
7 <table border="0" cellspacing="0" cellpadding="10" width="100%">
8 <tr valign="top">
9 <td width="80%">
10 %
11 % if ( $id && ref $document ) {
12 <table border="0" cellspacing="0" cellpadding="0" width="100%" class="infoblock" style="z-index:1" >
13 <tr>
14 <td class="cc" width="100%">
15
16 <div class="text">
17 % ### Текст новости
18 % #######################################################
19 % if ( $m->comp_exists ("/comps/$prj/article.msn") ) {
20 <& "/comps/$prj/article.msn", document => $document &>
21 % } else {
22 <& "/comps/article.msn", document => $document &>
23 % }
24 </div>
25 </td>
26 </tr>
27 </table>
28 <div class="mt10"></div>
29 %
30 % } ### /Одна Новость
31 %
32 % ### Список новостей
33 % #######################################################
34 % if ( ref $section ) {
35 <table border="0" cellspacing="0" cellpadding="0" width="100%">
36 <tr valign="top"><td class="infoblock">
37 <table border="0" cellspacing="0" cellpadding="10" width="100%" >
38 <tr valign="top">
39 <td>
40 % if ( $m->comp_exists ("/comps/$prj/news_list.msn") ) {
41 <& "/comps/$prj/news_list.msn", id => $id, p => $p, size => $profile->news_count || 10 &>
42 % } else {
43 <& "/comps/news_list.msn", id => $id, p => $p, size => $profile->news_count || 10 &>
44 % }
45 </td>
46 </tr>
47 </table>
48 </td>
49 </tr>
50 </table>
51 % }
52
53 </td>
54
55 % ### Правая колонка
56 % ###############################################
57 <td width="20%">
58 % if ( $m->comp_exists ("/comps/$prj/right.msn") ) {
59 <& "/comps/$prj/right.msn", nonews => 1 &>
60 % }else{
61 <& /comps/right.msn, nonews => 1 &>
62 % }
63 </td>
64 % ### /Правая колонка
65
66 </tr>
67 </table>
68
69 % ### Футер
70 % ##############################################
71 % if ( $m->comp_exists ("/comps/$prj/footer.msn") ) {
72 <& "/comps/$prj/footer.msn" &>
73 % } else {
74 <& "/comps/footer.msn" &>
75 % }
76 % ### /Футер
77 <%args>
78
79 $p => 1
80 $id => undef
81
82 </%args>
83 <%init>
84
85 my $prj = $request->{project};
86 my $profile = $request->{project_profile};
87 my $root = $request->{project_section};
88 &abort404 if $id && $id !~ /^\d+$/;
89
90 my $document;
91 my ($section) = $keeper->get_sections (
92 s => $root->id,
93 class => 'promosuite::NewsSection',
94 limit => 1,
95 status => 1,
96 );
97 if ( $id && ref $section ) {
98 $document = $keeper->get_document_by_id ($id,
99 s => $section->id,
100 # class => 'promosuite::Article',
101 class => 'promosuite::News',
102 status => [1,2],
103 );
104 }
105 </%init>