Bugzilla – Attachment 3771 Details for
Bug 6106
add item not respecting framework in acq
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
0001-BZ6106-add-item-not-respecting-framework-in-acq.patch (text/plain), 4.06 KB, created by
Paul Poulain
on 2011-04-07 08:55:51 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2011-04-07 08:55:51 UTC
Size:
4.06 KB
patch
obsolete
>From 7450abe5c5bdc61010f2a5a8da0aee880393e319 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Thu, 7 Apr 2011 10:54:45 +0200 >Subject: [PATCH] BZ6106: add item not respecting framework in acq > The PrepareItemrecordDisplay sub builds an item framework for later use in ACQ > Some cases were missing : item subfield connected to a plugin, hidden subfield, long size subfield. > >--- > C4/Biblio.pm | 34 ++++++++++++++++++++++++++++++++++ > 1 files changed, 34 insertions(+), 0 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 75e9a3d..66dbf26 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -2465,6 +2465,40 @@ sub PrepareItemrecordDisplay { > -tabindex => '', > -multiple => 0, > ); >+ } elsif ( $tagslib->{$tag}->{$subfield}->{value_builder} ) { >+ # opening plugin >+ my $plugin = C4::Context->intranetdir . "/cataloguing/value_builder/" . $tagslib->{$tag}->{$subfield}->{'value_builder'}; >+ if (do $plugin) { >+ my $temp; >+ my $extended_param = plugin_parameters( $dbh, $temp, $tagslib, $subfield_data{id}, undef ); >+ my ( $function_name, $javascript ) = plugin_javascript( $dbh, $temp, $tagslib, $subfield_data{id}, undef ); >+ $subfield_data{random} = int(rand(1000000)); # why do we need 2 different randoms? >+ my $index_subfield = int(rand(1000000)); >+ $subfield_data{id} = "tag_".$tag."_subfield_".$subfield."_".$index_subfield; >+ $subfield_data{marc_value} = qq[<input tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" >+ onfocus="Focus$function_name($subfield_data{random}, '$subfield_data{id}');" >+ onblur=" Blur$function_name($subfield_data{random}, '$subfield_data{id}');" /> >+ <a href="#" class="buttonDot" onclick="Clic$function_name('$subfield_data{id}'); return false;" title="Tag Editor">...</a> >+ $javascript]; >+ } else { >+ warn "Plugin Failed: $plugin"; >+ $subfield_data{marc_value} = qq(<input tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" />); # supply default input form >+ } >+ } >+ elsif ( $tag eq '' ) { # it's an hidden field >+ $subfield_data{marc_value} = qq(<input type="hidden" tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" value="$defaultvalue" />); >+ } >+ elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) { # FIXME: shouldn't input type be "hidden" ? >+ $subfield_data{marc_value} = qq(<input type="text" tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" value="$defaultvalue" />); >+ } >+ elsif ( length($defaultvalue) > 100 >+ or (C4::Context->preference("marcflavour") eq "UNIMARC" and >+ 300 <= $tag && $tag < 400 && $subfield eq 'a' ) >+ or (C4::Context->preference("marcflavour") eq "MARC21" and >+ 500 <= $tag && $tag < 600 ) >+ ) { >+ # oversize field (textarea) >+ $subfield_data{marc_value} = qq(<textarea tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255">$defaultvalue</textarea>\n"); > } else { > $subfield_data{marc_value} = "<input type=\"text\" name=\"field_value\" value=\"$defaultvalue\" size=\"50\" maxlength=\"255\" />"; > } >-- >1.7.1 >
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 6106
:
3771
|
3811