Line # Revision Author
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", place => $place, id => (ref $document ? $document->id : undef) &>
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 % if ( ref $document ) {
22 <h2><% $document->name %></h2>
23
24 % if ( $document->author ) {
25 <p class="quot">by <% $document->author %></p>
26 % }
27
28 <div class="contacts">
29 % if ( $document->body_html ) {
30 <% $document->body_html %>
31 % } else {
32 <% $document->body %>
33 % }
34 </div>
35 % if ( $document->source ) {
36 % my ($a1, $a2) = $document->url ? ('<a href="'.$document->url.'" target="_blank">','</a>') : ('','');
37 <p class="copy"><% $a1.$document->source.$a2 %></p>
38 % }
39 % }
40
41
42 <!--/Information-->
43 </td></tr>
44 </table>
45
46
47
48 % ### Футер
49 % ##############################################
50 % if ( $m->comp_exists ("/comps/$prj/footer.msn") ) {
51 <& "/comps/$prj/footer.msn" &>
52 % } else {
53 <& "/comps/footer.msn" &>
54 % }
55 % ### /Футер
56 <%args>
57
58 $document => undef
59 $id => undef
60
61 </%args>
62 <%init>
63
64 &abort404 unless ref $document || ( $id && $id =~ /^\d+$/ );
65
66 my $prj = $request->{project};
67 my $profile = $request->{project_profile};
68 my $root = $request->{project_section};
69
70 $document = $keeper->get_document_by_id ($id,
71 class => 'promosuite::Article',
72 status => 'positive',
73 ) if !ref $document && $id;
74 &abort404 unless ref $document;
75 my @secs = $document->sections;
76 &abort404 unless @secs;
77 my $place;
78 unless ( $secs[0] == $root->id ) {
79 my $parent = $keeper->get_section_by_id( $secs[0] );
80 &abort404 unless ref $parent;
81 $place = $parent->alias;
82 &abort404 if $parent->pid != $root->id;
83 }
84
85 </%init>