| #------------------------------------------------------------------------ |
| # Compiled template generated by the Template Toolkit version 2.15 |
| #------------------------------------------------------------------------ |
| |
| Template::Document->new({ |
| METADATA => { |
| 'modtime' => '1138010588', |
| 'name' => 'list/list.csv.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"; |
| #line 23 "template/en/custom/list/list.csv.tmpl" |
| $output .= $context->process('global/variables.none.tmpl'); |
| #line 24 "template/en/custom/list/list.csv.tmpl" |
| # USE |
| $stash->set('date', |
| $context->plugin('date')); |
| $output .= "\n"; |
| #line 26 "template/en/custom/list/list.csv.tmpl" |
| $stash->set('colsepchar', $stash->get(['user', 0, 'settings', 0, 'csv_colsepchar', 0, 'value', 0])); |
| $output .= "\n\nbug_id"; |
| #line 31 "template/en/custom/list/list.csv.tmpl" |
| |
| # FOREACH |
| do { |
| my ($value, $error, $oldloop); |
| my $list = $stash->get('displaycolumns'); |
| |
| 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->{'column'} = $value; |
| #line 30 "template/en/custom/list/list.csv.tmpl" |
| $output .= $stash->get('colsepchar'); |
| #line 30 "template/en/custom/list/list.csv.tmpl" |
| |
| # FILTER |
| $output .= do { |
| my $output = ''; |
| my $filter = $context->filter('csv') |
| || $context->throw($context->error); |
| |
| $output .= $stash->get('column'); |
| |
| &$filter($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"; |
| #line 44 "template/en/custom/list/list.csv.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 34 "template/en/custom/list/list.csv.tmpl" |
| $output .= $stash->get(['bug', 0, 'bug_id', 0]); |
| #line 42 "template/en/custom/list/list.csv.tmpl" |
| |
| # FOREACH |
| do { |
| my ($value, $error, $oldloop); |
| my $list = $stash->get('displaycolumns'); |
| |
| 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->{'column'} = $value; |
| #line 36 "template/en/custom/list/list.csv.tmpl" |
| $output .= $stash->get('colsepchar'); |
| #line 40 "template/en/custom/list/list.csv.tmpl" |
| if ($stash->get('column') eq 'opendate' || $stash->get('column') eq 'changeddate') { |
| #line 38 "template/en/custom/list/list.csv.tmpl" |
| $stash->set('rawcolumn', $stash->get(['column', 0, 'replace', [ 'date', 'time' ]])); |
| #line 39 "template/en/custom/list/list.csv.tmpl" |
| $stash->set(['bug', 0, $stash->get('column'), 0], $stash->get(['date', 0, 'format', [ $stash->get(['bug', 0, $stash->get('rawcolumn'), 0]), '%Y-%m-%d %H:%M:%S' ]])); |
| } |
| |
| #line 41 "template/en/custom/list/list.csv.tmpl" |
| |
| # FILTER |
| $output .= do { |
| my $output = ''; |
| my $filter = $context->filter('csv') |
| || $context->throw($context->error); |
| |
| $output .= $stash->get(['bug', 0, $stash->get('column'), 0]); |
| |
| &$filter($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";; |
| ($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"; |
| } }; |
| if ($@) { |
| $error = $context->catch($@, \$output); |
| die $error unless $error->type eq 'return'; |
| } |
| |
| return $output; |
| }, |
| DEFBLOCKS => { |
| |
| }, |
| }); |