Bugzilla – Attachment 3811 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]
Signed off patch
0001-SIGNED-OFF-BZ6106-add-item-not-respecting-framework-.patch (text/plain), 4.17 KB, created by
Katrin Fischer
on 2011-04-07 15:18:47 UTC
(
hide
)
Description:
Signed off patch
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-04-07 15:18:47 UTC
Size:
4.17 KB
patch
obsolete
>From b71934412ad6abc2f3bcdd6776efe05b0f13bbb5 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] [SIGNED-OFF] BZ6106: add item not respecting framework in acq >Content-Type: text/plain; charset="utf-8" > >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. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > C4/Biblio.pm | 34 ++++++++++++++++++++++++++++++++++ > 1 files changed, 34 insertions(+), 0 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index a0e06f6..135dd91 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -2397,6 +2397,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