From c474d01a3191f3408c6c0f1a9df784a1fc431411 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Tue, 29 Jul 2014 15:00:56 -0300 Subject: [PATCH] [SIGNED-OFF] Bug 12673: Remove CGI::scrolling_list from C4::Items.pm Content-Type: text/plain; charset="utf-8" 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 --- 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 fe05814..f8e2121 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 5637276..d55268a 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 %] -- 1.7.9.5