\n \n | \n Bug # | \n Summary | \n Votes | \n
\n";
# FOREACH
do {
my ($value, $error, $oldloop);
my $list = $stash->get('products');
unless (UNIVERSAL::isa($list, 'Template::Iterator')) {
$list = Template::Config->iterator($list)
|| die $Template::Config::ERROR, "\n";
}
($value, $error) = $list->get_first();
eval { $oldloop = $stash->get('loop') };
$stash->set('loop', $list);
eval {
LOOP: while (! $error) {
$stash->{'product'} = $value;
$output .= "\n \n ";
# FILTER
$output .= do {
my $output = '';
my $filter = $context->filter('html')
|| $context->throw($context->error);
$output .= $stash->get(['product', 0, 'name', 0]);
&$filter($output);
};
$output .= " | \n | ";
if ($stash->get(['product', 0, 'maxperbug', 0]) < $stash->get(['product', 0, 'maxvotes', 0]) && $stash->get(['product', 0, 'maxperbug', 0]) > 1) {
$output .= "\n \n \n (Note: only ";
$output .= $stash->get(['product', 0, 'maxperbug', 0]);
$output .= " vote";
if ($stash->get(['product', 0, 'maxperbug', 0]) ne 1) {
$output .= 's';
}
$output .= " allowed per bug in \n this product.)\n \n | ";
}
$output .= "\n
\n";
# FOREACH
do {
my ($value, $error, $oldloop);
my $list = $stash->get(['product', 0, 'bugs', 0]);
unless (UNIVERSAL::isa($list, 'Template::Iterator')) {
$list = Template::Config->iterator($list)
|| die $Template::Config::ERROR, "\n";
}
($value, $error) = $list->get_first();
eval { $oldloop = $stash->get('loop') };
$stash->set('loop', $list);
eval {
LOOP: while (! $error) {
$stash->{'bug'} = $value;
$output .= "\n \n | \n ";
if (! $stash->get(['bug', 0, 'opened', 0])) {
$output .= '';
}
$output .= "\n get(['bug', 0, 'id', 0]);
$output .= "\">";
$output .= $stash->get(['bug', 0, 'id', 0]);
$output .= "";
if (! $stash->get(['bug', 0, 'opened', 0])) {
$output .= '';
}
$output .= "\n | \n \n get(['bug', 0, 'id', 0]);
$output .= "\">";
# FILTER
$output .= do {
my $output = '';
my $filter = $context->filter('html')
|| $context->throw($context->error);
$output .= $stash->get(['bug', 0, 'summary', 0]);
&$filter($output);
};
$output .= "\n \n | \n ";
if ($stash->get('canedit')) {
if ($stash->get(['product', 0, 'onevoteonly', 0])) {
$output .= "\n get(['bug', 0, 'id', 0]);
$output .= "\" value=\"1\"";
if ($stash->get(['bug', 0, 'count', 0])) {
$output .= ' checked';
}
$output .= ">";
}
else {
$output .= "\n get(['bug', 0, 'id', 0]);
$output .= "\" value=\"";
$output .= $stash->get(['bug', 0, 'count', 0]);
$output .= "\" \n size=\"2\">";
}
}
else {
$output .= $stash->get(['bug', 0, 'count', 0]);
}
$output .= "\n | \n
";;
($value, $error) = $list->get_next();
}
};
$stash->set('loop', $oldloop);
die $@ if $@;
$error = 0 if $error && $error eq Template::Constants::STATUS_DONE;
die $error if $error;
};
$output .= "\n\n \n | \n ";
$output .= $stash->get(['product', 0, 'total', 0]);
$output .= " vote";
if ($stash->get(['product', 0, 'total', 0]) ne 1) {
$output .= 's';
}
$output .= " used out of ";
$output .= $stash->get(['product', 0, 'maxvotes', 0]);
$output .= "\n allowed.\n \n \n | \n
";;
($value, $error) = $list->get_next();
}
};
$stash->set('loop', $oldloop);
die $@ if $@;
$error = 0 if $error && $error eq Template::Constants::STATUS_DONE;
die $error if $error;
};
$output .= "\n
\n";
if ($stash->get('canedit')) {
$output .= "\n