From ed61bd9bba8925373241abd9f582c240695f8ce5 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 8 Sep 2015 11:32:27 +0200 Subject: [PATCH] Bug 14793: New cataloguing plugin unimarc_field_225a_bis It is similar to unimarc_field_210c_bis, but searches in biblioitems.collectiontitle instead of biblioitems.publishercode Signed-off-by: Laurence Rault Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall --- .../value_builder/unimarc_field_225a_bis.pl | 63 +++++++++++++++++++ .../value_builder/unimarc_field_225a_bis.tt | 63 +++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100755 cataloguing/value_builder/unimarc_field_225a_bis.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a_bis.tt diff --git a/cataloguing/value_builder/unimarc_field_225a_bis.pl b/cataloguing/value_builder/unimarc_field_225a_bis.pl new file mode 100755 index 0000000000..8bfa488d1b --- /dev/null +++ b/cataloguing/value_builder/unimarc_field_225a_bis.pl @@ -0,0 +1,63 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +=head1 SYNOPSIS + +This plugin is used to fill 225$a with a value already existing in +biblioitems.collectiontitle + +=cut + +use Modern::Perl; + +use C4::Auth; +use CGI qw( -utf8 ); +use C4::Context; + +use C4::Output; + +sub plugin_javascript { + my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_; + my $function_name = $field_number; + my $res = " + +"; + + return ( $function_name, $res ); +} + +sub plugin { + my ($input) = @_; + my $index = $input->param('index'); + + my ($template, $loggedinuser, $cookie) = get_template_and_user({ + template_name => "cataloguing/value_builder/unimarc_field_225a_bis.tt", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { editcatalogue => '*' }, + debug => 1, + }); + + $template->param(index => $index); + + output_html_with_http_headers $input, $cookie, $template->output; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a_bis.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a_bis.tt new file mode 100644 index 0000000000..c3fa5505ef --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_225a_bis.tt @@ -0,0 +1,63 @@ +[% INCLUDE 'doc-head-open.inc' %] +Koha › UNIMARC field 225a builder +[% INCLUDE 'doc-head-close.inc' %] + + + + + +
+
+

UNIMARC field 225a builder

+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ + + +[% INCLUDE 'popup-bottom.inc' %] -- 2.39.5