Bugzilla – Attachment 30301 Details for
Bug 12673
Remove CGI::scrolling_list from C4::Items.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12673: Remove CGI::scrolling_list from C4::Items.pm
Bug-12673-Remove-CGIscrollinglist-from-C4Itemspm.patch (text/plain), 3.32 KB, created by
Bernardo Gonzalez Kriegel
on 2014-07-29 18:13:17 UTC
(
hide
)
Description:
Bug 12673: Remove CGI::scrolling_list from C4::Items.pm
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2014-07-29 18:13:17 UTC
Size:
3.32 KB
patch
obsolete
>From ac018f0116078fd10dbb6bf6fc1a6746fb7d6519 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >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. >--- > 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..56d00f6 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 %] > <label>[% iteminfo.subfield %] - [% iteminfo.marc_lib %]</label> > [% END %] >+ [% IF ( iteminfo.marc_value.type == 'select' ) %] >+ <select name="field_value" size="1"> >+ [% FOREACH value IN iteminfo.marc_value.values %] >+ [% IF ( value == iteminfo.marc_value.default ) %] >+ <option value=[% value %] selected>[% iteminfo.marc_value.labels.$value %]</option> >+ [% ELSE %] >+ <option value=[% value %]>[% iteminfo.marc_value.labels.$value %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ [% ELSE %] > [% iteminfo.marc_value %] >+ [% END %] > <input type="hidden" name="itemid" value="1" /> > <input type="hidden" name="kohafield" value="[% iteminfo.kohafield %]" /> > <input type="hidden" name="tag" value="[% iteminfo.tag %]" /> >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12673
:
30301
|
30407
|
30434
|
30500
|
30765
|
30769
|
30776
|
30777