From ad5161d2dccfb3a43c7a2049298703c27f8fa34d Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 13 Feb 2008 13:03:15 -0600 Subject: [PATCH] XHTML corrections: guided reports Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Reports.pm | 7 ++++-- .../prog/en/modules/reports/dictionary.tmpl | 20 +++++++++------- .../modules/reports/guided_reports_start.tmpl | 24 ++++++++++--------- reports/dictionary.pl | 3 +++ 4 files changed, 33 insertions(+), 21 deletions(-) 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 - +
@@ -72,19 +72,19 @@ Filter by area +
  • - +
  • - + @@ -145,9 +145,10 @@ Filter by area @@ -261,10 +262,11 @@ align : "Tl"
  • Area: - +
  • -

  • +
    1. +
    @@ -275,7 +277,7 @@ align : "Tl" -
    Columns Values
    +
    " /> @@ -290,6 +292,7 @@ align : "Tl" diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl index 01eb05b69f..8e25579abb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl @@ -80,22 +80,23 @@ reports

    Saved Reports

    Choose the report to run from the list

    - - +
    Report NameTypeNotesSaved ResultsSaved SQL 
    + - - + + - + +
    Report NameTypeNotesSaved ResultsSaved SQL 
    "> &phase=Show%20SQL">Show SQL&phase=Run%20this%20report">Run this Report&phase=Show%20SQL">Show SQL&phase=Run%20this%20report">Run this Report ">Schedule this Report&phase=Delete%20Saved">Delete
    &phase=Delete%20Saved">Delete
    -

    There are no saved reports. Build new?

    +

    There are no saved reports. Build new?

    @@ -149,7 +150,6 @@ reports

    Step 3 of 6: Select Columns for Display

    Note: Be careful selecting when selecting columns. If your choice is too broad it could result in a very large report that will either not complete, or slow your system down.

    -
    " /> @@ -172,9 +172,10 @@ reports

    - + +

    @@ -190,6 +191,7 @@ reports

    + @@ -209,12 +211,12 @@ NAME="name" -->"> _value" name="_value" value="" -/>/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" /> +/>/lib/calendar/cal.gif" id="buttonfrom" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" /> @@ -241,7 +243,7 @@ TMPL_VAR NAME="id" -->" />
    - + 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, -- 2.39.2