📄 report.html.tmpl
字号:
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->{'tblname'} = $value; #line 98 "template\en\default\reports\report.html.tmpl" if ($stash->get('tblname') ne '-total-') { #line 96 "template\en\default\reports\report.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('url_quote') || $context->throw($context->error); $output .= $stash->get('tbl_field'); &$filter($output); }; $output .= "="; #line 96 "template\en\default\reports\report.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('url_quote') || $context->throw($context->error); $output .= $stash->get('tblname'); &$filter($output); }; $output .= "&"; } ; ($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 .= "width="; #line 98 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('width'); $output .= "&height="; #line 98 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('height'); $output .= " "; $output; }); $output .= "\n \n <img alt=\"Graphical report results\" src=\""; #line 102 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('imageurl'); $output .= "\"\n width=\""; #line 103 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('width'); $output .= "\" height=\""; #line 103 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('height'); $output .= "\">"; } $output .= "\n <br>";; ($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 <tr>\n <td>"; #line 114 "template\en\default\reports\report.html.tmpl" $stash->set('formats', [ { 'name' => 'pie', 'description' => 'Pie' }, { 'name' => 'bar', 'description' => 'Bar' }, { 'name' => 'line', 'description' => 'Line' }, { 'name' => 'table', 'description' => 'Table' } ]); $output .= "\n"; #line 0 "template\en\default\reports\report.html.tmpl" $stash->set('formaturl', ("report.cgi?" . $stash->get('switchbase') . "&width=" . $stash->get('width') . "&height=" . $stash->get('height')) . '&action=wrap'); #line 126 "template\en\default\reports\report.html.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get('formats'); 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->{'other_format'} = $value; #line 121 "template\en\default\reports\report.html.tmpl" if ($stash->get(['other_format', 0, 'name', 0]) eq 'pie' && $stash->get('row_field') && $stash->get('col_field')) { ($value, $error) = $list->get_next(); next LOOP; } #line 124 "template\en\default\reports\report.html.tmpl" if (!($stash->get(['other_format', 0, 'name', 0]) eq $stash->get('format'))) { $output .= "\n <a href=\""; #line 122 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('formaturl'); $output .= "&format="; #line 122 "template\en\default\reports\report.html.tmpl" $output .= $stash->get(['other_format', 0, 'name', 0]); $output .= "\">"; } #line 124 "template\en\default\reports\report.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get(['other_format', 0, 'description', 0]); &$filter($output); }; #line 124 "template\en\default\reports\report.html.tmpl" if (!($stash->get(['other_format', 0, 'name', 0]) eq $stash->get('format'))) { $output .= '</a>'; } $output .= " | ";; ($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 <a href=\""; #line 127 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('formaturl'); $output .= "&ctype=csv&format=table\">CSV</a> \n </td>\n "; #line 157 "template\en\default\reports\report.html.tmpl" if ($stash->get('format') ne 'table') { $output .= "\n <td>\n \n </td>\n"; #line 141 "template\en\default\reports\report.html.tmpl" # CAPTURE $stash->set('sizeurl', do { my $output = ''; $output .= "report.cgi?"; #line 139 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('switchbase'); $output .= "&action=wrap&format="; #line 141 "template\en\default\reports\report.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get('format'); &$filter($output); }; $output; }); $output .= "\n <td align=\"center\">\n <a href=\""; #line 143 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('sizeurl'); $output .= "&width="; #line 143 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('width'); $output .= "&height="; #line 145 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('height') + 100; $output .= "\">Taller</a><br>\n <a href=\""; #line 146 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('sizeurl'); $output .= "&width="; #line 146 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('width') - 100; $output .= "&height="; #line 148 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('height'); $output .= "\">Thinner</a> * \n <a href=\""; #line 149 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('sizeurl'); $output .= "&width="; #line 149 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('width') + 100; $output .= "&height="; #line 151 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('height'); $output .= "\">Fatter</a> <br>\n <a href=\""; #line 152 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('sizeurl'); $output .= "&width="; #line 152 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('width'); $output .= "&height="; #line 154 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('height') - 100; $output .= "\">Shorter</a><br>\n </td>"; } $output .= "\n <tr>\n </table>\n\n <p>"; #line 174 "template\en\default\reports\report.html.tmpl" if ($stash->get('format') eq 'table') { $output .= "\n <a href=\"query.cgi?"; #line 164 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('switchbase'); $output .= "&format=report-table\">Edit \n this report</a>"; } else { $output .= "\n <a href=\"query.cgi?"; #line 168 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('switchbase'); $output .= "&chart_format="; #line 170 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('format'); $output .= "&format=report-graph&cumulate="; #line 170 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('cumulate'); $output .= "\">\n Edit this report\n </a>"; } $output .= "\n </p>\n \n</div>\n"; #line 180 "template\en\default\reports\report.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 + -