From 3837fd6e5a90779f13b66265d6c7489d9aa37d2d Mon Sep 17 00:00:00 2001
From: Don Armstrong Note that maintainers may use different Maintainer fields for\n";
- print "different packages, so there may be other reports filed under\n";
- print "different addresses.\n";
+ $variables{maint_note} = 1;
}
if (exists $param{submitter}) {
- print " Note that people may use different email accounts for\n";
- print "different bugs, so there may be other reports filed under\n";
- print "different addresses.\n";
+ $variables{submitter_note} = 1;
}
+$variables{result} = $result;
+$variables{option_form} =
+ option_form(template => 'cgi/pkgreport_options',
+ param => \%param,
+ form_options => $form_options,
+ variables => $form_option_variables,
+ );
-print $result;
-
-print fill_in_template(template=>'cgi/pkgreport_javascript');
+$variables{package_info} = '';
-print qq(" . "$gProject$Archived $gBug report logs: $title" .
- "
\n";
-
-my $showresult = 1;
-
-my $pkg = $param{package} if defined $param{package};
-my $src = $param{src} if defined $param{src};
-
-my $pseudodesc = getpseudodesc();
-if (defined $pseudodesc and defined $pkg and exists $pseudodesc->{$pkg}) {
- delete $param{dist};
-}
-
# output information about the packages
-for my $package (make_list($param{package}||[])) {
- print generate_package_info(binary => 1,
- package => $package,
- options => \%param,
- bugs => \@bugs,
- );
-}
-for my $package (make_list($param{src}||[])) {
- print generate_package_info(binary => 0,
- package => $package,
- options => \%param,
- bugs => \@bugs,
- );
-}
+
+my %variables;
if (exists $param{maint} or exists $param{maintenc}) {
- print "Options
\n);
+for my $package (make_list($param{package}||[])) {
+ $variables{package_info} .=
+ generate_package_info(binary => 1,
+ package => $package,
+ options => \%param,
+ bugs => \@bugs,
+ );
+}
-print option_form(template => 'cgi/pkgreport_options',
- param => \%param,
- form_options => $form_options,
- variables => $form_option_variables,
- );
+for my $package (make_list($param{src}||[])) {
+ $variables{package_info} .=
+ generate_package_info(binary => 0,
+ package => $package,
+ options => \%param,
+ bugs => \@bugs,
+ );
+}
-print "
\n";
-print fill_in_template(template=>'html/html_tail',
+print fill_in_template(template=>'cgi/pkgreport',
+ variables => {%variables,
+ param => \%param,
+ html_escape => \&Debbugs::CGI::html_escape,
+ },
hole_var => {'&strftime' => \&POSIX::strftime,
},
);
-print "\n";
-
diff --git a/templates/en_US/cgi/pkgreport.tmpl b/templates/en_US/cgi/pkgreport.tmpl
new file mode 100644
index 00000000..dc901d9b
--- /dev/null
+++ b/templates/en_US/cgi/pkgreport.tmpl
@@ -0,0 +1,31 @@
+{include(q(html/pre_title))}{$title} -- {html_escape($config{project})} {html_escape($config{bug})} report logs{include(q(html/post_title.tmpl))}
+
+
+
+{$title} -- {html_escape($config{project})} {html_escape($config{bug})} report logs
+{ $package_info }
+{ my $output = '';
+if ($maint_note) {
+ $output .= <