From 719e120c6289f07a135c1d614542cb6a5d1d7afa Mon Sep 17 00:00:00 2001 From: Katrin Fischer <katrin.fischer.83@web.de> Date: Sat, 7 Oct 2023 19:36:56 +0000 Subject: [PATCH] Bug 3007: Remove unimarc_field_700-4.pl value builder I tried translating it, found it not working and replaced by the annif authorised value list with relator terms/codes. To test: * Make sure the unimarc_field_700-4.pl is no longer listed in frameworks. * Make sure it's not used in the standard frameworks. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> --- .../value_builder/unimarc_field_700-4.pl | 71 ---------------- .../value_builder/unimarc_field_700-4.tt | 84 ------------------- 2 files changed, 155 deletions(-) delete mode 100755 cataloguing/value_builder/unimarc_field_700-4.pl delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_700-4.tt diff --git a/cataloguing/value_builder/unimarc_field_700-4.pl b/cataloguing/value_builder/unimarc_field_700-4.pl deleted file mode 100755 index b13b202b8c..0000000000 --- a/cataloguing/value_builder/unimarc_field_700-4.pl +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/perl - -# written 10/5/2002 by Paul - -# Copyright 2000-2002 Katipo Communications -# -# 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 <http://www.gnu.org/licenses>. - -use Modern::Perl; - -use C4::Auth qw( get_template_and_user ); -use CGI qw ( -utf8 ); -use C4::Context; - -use C4::Search; -use C4::Output qw( output_html_with_http_headers ); - -sub plugin_javascript { -my ($dbh,$record,$tagslib,$field_number) = @_; -my $function_name= $field_number; -my $res = " -<script> -function Clic$function_name(event) { - event.preventDefault(); - defaultvalue=document.getElementById(event.data.id).value; - newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_700-4.pl&result=\"+defaultvalue+\"&index=\" + event.data.id, \"value_builder\",'width=500,height=400,toolbar=false,scrollbars=yes'); - -} -</script> -"; - -return ($function_name,$res); -} - -sub plugin { -my ($input) = @_; - my $index= $input->param('index'); - my $index2= $input->param('index2'); - $index2=-1 unless($index2); - my $result= $input->param('result'); - - - my $dbh = C4::Context->dbh; - - my ($template, $loggedinuser, $cookie) = get_template_and_user( - { - template_name => "cataloguing/value_builder/unimarc_field_700-4.tt", - query => $input, - type => "intranet", - flagsrequired => { editcatalogue => '*' }, - } - ); - $template->param(index => $index, - index2 => $index2, - "f1_$result" => "f1_".$result, - ); - output_html_with_http_headers $input, $cookie, $template->output; -} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_700-4.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_700-4.tt deleted file mode 100644 index 8c87bb7527..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_700-4.tt +++ /dev/null @@ -1,84 +0,0 @@ -[% USE raw %] -[% PROCESS 'i18n.inc' %] -[% SET footerjs = 1 %] -[% INCLUDE 'doc-head-open.inc' %] -<title>[% FILTER collapse %] - [% t("UNIMARC field 700-4 builder") | html %] - [% t("Cataloging") | html %] › - [% t("Koha") | html %] -[% END %]</title> -[% INCLUDE 'doc-head-close.inc' %] -</head> - -<body id="cat_unimarc_field_700-4" class="cat value_builder"> - <h1>UNIMARC field 700-4 builder</h1> - <p>Sélectionnez la valeur pour le champ 700 $4. Elle sera automatiquement reportée dans la zone 700 $8 qui suit.</p> - <form name="f_pop" onsubmit="report()" action=""> - <div class="page-section"> - <table> - <tr> - <td><label for="f1">Code date publication </label></td><td><select name="f1" id="f1"> - [% IF ( f1_075 ) %] - <option value="075 - postface" selected="selected">postface</option> - [% ELSE %] - <option value="075 - postface">postface</option> - [% END %] - - [% IF ( f1_651 ) %] - <option value="651 - dir. de publication" selected="selected">dir. de publication</option> - [% ELSE %] - <option value="651 - dir. de publication">dir. de publication</option> - [% END %] - - [% IF ( f1_440 ) %] - <option value="440 - illustrateur" selected="selected">illustrateur</option> - [% ELSE %] - <option value="440 - illustrateur">illustrateur</option> - [% END %] - - [% IF ( f1_080 ) %] - <option value="080 - préface, notes" selected="selected">préface, notes</option> - [% ELSE %] - <option value="080 - préface, notes">préface, notes</option> - [% END %] - - [% IF ( f1_730 ) %] - <option value="730 - traducteur" selected="selected">traducteur</option> - [% ELSE %] - <option value="730 - traducteur">traducteur</option> - [% END %] - </select> - </td> - </tr> - </table> - </div> <!-- /.page-section --> - - <nav class="navbar navbar-default navbar-fixed-bottom"> - <div class="container-fluid"> - <fieldset class="action"> - <input type="submit" class="btn btn-primary" value="Save" /> - <button class="btn btn-default close_window">Cancel</button> - </fieldset> - </div> - </nav> - - </form> - -[% MACRO jsinclude BLOCK %] - <script> - function report() { - x = document.f_pop.f1.value.split(' - '); - var doc = opener.document; - var field = doc.getElementById("[% index | html %]"); - - field.value = x[0]; - if ([% index2 | html %] > 0) { - opener.document.f.field_value[[% index2 | html %]].value= x[1]; - } - self.close(); - return false; - } - </script> -[% END %] - -[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] -- 2.42.0