#------------------------------------------------------------------------ # Compiled template generated by the Template Toolkit version 2.09 #------------------------------------------------------------------------ Template::Document->new({ METADATA => { 'modtime' => '1020986105', 'name' => 'bug/navigate.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"; if ($stash->get('bug_list') && $stash->get(['bug_list', 0, 'size', 0]) > 0) { $stash->set('this_bug_idx', $stash->get(['lsearch', [ $stash->get('bug_list'), $stash->get(['bug', 0, 'bug_id', 0]) ]])); $output .= "\n Bug List:"; if ($stash->get('this_bug_idx') ne -1) { $output .= "\n ("; $output .= $stash->get('this_bug_idx') + 1; $output .= " of "; $output .= $stash->get(['bug_list', 0, 'size', 0]); $output .= ")"; } $output .= "\n \n get(['bug_list', 0, 'first', 0]); $output .= "\">First\n get(['bug_list', 0, 'last', 0]); $output .= "\">Last\n"; if ($stash->get('this_bug_idx') ne -1) { if ($stash->get('this_bug_idx') > 0) { $stash->set('prev_bug', $stash->get('this_bug_idx') - 1); $output .= "\n get(['bug_list', 0, $stash->get('prev_bug'), 0]); $output .= "\">Prev"; } else { $output .= "\n Prev"; } $output .= "\n"; if ($stash->get('this_bug_idx') + 1 < $stash->get(['bug_list', 0, 'size', 0])) { $stash->set('next_bug', $stash->get('this_bug_idx') + 1); $output .= "\n get(['bug_list', 0, $stash->get('next_bug'), 0]); $output .= "\">Next"; } else { $output .= "\n Next"; } } else { $output .= "\n (This bug is not in your list)"; } $output .= "\n \n   Show list"; } $output .= "\n\n     Query page\n     Enter new bug\n"; } }; if ($@) { $error = $context->catch($@, \$output); die $error unless $error->type eq 'return'; } return $output; }, DEFBLOCKS => { }, });