📄 list-for-user.html.tmpl
字号:
#------------------------------------------------------------------------# Compiled template generated by the Template Toolkit version 2.13#------------------------------------------------------------------------Template::Document->new({ METADATA => { 'modtime' => '1106853262', '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"; #line 23 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $context->process('global/variables.none.tmpl'); $output .= "\n"; #line 29 "template\en\default\bug\votes\list-for-user.html.tmpl" if (! $stash->get('header_done')) { #line 26 "template\en\default\bug\votes\list-for-user.html.tmpl" # CAPTURE $stash->set('h2', do { my $output = ''; # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['voting_user', 0, 'login', 0]); &$filter($output); }; $output; }); #line 26 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get('canedit')) { #line 26 "template\en\default\bug\votes\list-for-user.html.tmpl" $stash->set('title', 'Change Votes'); } else { #line 26 "template\en\default\bug\votes\list-for-user.html.tmpl" $stash->set('title', 'Show Votes'); } #line 26 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $context->process('global/header.html.tmpl'); } else { $output .= "\n <hr>"; } $output .= "\n"; #line 42 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get('votes_recorded')) { $output .= "\n <p>\n <font color=\"red\">\n The changes to your votes have been saved.\n </font>\n </p>"; } else { $output .= "\n <br>"; } $output .= "\n"; #line 156 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get(['products', 0, 'size', 0])) { $output .= "\n <form method=\"post\" action=\"votes.cgi\">\n <input type=\"hidden\" name=\"action\" value=\"vote\">\n <table cellspacing=\"4\">\n <tr>\n <td></td>\n <th>Votes</th>\n <th>"; #line 52 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['terms', 0, 'Bug', 0]); $output .= " #</th>\n <th>Summary</th>\n </tr>\n"; #line 57 "template\en\default\bug\votes\list-for-user.html.tmpl" $stash->set('onevoteproduct', 0); #line 57 "template\en\default\bug\votes\list-for-user.html.tmpl" $stash->set('multivoteproduct', 0); #line 121 "template\en\default\bug\votes\list-for-user.html.tmpl" # 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; #line 57 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get(['product', 0, 'onevoteonly', 0])) { #line 57 "template\en\default\bug\votes\list-for-user.html.tmpl" $stash->set('onevoteproduct', 1); } else { #line 57 "template\en\default\bug\votes\list-for-user.html.tmpl" $stash->set('multivoteproduct', 1); } $output .= "\n <tr>\n <th>"; #line 59 "template\en\default\bug\votes\list-for-user.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['product', 0, 'name', 0]); &$filter($output); }; $output .= "</th>\n <td></td>"; #line 73 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get(['product', 0, 'maxperbug', 0]) < $stash->get(['product', 0, 'maxvotes', 0]) && $stash->get(['product', 0, 'maxperbug', 0]) > 1) { $output .= "\n <td>\n <font size=\"-1\">\n (Note: only "; #line 66 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['product', 0, 'maxperbug', 0]); $output .= " vote"; #line 68 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get(['product', 0, 'maxperbug', 0]) ne 1) { $output .= 's'; } $output .= " allowed per "; #line 68 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['terms', 0, 'bug', 0]); $output .= " in\n this product.)\n </font>\n </td>"; } $output .= "\n </tr>\n"; #line 108 "template\en\default\bug\votes\list-for-user.html.tmpl" # 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 <tr>\n <td></td>\n <td align=\"right\">"; #line 91 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get('canedit')) { #line 91 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get(['product', 0, 'onevoteonly', 0])) { $output .= "\n <input type=\"checkbox\" name=\""; #line 83 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['bug', 0, 'id', 0]); $output .= "\" value=\"1\""; #line 85 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get(['bug', 0, 'count', 0])) { $output .= ' checked'; } $output .= ">"; } else { $output .= "\n <input name=\""; #line 88 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['bug', 0, 'id', 0]); $output .= "\" value=\""; #line 88 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['bug', 0, 'count', 0]); $output .= "\"\n size=\"2\">"; } } else { #line 91 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['bug', 0, 'count', 0]); } $output .= "\n </td>\n <td align=\"right\">"; #line 95 "template\en\default\bug\votes\list-for-user.html.tmpl" $stash->set('isclosed', ! $stash->get(['bug', 0, 'opened', 0])); $output .= "\n <a href=\"show_bug.cgi?id="; #line 96 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['bug', 0, 'id', 0]); $output .= "\">"; #line 98 "template\en\default\bug\votes\list-for-user.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('closed', [ $stash->get('isclosed') ]) || $context->throw($context->error); $output .= $stash->get(['bug', 0, 'id', 0]); &$filter($output); }; $output .= "</a>\n </td>\n <td>\n <a href=\"votes.cgi?action=show_bug&bug_id="; #line 101 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['bug', 0, 'id', 0]); $output .= "\">"; #line 103 "template\en\default\bug\votes\list-for-user.html.tmpl" # 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 </a>\n </td>\n </tr>";; ($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 <tr>\n <td></td>\n <td colspan=\"3\">"; #line 112 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['product', 0, 'total', 0]); $output .= " vote"; #line 114 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get(['product', 0, 'total', 0]) ne 1) { $output .= 's'; } $output .= " used out of "; #line 114 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['product', 0, 'maxvotes', 0]); $output .= "\n allowed.\n <br>\n <br>\n </td>\n </tr>";; ($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 </table>\n"; #line 140 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get('canedit')) { $output .= "\n <input type=\"submit\" value=\"Change My Votes\">\n <br>\n <br>\n To change your votes,"; #line 134 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get('multivoteproduct')) { $output .= "\n type in new numbers (using zero to mean no votes)"; #line 134 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get('onevoteproduct')) { $output .= ' or '; } } #line 137 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get('onevoteproduct')) { $output .= "\n change the checkbox"; } $output .= "\n and then click <b>Change My Votes</b>."; } $output .= "\n </form>"; } else { $output .= "\n <p>"; #line 152 "template\en\default\bug\votes\list-for-user.html.tmpl" if ($stash->get('canedit')) { $output .= "\n You are"; } else { $output .= "\n This user is"; } $output .= "\n currently not voting on any "; #line 153 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $stash->get(['terms', 0, 'bugs', 0]); $output .= ".\n </p>"; } $output .= "\n\n<p>\n <a href=\"page.cgi?id=voting.html\">Help with voting</a>.\n</p>\n"; #line 163 "template\en\default\bug\votes\list-for-user.html.tmpl" $output .= $context->process('global/footer.html.tmpl'); $output .= "\n"; } }; if ($@) { $error = $context->catch($@, \$output); die $error unless $error->type eq 'return'; } return $output; }, DEFBLOCKS => { },});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -