| 1 |
296 |
ahitrov |
<%args> |
| 2 |
|
|
|
| 3 |
|
|
$prj => undef |
| 4 |
|
|
|
| 5 |
|
|
</%args> |
| 6 |
|
|
<%init> |
| 7 |
|
|
|
| 8 |
|
|
return unless $prj; |
| 9 |
|
|
my ($section) = $keeper->get_sections ( |
| 10 |
|
|
class => 'promosuite::ProjectSection', |
| 11 |
|
|
status => 1, |
| 12 |
|
|
alias => $prj, |
| 13 |
|
|
limit => 1, |
| 14 |
|
|
); |
| 15 |
|
|
unless (ref $section) { |
| 16 |
|
|
warn "Секция проекта не найдена\n" if $DEBUG; |
| 17 |
|
|
return; |
| 18 |
|
|
} |
| 19 |
|
|
|
| 20 |
|
|
my ($profile) = $keeper->get_documents ( |
| 21 |
|
|
s => $section->id, |
| 22 |
|
|
class => 'promosuite::Project', |
| 23 |
|
|
status => 1, |
| 24 |
|
|
limit => 1, |
| 25 |
|
|
); |
| 26 |
|
|
unless (ref $profile) { |
| 27 |
|
|
warn "Не найден профиль проекта\n" if $DEBUG; |
| 28 |
|
|
return; |
| 29 |
|
|
} |
| 30 |
|
|
|
| 31 |
|
|
$request->{project} = $prj; |
| 32 |
|
|
$request->{project_section} = $section; |
| 33 |
|
|
$request->{project_profile} = $profile; |
| 34 |
|
|
return 1; |
| 35 |
|
|
|
| 36 |
|
|
</%init> |