diff --git a/C4/Reports.pm b/C4/Reports.pm
index 4f48c747e0..045e78f75a 100644
--- a/C4/Reports.pm
+++ b/C4/Reports.pm
@@ -174,15 +174,17 @@ sub get_columns {
my ($area,$cgi) = @_;
my $tables = $table_areas{$area};
my @allcolumns;
+ my $first = 1;
foreach my $table (@$tables) {
- my @columns = _get_columns($table,$cgi);
+ my @columns = _get_columns($table,$cgi, $first);
+ $first = 0;
push @allcolumns, @columns;
}
return ( \@allcolumns );
}
sub _get_columns {
- my ($tablename,$cgi) = @_;
+ my ($tablename,$cgi, $first) = @_;
my $dbh = C4::Context->dbh();
my $sth = $dbh->prepare("show columns from $tablename");
$sth->execute();
@@ -190,6 +192,7 @@ sub _get_columns {
my $column_defs = _get_column_defs($cgi);
my %tablehash;
$tablehash{'table'}=$tablename;
+ $tablehash{'__first__'} = $first;
push @columns, \%tablehash;
while ( my $data = $sth->fetchrow_arrayref() ) {
my %temphash;
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
index e471b8440d..c4949b302e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
@@ -30,7 +30,7 @@ Filter by area
-
+
| _value" name="_value" value=""
-/> |
-
+
diff --git a/reports/dictionary.pl b/reports/dictionary.pl
index 30fcecd9b1..56949aa5b6 100755
--- a/reports/dictionary.pl
+++ b/reports/dictionary.pl
@@ -133,7 +133,9 @@ elsif ($phase eq 'New Term step 4'){
elsif ($phase eq 'New Term step 5'){
# Confirmation screen
+ my $areas = C4::Reports::get_report_areas();
my $area = $input->param('area');
+ my $areaname = $areas->[$area - 1]->{'name'};
my $columnstring = $input->param('columnstring');
my $definition_name=$input->param('definition_name');
my $definition_description=$input->param('definition_description');
@@ -169,6 +171,7 @@ elsif ($phase eq 'New Term step 5'){
}
$template->param( 'step_5' => 1,
'area' => $area,
+ 'areaname' => $areaname,
'definition_name' => $definition_name,
'definition_description' => $definition_description,
'query' => $query_criteria,