?? list.html.tmpl
字號:
#------------------------------------------------------------------------# Compiled template generated by the Template Toolkit version 2.20#------------------------------------------------------------------------Template::Document->new({ METADATA => { 'modtime' => '1210873146', 'name' => 'flag/list.html.tmpl', }, BLOCK => sub { my $context = shift || die "template sub called without context\n"; my $stash = $context->stash; my $output = ''; my $_tt_error; eval { BLOCK: { $output .= "\n"; $output .= "\n\n<script type=\"text/javascript\">\n<!-- \n // Enables or disables a requestee field depending on whether or not\n // the user is requesting the corresponding flag.\n function toggleRequesteeField(flagField, no_focus)\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 == \"?\") {\n requesteeField.disabled = false;\n if (!no_focus) requesteeField.focus();\n } else \n 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 }\n window.onload = disableRequesteeFields;\n// -->\n</script>\n\n"; $output .= "\n"; #line 75 "template\en\default\flag\list.html.tmpl" $stash->set('flag_table_id', 'flags', 1); $output .= "\n\n<table id=\""; #line 77 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $_tt_filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get('flag_table_id'); &$_tt_filter($output); }; $output .= "\">"; #line 89 "template\en\default\flag\list.html.tmpl" if (!($stash->get('flag_no_header'))) { $output .= "\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>"; } $output .= "\n\n "; #line 185 "template\en\default\flag\list.html.tmpl" # FOREACH do { my ($_tt_value, $_tt_error, $_tt_oldloop); my $_tt_list = $stash->get('flag_types'); unless (UNIVERSAL::isa($_tt_list, 'Template::Iterator')) { $_tt_list = Template::Config->iterator($_tt_list) || die $Template::Config::ERROR, "\n"; } ($_tt_value, $_tt_error) = $_tt_list->get_first(); eval { $_tt_oldloop = $stash->get('loop') }; $stash->set('loop', $_tt_list); eval { LOOP: while (! $_tt_error) { $stash->{'type'} = $_tt_value; $output .= "\n \n "; #line 145 "template\en\default\flag\list.html.tmpl" # FOREACH do { my ($_tt_value, $_tt_error, $_tt_oldloop); my $_tt_list = $stash->get(['type', 0, 'flags', 0]); unless (UNIVERSAL::isa($_tt_list, 'Template::Iterator')) { $_tt_list = Template::Config->iterator($_tt_list) || die $Template::Config::ERROR, "\n"; } ($_tt_value, $_tt_error) = $_tt_list->get_first(); eval { $_tt_oldloop = $stash->get('loop') }; $stash->set('loop', $_tt_list); eval { LOOP: while (! $_tt_error) { $stash->{'flag'} = $_tt_value; $output .= "\n <tr>\n <td>"; #line 98 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $_tt_filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['flag', 0, 'setter', 0, 'nick', 0]); &$_tt_filter($output); }; $output .= ":\n </td>\n <td>\n <label title=\""; #line 101 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $_tt_filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['type', 0, 'description', 0]); &$_tt_filter($output); }; $output .= "\"\n for=\"flag-"; #line 102 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'id', 0]); $output .= "\">"; #line 103 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $_tt_filter = $context->filter('no_break') || $context->throw($context->error); # FILTER $output .= do { my $output = ''; my $_tt_filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['type', 0, 'name', 0]); &$_tt_filter($output); }; &$_tt_filter($output); }; $output .= "</label>\n </td>\n <td>\n <select id=\"flag-"; #line 106 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'id', 0]); $output .= "\" name=\"flag-"; #line 106 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'id', 0]); $output .= "\" \n title=\""; #line 107 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $_tt_filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['type', 0, 'description', 0]); &$_tt_filter($output); }; $output .= "\"\n onchange=\"toggleRequesteeField(this);\"\n class=\"flag_select\">\n "; #line 113 "template\en\default\flag\list.html.tmpl" if ($stash->get(['user', 0, 'can_request_flag', [ $stash->get('type') ]])) { $output .= "\n <option value=\"X\"></option>"; } #line 126 "template\en\default\flag\list.html.tmpl" if ($stash->get(['type', 0, 'is_active', 0])) { #line 117 "template\en\default\flag\list.html.tmpl" if (($stash->get(['type', 0, 'is_requestable', 0]) && $stash->get(['user', 0, 'can_request_flag', [ $stash->get('type') ]])) || $stash->get(['flag', 0, 'status', 0]) eq '?') { $output .= "\n <option value=\"?\" "; #line 116 "template\en\default\flag\list.html.tmpl" if ($stash->get(['flag', 0, 'status', 0]) eq '?') { $output .= 'selected'; } $output .= ">?</option>"; } #line 120 "template\en\default\flag\list.html.tmpl" if ($stash->get(['user', 0, 'can_set_flag', [ $stash->get('type') ]]) || $stash->get(['flag', 0, 'status', 0]) eq '+') { $output .= "\n <option value=\"+\" "; #line 119 "template\en\default\flag\list.html.tmpl" if ($stash->get(['flag', 0, 'status', 0]) eq '+') { $output .= 'selected'; } $output .= ">+</option>"; } #line 123 "template\en\default\flag\list.html.tmpl" if ($stash->get(['user', 0, 'can_set_flag', [ $stash->get('type') ]]) || $stash->get(['flag', 0, 'status', 0]) eq '-') { $output .= "\n <option value=\"-\" "; #line 122 "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 125 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'status', 0]); $output .= "\" selected=\"selected\">"; #line 125 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'status', 0]); $output .= "</option>"; } $output .= "\n </select>\n </td>"; #line 143 "template\en\default\flag\list.html.tmpl" if ($stash->get('any_flags_requesteeble')) { $output .= "\n <td>"; #line 141 "template\en\default\flag\list.html.tmpl" if (($stash->get(['type', 0, 'is_active', 0]) && $stash->get(['type', 0, 'is_requestable', 0]) && $stash->get(['type', 0, 'is_requesteeble', 0])) || $stash->get(['flag', 0, 'requestee', 0])) { $output .= "\n <span style=\"white-space: nowrap;\">\n (<input type=\"text\" size=\"30\" maxlength=\"255\"\n id=\"requestee-"; #line 134 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'id', 0]); $output .= "\" \n name=\"requestee-"; #line 135 "template\en\default\flag\list.html.tmpl" $output .= $stash->get(['flag', 0, 'id', 0]); $output .= "\""; #line 138 "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 137 "template\en\default\flag\list.html.tmpl" # FILTER $output .= do { my $output = ''; my $_tt_filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['flag', 0, 'requestee', 0, 'login', 0]); &$_tt_filter($output); }; $output .= "\""; } $output .= "\n >)\n </span>"; } $output .= "\n </td>"; } $output .= "\n </tr>";; ($_tt_value, $_tt_error) = $_tt_list->get_next(); } }; $stash->set('loop', $_tt_oldloop); die $@ if $@; $_tt_error = 0 if $_tt_error && $_tt_error eq Template::Constants::STATUS_DONE; die $_tt_error if $_tt_error; }; $output .= "\n \n "; #line 184 "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])) {
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -