📄 list.html.tmpl
字号:
#------------------------------------------------------------------------# Compiled template generated by the Template Toolkit version 2.13#------------------------------------------------------------------------Template::Document->new({ METADATA => { 'modtime' => '1104277858', 'name' => 'flag/list.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\n<script type=\"text/javascript\">\n<!-- \n var stored_onload = window.onload;\n // Enables or disables a requestee field depending on whether or not\n // the user is requesting the corresponding flag.\n function toggleRequesteeField(flagField)\n {\n // Convert the ID of the flag field into the ID of its corresponding\n // requestee field and then use the ID to get the field.\n var id = flagField.name.replace(/flag(_type)?-(\\d+)/, \"requestee\$1-\$2\");\n var requesteeField = document.getElementById(id);\n if (!requesteeField) return;\n \n // Enable or disable the requestee field based on the value\n // of the flag field.\n if (flagField.value == \"?\") requesteeField.disabled = false;\n else requesteeField.disabled = true;\n }\n \n // Disables requestee fields when the window is loaded since they shouldn't\n // be enabled until the user requests that flag type.\n function disableRequesteeFields()\n {\n var inputElements = document.getElementsByTagName(\"input\");\n var inputElement, id, flagField;\n for ( var i=0 ; i<inputElements.length ; i++ )\n {\n inputElement = inputElements.item(i);\n if (inputElement.name.search(/^requestee(_type)?-(\\d+)\$/) != -1)\n {\n // Convert the ID of the requestee field into the ID of its corresponding\n // flag field and then use the ID to get the field.\n id = inputElement.name.replace(/requestee(_type)?-(\\d+)/, \"flag\$1-\$2\");\n flagField = document.getElementById(id);\n if (flagField && flagField.value != \"?\")\n inputElement.disabled = true;\n }\n }\n if (stored_onload) {\n stored_onload();\n }\n }\n window.onload = disableRequesteeFields;\n// -->\n</script>\n\n"; $output .= "\n\n<table id=\"flags\">\n <tr>\n <th colspan=\"3\">\n Flags:\n </th>"; #line 87 "template\en\default\flag\list.html.tmpl" if ($stash->get('any_flags_requesteeble')) { $output .= "\n <th>\n Requestee:\n </th>"; } $output .= "\n </tr>\n\n "; #line 179 "template\en\default\flag\list.html.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get('flag_types'); 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->{'type'} = $value; $output .= "\n \n "; #line 143 "template\en\default\flag\list.html.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get(['type', 0, 'flags', 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->{'flag'} = $value; $output .= "\n <tr>\n <td>"; #line 96 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['flag', 0, 'setter', 0, 'nick', 0]); &$filter($output); }; $output .= ":\n </td>\n <td>"; #line 100 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['type', 0, 'name', 0]); &$filter($output); }; $output .= "\n </td>\n <td>\n <select id=\"flag-"; #line 103 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'id', 0]); $output .= "\" name=\"flag-"; #line 103 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'id', 0]); $output .= "\" \n onchange=\"toggleRequesteeField(this);\">\n <option value=\"X\"></option>"; #line 117 "template\en\default\flag\list.html.tmpl" if ($stash->get(['type', 0, 'is_active', 0])) { $output .= "\n <option value=\"+\" "; #line 108 "template\en\default\flag\list.html.tmpl" if ($stash->get(['flag', 0, 'status', 0]) eq '+') { $output .= 'selected'; } $output .= ">+</option>\n <option value=\"-\" "; #line 109 "template\en\default\flag\list.html.tmpl" if ($stash->get(['flag', 0, 'status', 0]) eq '-') { $output .= 'selected'; } $output .= ">-</option>"; #line 114 "template\en\default\flag\list.html.tmpl" if ($stash->get(['type', 0, 'is_requestable', 0]) || $stash->get(['flag', 0, 'status', 0]) eq '?') { $output .= "\n <option value=\"?\" "; #line 112 "template\en\default\flag\list.html.tmpl" if ($stash->get(['flag', 0, 'status', 0]) eq '?') { $output .= 'selected'; } $output .= ">?</option>"; } } else { $output .= "\n <option value=\""; #line 115 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'status', 0]); $output .= "\" selected=\"selected\">"; #line 115 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'status', 0]); $output .= "</option>"; } $output .= "\n </select>\n </td>"; #line 140 "template\en\default\flag\list.html.tmpl" if ($stash->get('any_flags_requesteeble')) { $output .= "\n <td>"; #line 137 "template\en\default\flag\list.html.tmpl" if ($stash->get(['type', 0, 'is_active', 0]) && $stash->get(['type', 0, 'is_requesteeble', 0])) { $output .= "\n <span style=\"white-space: nowrap;\">\n (<input type=\"text\" size=\"8\" maxlength=\"255\"\n id=\"requestee-"; #line 127 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'id', 0]); $output .= "\" \n name=\"requestee-"; #line 128 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'id', 0]); $output .= "\""; #line 133 "template\en\default\flag\list.html.tmpl" if ($stash->get(['flag', 0, 'status', 0]) eq '?' && $stash->get(['flag', 0, 'requestee', 0])) { $output .= "\n value=\""; #line 131 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['flag', 0, 'requestee', 0, 'login', 0]); &$filter($output); }; $output .= "\""; } $output .= "\n >)\n </span>"; } $output .= "\n </td>"; } $output .= "\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 "; #line 179 "template\en\default\flag\list.html.tmpl" if ((! $stash->get(['type', 0, 'flags', 0]) || $stash->get(['type', 0, 'flags', 0, 'size', 0]) eq 0) && $stash->get(['type', 0, 'is_active', 0])) { $output .= "\n <tr>\n <td> </td>\n <td>"; #line 148 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['type', 0, 'name', 0]); &$filter($output); }; $output .= "</td>\n <td>\n <select id=\"flag_type-"; #line 150 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['type', 0, 'id', 0]); $output .= "\" name=\"flag_type-"; #line 150 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['type', 0, 'id', 0]); $output .= "\" \n onchange=\"toggleRequesteeField(this);\">\n <option value=\"X\"></option>\n <option value=\"+\">+</option>\n <option value=\"-\">-</option>"; #line 159 "template\en\default\flag\list.html.tmpl" if ($stash->get(['type', 0, 'is_requestable', 0])) { $output .= "\n <option value=\"?\">?</option>"; } $output .= "\n </select>\n </td>"; #line 176 "template\en\default\flag\list.html.tmpl" if ($stash->get('any_flags_requesteeble')) { $output .= "\n <td>"; #line 173 "template\en\default\flag\list.html.tmpl" if ($stash->get(['type', 0, 'is_requesteeble', 0])) { $output .= "\n <span style=\"white-space: nowrap;\">\n (<input type=\"text\" size=\"8\" maxlength=\"255\"\n id=\"requestee_type-"; #line 169 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['type', 0, 'id', 0]); $output .= "\" \n name=\"requestee_type-"; #line 170 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['type', 0, 'id', 0]); $output .= "\">)\n </span>"; } $output .= "\n </td>"; } $output .= "\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 "; #line 217 "template\en\default\flag\list.html.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get('flag_types'); 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->{'type'} = $value; #line 181 "template\en\default\flag\list.html.tmpl" if (!($stash->get(['type', 0, 'flags', 0, 'size', 0]) > 0 && $stash->get(['type', 0, 'is_multiplicable', 0]) && $stash->get(['type', 0, 'is_active', 0]))) { ($value, $error) = $list->get_next(); next LOOP; } #line 184 "template\en\default\flag\list.html.tmpl" if (! $stash->get('separator_displayed')) { $output .= "\n <tr><td colspan=\"3\"><hr></td></tr>"; #line 184 "template\en\default\flag\list.html.tmpl" $stash->set('separator_displayed', 1); } $output .= "\n <tr>\n <td colspan=\"2\">addl. "; #line 186 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['type', 0, 'name', 0]); &$filter($output); }; $output .= "</td>\n <td>\n <select id=\"flag_type-"; #line 188 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['type', 0, 'id', 0]); $output .= "\" name=\"flag_type-"; #line 188 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['type', 0, 'id', 0]); $output .= "\" \n onchange=\"toggleRequesteeField(this);\">\n <option value=\"X\"></option>\n <option value=\"+\">+</option>\n <option value=\"-\">-</option>"; #line 197 "template\en\default\flag\list.html.tmpl" if ($stash->get(['type', 0, 'is_requestable', 0])) { $output .= "\n <option value=\"?\">?</option>"; } $output .= "\n </select>\n </td>"; #line 214 "template\en\default\flag\list.html.tmpl" if ($stash->get('any_flags_requesteeble')) { $output .= "\n <td>"; #line 211 "template\en\default\flag\list.html.tmpl" if ($stash->get(['type', 0, 'is_requesteeble', 0])) { $output .= "\n <span style=\"white-space: nowrap;\">\n (<input type=\"text\" size=\"8\" maxlength=\"255\"\n id=\"requestee_type-"; #line 207 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['type', 0, 'id', 0]); $output .= "\" \n name=\"requestee_type-"; #line 208 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['type', 0, 'id', 0]); $output .= "\">)\n </span>"; } $output .= "\n </td>"; } $output .= "\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</table>\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 + -