1 |
296 |
ahitrov |
% if ( $m->comp_exists ("/comps/$prj/header_rambler.msn") ) { |
2 |
|
|
<& "/comps/$prj/header_rambler.msn", alias => 'main' &> |
3 |
|
|
% } else { |
4 |
|
|
<& "/comps/header_rambler.msn", alias => 'main' &> |
5 |
|
|
% } |
6 |
|
|
|
7 |
|
|
<table class="r--main"> |
8 |
|
|
<tr> |
9 |
|
|
%#<td class="dev--left-10"><div class="dev--left-10"><!-- --></div></td> |
10 |
|
|
<td class="dev--left-menu r--vtop"> |
11 |
|
|
<div class="dev--left-menu"><!-- --></div> |
12 |
|
|
<div class="r--normal"> |
13 |
|
|
% ### Левая колонка |
14 |
|
|
% ############################################### |
15 |
|
|
|
16 |
|
|
% if ( $m->comp_exists ("/comps/$prj/right.msn") ) { |
17 |
|
|
<& "/comps/$prj/right.msn", active => $document, sec => $section, docs => $documents &> |
18 |
|
|
% }else{ |
19 |
|
|
<& /comps/right.msn, active => $document, sec => $section, docs => $documents &> |
20 |
|
|
% } |
21 |
|
|
% ### /Левая колонка |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
</div> |
25 |
|
|
<br> |
26 |
|
|
|
27 |
|
|
</td> |
28 |
|
|
<td class="dev--left-25"><div class="dev--left-25"><!-- --></div></td> |
29 |
|
|
<td class="r--vtop r--normal"> |
30 |
|
|
|
31 |
|
|
% if ( ref $document ) { |
32 |
|
|
|
33 |
|
|
<div class="nekot"> |
34 |
|
|
<div class="verh"><div class="ug1"><div class="ug2"></div></div></div> |
35 |
|
|
<div class="zheludokkota"> |
36 |
|
|
|
37 |
|
|
<a href="./result.txt?id=<% $document->id %>">Лог опроса</a> |
38 |
|
|
<% spacer(h=>20) %> |
39 |
|
|
<& "/comps/$prj/results/voting.msn", voting => $document &> |
40 |
|
|
|
41 |
|
|
</div> |
42 |
|
|
<div class="niz"><div class="ug1"><div class="ug2"></div></div></div> |
43 |
|
|
</div> |
44 |
|
|
|
45 |
|
|
% } else { |
46 |
|
|
% } |
47 |
|
|
|
48 |
|
|
|
49 |
|
|
<div class="dev--content"><!-- --></div> |
50 |
|
|
</td> |
51 |
|
|
</tr> |
52 |
|
|
</table> |
53 |
|
|
|
54 |
|
|
% ### Футер |
55 |
|
|
% ############################################## |
56 |
|
|
% if ( $m->comp_exists ("/comps/$prj/footer_rambler.msn") ) { |
57 |
|
|
<& "/comps/$prj/footer_rambler.msn" &> |
58 |
|
|
% } else { |
59 |
|
|
<& "/comps/footer_rambler.msn" &> |
60 |
|
|
% } |
61 |
|
|
% ### /Футер |
62 |
|
|
<%args> |
63 |
|
|
|
64 |
|
|
$p => 1 |
65 |
|
|
$id => undef |
66 |
|
|
$voted => undef |
67 |
|
|
|
68 |
|
|
</%args> |
69 |
|
|
<%init> |
70 |
|
|
|
71 |
|
|
my $prj = $request->{project}; |
72 |
|
|
my $profile = $request->{project_profile}; |
73 |
|
|
my $root = $request->{project_section}; |
74 |
|
|
&abort404 if $id && $id !~ /^\d+$/; |
75 |
|
|
|
76 |
|
|
my ($document, $documents); |
77 |
|
|
my ($section) = $keeper->get_sections ( |
78 |
|
|
s => $root->id, |
79 |
|
|
class => 'promosuite::VotingSection', |
80 |
|
|
limit => 1, |
81 |
|
|
status => 1, |
82 |
|
|
); |
83 |
|
|
if ( $id && ref $section ) { |
84 |
|
|
$document = $keeper->get_document_by_id ($id, |
85 |
|
|
s => $section->id, |
86 |
|
|
class => 'promosuite::Voting', |
87 |
|
|
status => 1, |
88 |
|
|
); |
89 |
|
|
} elsif ( ref $section ) { |
90 |
|
|
$documents = $keeper->get_documents ( |
91 |
|
|
s => $section->id, |
92 |
|
|
class => 'promosuite::Voting', |
93 |
|
|
status => 'positive', |
94 |
|
|
order_by => 'dtime desc', |
95 |
|
|
return_mode => 'array_ref', |
96 |
|
|
); |
97 |
|
|
$document = shift @$documents if ref $documents eq 'ARRAY' && @$documents; |
98 |
|
|
} |
99 |
|
|
|
100 |
|
|
|
101 |
|
|
</%init> |