📄 report.html.tmpl
字号:
#------------------------------------------------------------------------# Compiled template generated by the Template Toolkit version 2.13#------------------------------------------------------------------------Template::Document->new({ METADATA => { 'modtime' => '1074451170', 'name' => 'reports/report.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"; $output .= "\n"; #line 37 "template\en\default\reports\report.html.tmpl" $stash->set('width', 600, 1); $stash->set('height', 350, 1); $output .= "\n"; #line 42 "template\en\default\reports\report.html.tmpl" if ($stash->get('min_width') && $stash->get('width') < $stash->get('min_width')) { #line 42 "template\en\default\reports\report.html.tmpl" $stash->set('width', $stash->get('min_width')); } $output .= "\n\n"; #line 44 "template\en\default\reports\report.html.tmpl" if ($stash->get('format') eq 'pie') { #line 44 "template\en\default\reports\report.html.tmpl" $stash->set('row_field', ''); } $output .= "\n"; #line 47 "template\en\default\reports\report.html.tmpl" $output .= $context->process('global/field-descs.none.tmpl'); $output .= "\n"; #line 50 "template\en\default\reports\report.html.tmpl" $stash->set('tbl_field_disp', $stash->get(['field_descs', 0, $stash->get('tbl_field'), 0]) || $stash->get('tbl_field')); #line 50 "template\en\default\reports\report.html.tmpl" $stash->set('col_field_disp', $stash->get(['field_descs', 0, $stash->get('col_field'), 0]) || $stash->get('col_field')); #line 50 "template\en\default\reports\report.html.tmpl" $stash->set('row_field_disp', $stash->get(['field_descs', 0, $stash->get('row_field'), 0]) || $stash->get('row_field')); $output .= "\n"; #line 56 "template\en\default\reports\report.html.tmpl" # CAPTURE $stash->set('title', do { my $output = ''; $output .= "\n Report: "; #line 56 "template\en\default\reports\report.html.tmpl" if ($stash->get('tbl_field')) { #line 56 "template\en\default\reports\report.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get('tbl_field_disp'); &$filter($output); }; } #line 56 "template\en\default\reports\report.html.tmpl" if ($stash->get('tbl_field') && ($stash->get('col_field') || $stash->get('row_field'))) { $output .= ' / '; } #line 56 "template\en\default\reports\report.html.tmpl" if ($stash->get('row_field')) { #line 56 "template\en\default\reports\report.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get('row_field_disp'); &$filter($output); }; } #line 56 "template\en\default\reports\report.html.tmpl" if ($stash->get('col_field') && $stash->get('row_field')) { $output .= ' / '; } #line 56 "template\en\default\reports\report.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get('col_field_disp'); &$filter($output); }; $output; }); $output .= "\n"; #line 59 "template\en\default\reports\report.html.tmpl" $output .= $context->process('global/header.html.tmpl', { 'style' => ' .t1 { background-color: #ffffff } /* white */ .t2 { background-color: #dfefff } /* light blue */ .t3 { background-color: #dddddd } /* grey */ .t4 { background-color: #c3d3ed } /* darker blue */ .ttotal { background-color: #cfffdf } /* light green */ ', 'h3' => $stash->get(['time2str', [ '%Y-%m-%d %H:%M:%S', $stash->get('time') ]]) }); $output .= "\n"; #line 74 "template\en\default\reports\report.html.tmpl" if ($stash->get('debug')) { $output .= "\n <p>"; #line 72 "template\en\default\reports\report.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get('query'); &$filter($output); }; $output .= "</p>"; } $output .= "\n\n<div align=\"center\">\n"; #line 108 "template\en\default\reports\report.html.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get('tbl_names'); 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->{'tbl'} = $value; $output .= " "; #line 81 "template\en\default\reports\report.html.tmpl" if ($stash->get('tbl') eq '-total-') { #line 81 "template\en\default\reports\report.html.tmpl" $stash->set('tbl_disp', 'Total'); } else { #line 81 "template\en\default\reports\report.html.tmpl" $stash->set('tbl_disp', $stash->get('tbl')); } $output .= "\n"; #line 105 "template\en\default\reports\report.html.tmpl" if ($stash->get('format') eq 'table') { #line 84 "template\en\default\reports\report.html.tmpl" $output .= $context->process('reports/report-table.html.tmpl'); } else { #line 87 "template\en\default\reports\report.html.tmpl" if ($stash->get('tbl')) { $output .= "\n <h2>"; #line 85 "template\en\default\reports\report.html.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('html') || $context->throw($context->error); $output .= $stash->get('tbl_disp'); &$filter($output); }; $output .= "</h2>"; } $output .= "\n "; #line 100 "template\en\default\reports\report.html.tmpl" # CAPTURE $stash->set('imageurl', do { my $output = ''; $output .= "report.cgi?"; #line 90 "template\en\default\reports\report.html.tmpl" $output .= $stash->get('imagebase'); $output .= "&format="; #line 92 "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('format'); &$filter($output); }; $output .= "&ctype=png&action=plot&"; #line 98 "template\en\default\reports\report.html.tmpl" if ($stash->get('tbl_field')) { #line 98 "template\en\default\reports\report.html.tmpl" if ($stash->get('tbl') ne '-total-') { #line 94 "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 94 "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'); &$filter($output); }; $output .= "&"; } else { #line 98 "template\en\default\reports\report.html.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get('tbl_names');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -