From 05225c86ac1894dfb0e1aa380911ec2678dfcc2d Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Mon, 14 Jul 2014 21:10:57 -0300 Subject: [PATCH] Bug 766: Remove CGI::scrolling_list from aqplan.pl This patch removes 3 occurences on aqplan.pl To test: 1. You need a budget and a found 2. Apply the patch 3. Go to Aquisitions, click on your found 4. Select one of the options on pulldown Planning e.g. "Plan by months" 5. Now to the left there are two boxes, Filter and Export a) Filter: (1) pulldown below 'Select planning type' check that works selecting other values and submit This pulldown showed originally code types, untranslatable BTW. Added a TT block to allow translation and shows legends that match Planning pulldown, but not the order. b) Export: pulldowns for filetype (2) and delimiter (3) Those have originally one value each, and for me Export does not work, before or after patch, but check that pulldown exist. Notes: A) 5.a) I can change de order of main Planning pulldown, is harcoded. The values for Filter pulldown are sorted on aqplan.pl. Is one or the other. If desired, TT block can be moved to includes/budgets-admin-toolbar.inc (where hardcoded Planning lives) B) 5.b) Moved 'Export' legend inside it's box, like Filter. C) Finally: there is something strange, before or after patch. There is an empty option 'Planning by " if you select planning using main pulldown, it disappears if you select planning using Filter (not a mistery, using Planning fills $auth_cats_loop, using Filter submit button does not) --- admin/aqplan.pl | 32 ++++------------- .../intranet-tmpl/prog/en/modules/admin/aqplan.tt | 37 ++++++++++++++++---- 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/admin/aqplan.pl b/admin/aqplan.pl index d4f355e..4be57a6 100755 --- a/admin/aqplan.pl +++ b/admin/aqplan.pl @@ -156,17 +156,11 @@ push( @category_list, $$_{'authcat'} ) foreach @$auth_cats_loop; #reorder the list @category_list = sort { $a cmp $b } @category_list; -my $tab_list = CGI::scrolling_list( - -name => 'authcat', - -id => 'authcat', - -values => \@category_list, - -default => $authcat, - -size => 1, - -tabindex => '', - -multiple => 0, -); -$template->param( authcat_dropbox => $tab_list ); +$template->param( authcat_dropbox => { + values => \@category_list, + default => $authcat, + }); my @budgets = @$budgets_ref; my $CGISort; @@ -330,22 +324,8 @@ foreach my $n (@names) { # ------------------------------------------------------------ # DEFAULT DISPLAY BEGINS -my $CGIextChoice = CGI::scrolling_list( - -name => 'MIME', - -id => 'MIME', - -values => ['CSV'], # FIXME translation - -size => 1, - -multiple => 0 -); - -my @dels = ( C4::Context->preference("delimiter") ); -my $CGIsepChoice = CGI::scrolling_list( - -name => 'sep', - -id => 'sep', - -values => \@dels, - -size => 1, - -multiple => 0 -); +my $CGIextChoice = ( 'CSV' ); # FIXME translation +my $CGIsepChoice = ( C4::Context->preference("delimiter") ); my ( @budget_lines, %cell_hash ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt index 7f0d901..d5d8906 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt @@ -235,11 +235,25 @@

Filter

- +[% BLOCK planning_types %] +[% SWITCH type %] +[% CASE 'MONTHS' %]by months +[% CASE 'ITEMTYPES' %]by item types +[% CASE 'BRANCHES' %]by libraries +[% END %] +[% END %]
  1. - [% authcat_dropbox %] +
  2. [% IF ( show_mine ) %] @@ -275,13 +289,22 @@
  3. [% IF ( budget_lines ) %]
    -

    Export

    +

    Export

      -
    1. -
    2. [% CGIextChoice %] - [% CGIsepChoice %]
    3. +
    4. +
    5. + + +
    -- 1.7.9.5