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
8 % ### контент
9
10 <table cellspacing="0" cellpadding="0" width="100%" border="0">
11 <tr><td width="4%"><div style="width: 10px; height: 1px"><spacer height="1" width="10" type="block"></div></td>
12 <td width="92%" valign="top" style="padding-top:11px;">
13 <div style="padding:14px 15px; width:890px;" class="hdr"><% $section->name %></div>
14 % if ( ref $document && $document->html ) {
15 <div style="padding:14px 10px;"align="center">
16 %#<iframe id="player" src="<% $document->url %>" width="700" height="380" frameborder="0" scrolling="no"></iframe>
17 <% $document->html %>
18 </div>
19 %#<img src="/i/<% $prj %>/player_full.jpg" width="673" height="370">
20 % }
21
22 <div align="center" >
23 <div style="width:865px;" class="video">
24 % foreach my $doc ( @$documents ) {
25 % my $img = $doc->get_image ('picture');
26 % my $mini = $img->{mini}->{'100x100'};
27 <div style="float:left; width:120px; height:142px;">\
28 % if ( exists $mini->{filename} && $mini->{filename} ) {
29 <a href="?id=<% $doc->id %>"><img src="<% $mini->{filename} %>" width="<% $mini->{width} %>" height="<% $mini->{height} %>" border="0"></a><br>
30 <a href="?id=<% $doc->id %>"><% $doc->name %></a>
31 % }
32 </div>
33 % }
34 </div></div>
35 </td>
36 <td width="4%"><div style="width: 10px; height: 1px"><spacer height="1" width="10"
37 type="block"></div>
38 </td>
39 </tr>
40 </table>
41
42 % ### Футер
43 % ##############################################
44 % if ( $m->comp_exists ("/comps/$prj/footer.msn") ) {
45 <& "/comps/$prj/footer.msn" &>
46 % } else {
47 <& "/comps/footer.msn" &>
48 % }
49 % ### /Футер
50 <%args>
51
52 $id => undef
53
54 </%args>
55 <%init>
56
57 my $prj = $request->{project};
58 my $profile = $request->{project_profile};
59 my $root = $request->{project_section};
60 &abort404 if $id && $id !~ /^\d+$/;
61
62 my ($section) = $keeper->get_sections (
63 s => $root->id,
64 class => 'promosuite::PromoSection',
65 limit => 1,
66 status => 1,
67 );
68 my ($documents, $document);
69 if ( ref $section ) {
70 if ( $id ) {
71 $document = $keeper->get_document_by_id ($id,
72 s => $section->id,
73 class => 'promosuite::Promoblock',
74 status => 1,
75 );
76 }
77 $documents = $keeper->get_documents (
78 s => $section->id,
79 class => 'promosuite::Promoblock',
80 status => 1,
81 order => ['date', 'direct'],
82 return_mode => 'array_ref',
83 );
84 $document = shift @$documents if !$document && @$documents;
85 }
86 </%init>