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,
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);
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,
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);
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;
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
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",
--- /dev/null
+[% 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() {
+ var f2= "000" + document.f_pop.f2.value;
+ f2 = f2.substring(f2.length-3);
+ var f3= "00" + document.f_pop.f3.value;
+ f3 = f3.substring(f3.length-2);
+ var f4= "00" + document.f_pop.f4.value;
+ f4 = f4.substring(f4.length-2);
+ var doc = opener.document;
+ var field = doc.getElementById("[% index %]");
+ field.value = document.f_pop.f1.value+ f2 + f3 + f4;
+ window.close();
+ return false;
+ }
+//]]>
+</script>
+
+[% INCLUDE 'popup-bottom.inc' %]