Revision 296 (by ahitrov, 2013/03/26 17:59:01) |
Promosite (anthill) project source
|
% if ( $m->comp_exists ("/comps/$prj/header.msn") ) {
<& "/comps/$prj/header.msn", alias => 'main' &>
% } else {
<& "/comps/header.msn", alias => 'main' &>
% }
<table border="0" cellspacing="0" cellpadding="10" width="100%">
<tr valign="top">
<td width="80%">
%
% ### Аннотация проекта
% ############################################################
% if ( $p == 1 && !ref $document ) {
% if ( $m->comp_exists ("/comps/$prj/block_project_anno.msn") ) {
<& "/comps/$prj/block_project_anno.msn" &>
% } else {
<& "/comps/block_project_anno.msn" &>
% }
% }
% ### /Аннотация проекта
%
<div class="mt10"></div>
<a name="members"></a>
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="infoblock">
<tr>
<td class="cc" width="100%">
% if ( $id && ref $document ) {
% ### Один участник
% #######################################################
% if ( $m->comp_exists ("/comps/$prj/announce.msn") ) {
<& "/comps/$prj/announce.msn", document => $document &>
% } else {
<& "/comps/announce.msn", document => $document &>
% }
%
% }else{
% ### Список участников
% #######################################################
% if ( ref $section ) {
<div class="text">
<h2><% $section->name %></h2>
% if ( $m->comp_exists ("/comps/$prj/announce_list.msn") ) {
<& "/comps/$prj/announce_list.msn", section => $section, p => $p, size => $profile->anno_count &>
% } else {
<& "/comps/announce_list.msn", p => $p, size => $profile->anno_count &>
% }
</div>
% }
% } ### /Область участников
</td></tr>
</table>
</td>
% ### Правая колонка
% ###############################################
<td width="20%">
% if ( $m->comp_exists ("/comps/$prj/right.msn") ) {
<& "/comps/$prj/right.msn" &>
% }else{
<& /comps/right.msn &>
% }
</td>
% ### /Правая колонка
</tr>
</table>
% ### Футер
% ##############################################
% if ( $m->comp_exists ("/comps/$prj/footer.msn") ) {
<& "/comps/$prj/footer.msn" &>
% } else {
<& "/comps/footer.msn" &>
% }
% ### /Футер
<%args>
$p => 1
$id => undef
</%args>
<%init>
my $prj = $request->{project};
my $profile = $request->{project_profile};
my $root = $request->{project_section};
&abort404 if $id && $id !~ /^\d+$/;
my $document;
my ($section) = $keeper->get_sections (
s => $root->id,
class => 'promosuite::AnnoSection',
limit => 1,
status => 1,
);
if ( $id && ref $section ) {
$document = $keeper->get_document_by_id ($id,
s => $section->id,
class => 'promosuite::Anons',
status => 1,
);
}
</%init>