Bugzilla – Attachment 33245 Details for
Bug 13203
Plugin housekeeping: UNIMARC field 123i, 123j, 210c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13203: Plugin housekeeping: UNIMARC field 123i, 123j, 210c
Bug-13203-Plugin-housekeeping-UNIMARC-field-123i-1.patch (text/plain), 6.91 KB, created by
Marcel de Rooy
on 2014-11-05 13:36:55 UTC
(
hide
)
Description:
Bug 13203: Plugin housekeeping: UNIMARC field 123i, 123j, 210c
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-11-05 13:36:55 UTC
Size:
6.91 KB
patch
obsolete
>From 96bb220c39f8f5a5083e7a79bdcfe5b9df5b18a3 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 20 Oct 2014 12:36:36 +0200 >Subject: [PATCH] Bug 13203: Plugin housekeeping: UNIMARC field 123i, 123j, > 210c >Content-Type: text/plain; charset=utf-8 > >In working on bug 10480, I noticed that these plugins needed some attention: > >[2] unimarc_field_123i.pl: added missing template >[3] unimarc_field_123j.pl: resolved missing template with same file >[4] unimarc_field_210c_bis.pl: removed a warn, corrected some POD lines > >Note about UNIMARC field 123i and 123j: Subfields $i and $j are each 8 >characters long and contain the same components as subfields $f and $g >except that character position 0 contains a plus sign (for the northern >celestial hemisphere) or a minus sign (for the southern celestial hemisphere). > >Test plan: >Connect unimarc_field_123i and 123j to some field. >Look especially at changing + or - for the hemisphere in the popup. >--- > cataloguing/value_builder/unimarc_field_123i.pl | 4 +- > cataloguing/value_builder/unimarc_field_123j.pl | 4 +- > .../value_builder/unimarc_field_210c_bis.pl | 7 +- > .../value_builder/unimarc_field_123i_j.tt | 59 ++++++++++++++++++++ > 4 files changed, 66 insertions(+), 8 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123i_j.tt > >diff --git a/cataloguing/value_builder/unimarc_field_123i.pl b/cataloguing/value_builder/unimarc_field_123i.pl >index 8b39e73..5ada49f 100755 >--- a/cataloguing/value_builder/unimarc_field_123i.pl >+++ b/cataloguing/value_builder/unimarc_field_123i.pl >@@ -72,7 +72,7 @@ my ($input) = @_; > my $dbh = C4::Context->dbh; > > my ($template, $loggedinuser, $cookie) >- = get_template_and_user({template_name => "cataloguing/value_builder/unimarc_field_123i.tt", >+ = get_template_and_user({template_name => "cataloguing/value_builder/unimarc_field_123i_j.tt", > query => $input, > type => "intranet", > authnotrequired => 0, >@@ -84,7 +84,7 @@ my ($template, $loggedinuser, $cookie) > my $f3 = substr($result,4,2); > my $f4 = substr($result,6,2); > $template->param(index => $index, >- "f1$f1" => 1, >+ "f1".($f1 eq '-'?'s':'n') => 1, > f2 => $f2, > f3 => $f3, > f4 => $f4); >diff --git a/cataloguing/value_builder/unimarc_field_123j.pl b/cataloguing/value_builder/unimarc_field_123j.pl >index 9b0903e..8ce202e 100755 >--- a/cataloguing/value_builder/unimarc_field_123j.pl >+++ b/cataloguing/value_builder/unimarc_field_123j.pl >@@ -75,7 +75,7 @@ sub plugin { > my ($template, $loggedinuser, $cookie) > = get_template_and_user( > { >- template_name => "cataloguing/value_builder/unimarc_field_123j.tt", >+ template_name => "cataloguing/value_builder/unimarc_field_123i_j.tt", > query => $input, > type => "intranet", > authnotrequired => 0, >@@ -88,7 +88,7 @@ sub plugin { > my $f3 = substr($result,4,2); > my $f4 = substr($result,6,2); > $template->param(index => $index, >- "f1$f1" => 1, >+ "f1".($f1 eq '-'?'s':'n') => 1, > f2 => $f2, > f3 => $f3, > f4 => $f4); >diff --git a/cataloguing/value_builder/unimarc_field_210c_bis.pl b/cataloguing/value_builder/unimarc_field_210c_bis.pl >index ab8d41a..d9e02b2 100755 >--- a/cataloguing/value_builder/unimarc_field_210c_bis.pl >+++ b/cataloguing/value_builder/unimarc_field_210c_bis.pl >@@ -36,8 +36,6 @@ It need : > if the biblio has no isbn, then the search if done on editor only > If the biblio ha an isbn, the search is done on isbn and editor. It's faster. > >-=over 2 >- > =cut > > use strict; >@@ -50,7 +48,9 @@ use C4::Context; > use C4::AuthoritiesMarc; > use C4::Output; > >-=head1 >+=head1 FUNCTIONS >+ >+=head2 plugin_parameters > > plugin_parameters : other parameters added when the plugin is called by the dopop function > >@@ -89,7 +89,6 @@ sub plugin { > my $result = $input->param('result'); > my $editor_found = $input->param('editor_found'); > my $AuthoritySeparator = C4::Context->preference("AuthoritySeparator"); >- warn Data::Dumper::Dumper $index; > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { template_name => "cataloguing/value_builder/unimarc_field_210c_bis.tt", >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123i_j.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123i_j.tt >new file mode 100644 >index 0000000..aa28f99 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_123i_j.tt >@@ -0,0 +1,59 @@ >+[% INCLUDE 'doc-head-open.inc' %] >+<title>UNIMARC field 123i/j builder</title> >+[% INCLUDE 'doc-head-close.inc' %] >+</head> >+<body id="cat_unimarc_field_123ij" class="cat" style="padding:1em;"> >+<h3>UNIMARC field 123i/j builder</h3> >+<form name="f_pop" action=""> >+<table> >+ <tr> >+ <td><label for="f1">Hemisphere:</label></td> >+ <td> >+ <select name="f1" id="f1" size="1"> >+ >+ [% IF ( f1n ) %] >+ <option value="+" selected="selected">north</option> >+ [% ELSE %] >+ <option value="+">north</option> >+ [% END %] >+ [% IF ( f1s ) %] >+ <option value="-" selected="selected">south</option> >+ [% ELSE %] >+ <option value="-">south</option> >+ [% END %] >+ </select> >+ </td></tr> >+ >+<tr> <td><label for="f2">Degree (complete with 0):</label></td> >+ <td><input type="text" name="f2" id="f2" maxlength="3" size="4" value="[% f2 %]" /></td> >+</tr> >+<tr> <td><label for="f3">Minute (complete with 0):</label></td> >+ <td><input type="text" name="f3" id="f3" maxlength="2" size="3" value="[% f3 %]" /></td> >+</tr> >+<tr> <td><label for="f4">Second (complete with 0):</label></td> >+ <td><input type="text" name="f4" id="f4" maxlength="2" size="3" value="[% f4 %]" /></td> >+</tr> >+</table> >+<fieldset class="action"><input type="button" value="OK" onclick="report();" /> <a href="#" class="cancel close">Cancel</a></fieldset> >+</form> >+<script type="text/javascript"> >+//<![CDATA[ >+ function report() { >+ document.f_pop.f2.value=document.f_pop.f2.value+' '; >+ document.f_pop.f3.value=document.f_pop.f3.value+' '; >+ document.f_pop.f4.value=document.f_pop.f4.value+' '; >+ document.f_pop.f2.value=document.f_pop.f2.value.substring(0,3); >+ document.f_pop.f3.value=document.f_pop.f3.value.substring(0,2); >+ document.f_pop.f4.value=document.f_pop.f4.value.substring(0,2); >+ >+ var doc = opener.document; >+ var field = doc.getElementById("[% index %]"); >+ >+ field.value = document.f_pop.f1.value+document.f_pop.f2.value+document.f_pop.f3.value+document.f_pop.f4.value; >+ window.close(); >+ return false; >+ } >+//]]> >+</script> >+ >+[% INCLUDE 'popup-bottom.inc' %] >-- >1.7.7.6
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 13203
:
33245
|
33289
|
33292
|
33299
|
33347