From 4e278782f156a9d7452e6e9ddcefee9542b964fc Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Tue, 29 Jul 2014 15:00:56 -0300 Subject: [PATCH] Bug 12673: Remove CGI::scrolling_list from C4::Items.pm This patch removes only instance in this file To test: 1. Apply the patch 2. (Esay way) Put on staff URL /cgi-bin/koha/services/itemrecorddisplay.pl?biblionumber=N&itemnumber=M 3. Code replaced corresponds to pulldowns, verify information is correct (check with another item edit view) PrepareItemrecordDisplay() in Items.pm is filled with chunks of HTML code that must be put on TT file. For now scrolling_list is the only removed. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Tested different item edit displays and the URL given above, no regressions found. Also passes all tests and QA script. Signed-off-by: Tomas Cohen Arazi --- C4/Items.pm | 15 ++++++--------- .../prog/en/modules/services/itemrecorddisplay.tt | 12 ++++++++++++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index fe058147dd..f8e2121bfa 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2835,15 +2835,12 @@ sub PrepareItemrecordDisplay { $authorised_lib{$value} = $lib; } } - $subfield_data{marc_value} = CGI::scrolling_list( - -name => 'field_value', - -values => \@authorised_values, - -default => "$defaultvalue", - -labels => \%authorised_lib, - -size => 1, - -tabindex => '', - -multiple => 0, - ); + $subfield_data{marc_value} = { + type => 'select', + values => \@authorised_values, + default => "$defaultvalue", + labels => \%authorised_lib, + }; } elsif ( $tagslib->{$tag}->{$subfield}->{value_builder} ) { # opening plugin my $plugin = C4::Context->intranetdir . "/cataloguing/value_builder/" . $tagslib->{$tag}->{$subfield}->{'value_builder'}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt index 56372769b5..d55268a4db 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt @@ -11,7 +11,19 @@ [% ELSE %] [% END %] + [% IF ( iteminfo.marc_value.type == 'select' ) %] + + [% ELSE %] [% iteminfo.marc_value %] + [% END %] -- 2.11.0