📄 show.xml.tmpl
字号:
#------------------------------------------------------------------------# Compiled template generated by the Template Toolkit version 2.13#------------------------------------------------------------------------Template::Document->new({ METADATA => { 'modtime' => '1102352900', 'name' => 'bug/show.xml.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<?xml version=\"1.0\" standalone=\"yes\"?>\n<!DOCTYPE bugzilla SYSTEM \""; #line 23 "template\en\default\bug\show.xml.tmpl" $output .= $stash->get(['Param', [ 'urlbase' ]]); $output .= "bugzilla.dtd\">\n\n<bugzilla version=\""; #line 25 "template\en\default\bug\show.xml.tmpl" $output .= $stash->get('VERSION'); $output .= "\"\n urlbase=\""; #line 26 "template\en\default\bug\show.xml.tmpl" $output .= $stash->get(['Param', [ 'urlbase' ]]); $output .= "\"\n maintainer=\""; #line 27 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); $output .= $stash->get(['Param', [ 'maintainer' ]]); &$filter($output); }; $output .= "\""; #line 32 "template\en\default\bug\show.xml.tmpl" if ($stash->get('user')) { $output .= "\n exporter=\""; #line 30 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); $output .= $stash->get(['user', 0, 'email', 0]); &$filter($output); }; $output .= "\""; } $output .= "\n>\n"; #line 73 "template\en\default\bug\show.xml.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get('bugs'); 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; #line 73 "template\en\default\bug\show.xml.tmpl" if ($stash->get(['bug', 0, 'error', 0])) { $output .= "\n <bug error=\""; #line 37 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); $output .= $stash->get(['bug', 0, 'error', 0]); &$filter($output); }; $output .= "\">\n <bug_id>"; #line 38 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); $output .= $stash->get(['bug', 0, 'bug_id', 0]); &$filter($output); }; $output .= "</bug_id>\n </bug>"; } else { $output .= "\n <bug>"; #line 45 "template\en\default\bug\show.xml.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get(['bug', 0, 'fields', 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->{'field'} = $value; #line 45 "template\en\default\bug\show.xml.tmpl" if ($stash->get(['displayfields', 0, $stash->get('field'), 0])) { $output .= "\n "; #line 45 "template\en\default\bug\show.xml.tmpl" $output .= $context->process('bug_field'); } ; ($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 50 "template\en\default\bug\show.xml.tmpl" if ($stash->get(['displayfields', 0, 'group', 0])) { #line 50 "template\en\default\bug\show.xml.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get(['bug', 0, 'groups', 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->{'g'} = $value; #line 47 "template\en\default\bug\show.xml.tmpl" if (!($stash->get(['g', 0, 'ison', 0]))) { ($value, $error) = $list->get_next(); next LOOP; } $output .= "\n <group>"; #line 48 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); $output .= $stash->get(['g', 0, 'name', 0]); &$filter($output); }; $output .= "</group>";; ($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"; #line 60 "template\en\default\bug\show.xml.tmpl" if ($stash->get(['displayfields', 0, 'long_desc', 0])) { #line 60 "template\en\default\bug\show.xml.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get(['bug', 0, 'longdescs', 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->{'c'} = $value; #line 53 "template\en\default\bug\show.xml.tmpl" if ($stash->get(['c', 0, 'isprivate', 0]) && ! $stash->get(['UserInGroup', [ $stash->get(['Param', [ 'insidergroup' ]]) ]])) { ($value, $error) = $list->get_next(); next LOOP; } $output .= "\n <long_desc>\n <who>"; #line 55 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); $output .= $stash->get(['c', 0, 'email', 0]); &$filter($output); }; $output .= "</who>\n <bug_when>"; #line 56 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); # FILTER $output .= do { my $output = ''; my $filter = $context->filter('time') || $context->throw($context->error); $output .= $stash->get(['c', 0, 'time', 0]); &$filter($output); }; &$filter($output); }; $output .= "</bug_when>\n <thetext>"; #line 57 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); $output .= $stash->get(['c', 0, 'body', 0]); &$filter($output); }; $output .= "</thetext>\n </long_desc>";; ($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 "; #line 70 "template\en\default\bug\show.xml.tmpl" if ($stash->get(['displayfields', 0, 'attachment', 0])) { #line 70 "template\en\default\bug\show.xml.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get(['bug', 0, 'attachments', 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->{'a'} = $value; #line 63 "template\en\default\bug\show.xml.tmpl" if ($stash->get(['a', 0, 'isprivate', 0]) && ! $stash->get(['UserInGroup', [ $stash->get(['Param', [ 'insidergroup' ]]) ]])) { ($value, $error) = $list->get_next(); next LOOP; } $output .= "\n <attachment>\n <attachid>"; #line 65 "template\en\default\bug\show.xml.tmpl" $output .= $stash->get(['a', 0, 'attachid', 0]); $output .= "</attachid>\n <date>"; #line 66 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); # FILTER $output .= do { my $output = ''; my $filter = $context->filter('time') || $context->throw($context->error); $output .= $stash->get(['a', 0, 'date', 0]); &$filter($output); }; &$filter($output); }; $output .= "</date>\n <desc>"; #line 67 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); $output .= $stash->get(['a', 0, 'description', 0]); &$filter($output); }; $output .= "</desc>\n </attachment>";; ($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 </bug>"; } ; ($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</bugzilla>\n"; $output .= "\n"; } }; if ($@) { $error = $context->catch($@, \$output); die $error unless $error->type eq 'return'; } return $output; }, DEFBLOCKS => { 'bug_field' => sub { my $context = shift || die "template sub called without context\n"; my $stash = $context->stash; my $output = ''; my $error; eval { BLOCK: { #line 85 "template\en\default\bug\show.xml.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get(['bug', 0, $stash->get('field'), 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->{'val'} = $value; $output .= "\n "; #line 82 "template\en\default\bug\show.xml.tmpl" if ($stash->get('field') eq 'reporter' || $stash->get('field') eq 'assigned_to' || $stash->get('field') eq 'qa_contact') { #line 82 "template\en\default\bug\show.xml.tmpl" $stash->set('val', $stash->get(['val', 0, 'email', 0])); } elsif ($stash->get('field') eq 'creation_ts' || $stash->get('field') eq 'delta_ts') { #line 82 "template\en\default\bug\show.xml.tmpl" # CAPTURE $stash->set('val', do { my $output = ''; # FILTER $output .= do { my $output = ''; my $filter = $context->filter('time') || $context->throw($context->error); $output .= $stash->get('val'); &$filter($output); }; $output; }); } $output .= "\n <"; #line 83 "template\en\default\bug\show.xml.tmpl" $output .= $stash->get('field'); $output .= ">"; #line 83 "template\en\default\bug\show.xml.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('xml') || $context->throw($context->error); $output .= $stash->get('val'); &$filter($output); }; $output .= "</"; #line 83 "template\en\default\bug\show.xml.tmpl" $output .= $stash->get('field'); $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; }; } }; if ($@) { $error = $context->catch($@, \$output); die $error unless $error->type eq 'return'; } return $output; }, },});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -