#------------------------------------------------------------------------ # Compiled template generated by the Template Toolkit version 2.09 #------------------------------------------------------------------------ Template::Document->new({ METADATA => { 'modtime' => '1022141656', 'name' => 'bug/votes/list-for-user.html.tmpl', }, BLOCK => sub { my $context = shift || die "template sub called without context\n"; my $stash = $context->stash; my $output = ''; my $error; eval { BLOCK: { $output .= "\n"; $output .= "\n"; $output .= $context->process('global/header.html.tmpl', { 'title' => 'Show Votes', 'h2' => $stash->get(['voting_user', 0, 'name', 0]) }); $output .= "\n"; # CAPTURE $stash->set('canedit', do { my $output = ''; if ($stash->get(['voting_user', 0, 'login', 0]) eq $stash->get(['user', 0, 'login', 0])) { $output .= 1; } $output; }); $output .= "\n"; if ($stash->get('votes_recorded')) { $output .= "\n

\n \n The changes to your votes have been saved.\n \n

"; } else { $output .= "\n
"; } $output .= "\n"; if ($stash->get(['products', 0, 'size', 0])) { $output .= "\n
\n \n \n \n \n \n \n \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 \n "; if ($stash->get(['product', 0, 'maxperbug', 0]) < $stash->get(['product', 0, 'maxvotes', 0]) && $stash->get(['product', 0, 'maxperbug', 0]) > 1) { $output .= "\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 \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 \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
Bug #SummaryVotes
"; # 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 \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
"; 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 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 "; 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
"; $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"; if ($stash->get('canedit')) { $output .= "\n \n
\n
\n To change your votes, type in new numbers (using zero to\n mean no votes) or change the checkbox, and then click \n Change My Votes."; } $output .= " \n
"; } else { $output .= "\n

"; if ($stash->get('canedit')) { $output .= "\n You are"; } else { $output .= "\n This user is"; } $output .= "\n currently not voting on any bugs.\n

"; } $output .= "\n\n

\n Help with voting.\n

\n"; $output .= $context->process('global/footer.html.tmpl'); $output .= "\n"; } }; if ($@) { $error = $context->catch($@, \$output); die $error unless $error->type eq 'return'; } return $output; }, DEFBLOCKS => { }, });