Bug 14201: We can do without plugin marc21_leader_computerfile
A closer look at this plugin revealed the same things as the previous patch for leader_book. [1] Template leader_computerfile is not used. [2] The unused template is not up-to-date either. [3] Leader_computerfile does not use Focus while leader does. This patch removes all traces of leader_computerfile. It includes a tiny db revision for those brave people using it. The only behavior change for them is the focus change. Test plan: [1] Run the db revision. [2] Check if the leader plugin still works as expected. [3] Git grep on marc21_leader_computerfile. Ignore PO files. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This commit is contained in:
parent
4c2e4cd0ab
commit
1203a93c87
3 changed files with 2 additions and 431 deletions
|
@ -1,91 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Converted to new plugin style (Bug 13437)
|
||||
|
||||
# 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;
|
||||
use CGI qw ( -utf8 );
|
||||
use C4::Context;
|
||||
|
||||
use C4::Search;
|
||||
use C4::Output;
|
||||
|
||||
my $builder = sub {
|
||||
my ( $params ) = @_;
|
||||
my $function_name = $params->{id};
|
||||
my $res = "
|
||||
<script type=\"text/javascript\">
|
||||
//<![CDATA[
|
||||
|
||||
function Click$function_name(event) {
|
||||
defaultvalue=document.getElementById(event.data.id).value;
|
||||
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader.pl&index=\"+ event.data.id +\"&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
|
||||
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
";
|
||||
|
||||
return $res;
|
||||
};
|
||||
|
||||
my $launcher = sub {
|
||||
my ( $params ) = @_;
|
||||
my $input = $params->{cgi};
|
||||
my $index = $input->param('index');
|
||||
my $result = $input->param('result');
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{ template_name => "cataloguing/value_builder/marc21_leader_computerfile.tt",
|
||||
query => $input,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { editcatalogue => '*' },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
$result = " nmm 7a " unless $result;
|
||||
my $f5 = substr( $result, 5, 1 );
|
||||
my $f6 = substr( $result, 6, 1 );
|
||||
my $f7 = substr( $result, 7, 1 );
|
||||
my $f8 = substr( $result, 8, 1 );
|
||||
my $f9 = substr( $result, 9, 1 );
|
||||
my $f17 = substr( $result, 17, 1 );
|
||||
my $f18 = substr( $result, 18, 1 );
|
||||
my $f19 = substr( $result, 19, 1 );
|
||||
|
||||
$template->param(
|
||||
index => $index,
|
||||
"f5$f5" => 1,
|
||||
"f6$f6" => 1,
|
||||
"f7$f7" => 1,
|
||||
"f8$f8" => 1,
|
||||
"f9$f9" => 1,
|
||||
"f17$f17" => 1,
|
||||
"f18$f18" => 1,
|
||||
"f19$f19" => 1,
|
||||
);
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
};
|
||||
|
||||
return { builder => $builder, launcher => $launcher };
|
|
@ -0,0 +1,2 @@
|
|||
-- move marc21_leader_computerfile to marc21_leader
|
||||
update marc_subfield_structure set value_builder='marc21_leader.pl' where value_builder='marc21_leader_computerfile.pl';
|
|
@ -1,340 +0,0 @@
|
|||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Cataloging › Leader builder</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
</head>
|
||||
<body id="cat_marc21_leader_computerfile" class="cat" style="padding:1em;">
|
||||
<h3>000 - Leader</h3>
|
||||
<form name="f_pop" onsubmit="report()" action="">
|
||||
<input type="hidden" name="plugin_name" value="marc21_leader_computerfile.pl" />
|
||||
<table>
|
||||
<tr>
|
||||
<td>1-4 Record size</td>
|
||||
<td>(auto-filled)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="f5">5- Record status</label></td>
|
||||
<td>
|
||||
<select name="f5" id="f5" size="1">
|
||||
[% IF ( f5a ) %]
|
||||
<option value=" " selected="selected">a- Increase in encoding level</option>
|
||||
[% ELSE %]
|
||||
<option value=" ">a- Increase in encoding level</option>
|
||||
[% END %]
|
||||
|
||||
[% IF ( f5c ) %]
|
||||
<option value="c" selected="selected">c- Corrected or revised</option>
|
||||
[% ELSE %]
|
||||
<option value="c">c- Corrected or revised</option>
|
||||
[% END %]
|
||||
[% IF ( f5d ) %]
|
||||
<option value="d" selected="selected">d- Deleted</option>
|
||||
[% ELSE %]
|
||||
<option value="d">d- Deleted</option>
|
||||
[% END %]
|
||||
[% IF ( f5n ) %]
|
||||
<option value="n" selected="selected">n- New</option>
|
||||
[% ELSE %]
|
||||
<option value="n">n- New</option>
|
||||
[% END %]
|
||||
[% IF ( f5p ) %]
|
||||
<option value="p" selected="selected">p- Increase in encoding level from prepublication</option>
|
||||
[% ELSE %]
|
||||
<option value="p">p- Increase in encoding level from prepublication</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="f6">6- Type of record</label></td>
|
||||
<td>
|
||||
<select name="f6" id="f6" size="1">
|
||||
[% IF ( f6a ) %]
|
||||
<option value="a" selected="selected">a- Language material (monography)</option>
|
||||
[% ELSE %]
|
||||
<option value="a">a- Language material (monography)</option>
|
||||
[% END %]
|
||||
[% IF ( f6c ) %]
|
||||
<option value="c" selected="selected">c- Notated music</option>
|
||||
[% ELSE %]
|
||||
<option value="c">c- Notated music</option>
|
||||
[% END %]
|
||||
[% IF ( f6d ) %]
|
||||
<option value="d" selected="selected">d- Manuscript notated music</option>
|
||||
[% ELSE %]
|
||||
<option value="d">d- Manuscript notated music</option>
|
||||
[% END %]
|
||||
[% IF ( f6e ) %]
|
||||
<option value="e" selected="selected">e- Cartographic material</option>
|
||||
[% ELSE %]
|
||||
<option value="e">e- Cartographic material</option>
|
||||
[% END %]
|
||||
[% IF ( f6f ) %]
|
||||
<option value="f" selected="selected">f - Manuscript cartographic material</option>
|
||||
[% ELSE %]
|
||||
<option value="f">f - Manuscript cartographic material</option>
|
||||
[% END %]
|
||||
[% IF ( f6g ) %]
|
||||
<option value="g" selected="selected">g - Projected medium</option>
|
||||
[% ELSE %]
|
||||
<option value="g">g - Projected medium</option>
|
||||
[% END %]
|
||||
[% IF ( f6i ) %]
|
||||
<option value="i" selected="selected">i - Nonmusical sound recording</option>
|
||||
[% ELSE %]
|
||||
<option value="i">i - Nonmusical sound recording</option>
|
||||
[% END %]
|
||||
[% IF ( f6j ) %]
|
||||
<option value="j" selected="selected">j - Musical sound recording</option>
|
||||
[% ELSE %]
|
||||
<option value="j">j - Musical sound recording</option>
|
||||
[% END %]
|
||||
[% IF ( f6k ) %]
|
||||
<option value="k" selected="selected">k - Two-dimensional nonprojectable graphic</option>
|
||||
[% ELSE %]
|
||||
<option value="k">k - Two-dimensional nonprojectable graphic</option>
|
||||
[% END %]
|
||||
[% IF ( f6m ) %]
|
||||
<option value="m" selected="selected">m - Computer file</option>
|
||||
[% ELSE %]
|
||||
<option value="m">m - Computer file</option>
|
||||
[% END %]
|
||||
[% IF ( f6o ) %]
|
||||
<option value="o" selected="selected">o - Kit</option>
|
||||
[% ELSE %]
|
||||
<option value="o">o - Kit</option>
|
||||
[% END %]
|
||||
[% IF ( f6r ) %]
|
||||
<option value="r" selected="selected">r - Three-dimensional artifact or naturally occurring object</option>
|
||||
[% ELSE %]
|
||||
<option value="r">r - Three-dimensional artifact or naturally occurring object</option>
|
||||
[% END %]
|
||||
[% IF ( f6t ) %]
|
||||
<option value="t" selected="selected">t - Manuscript language material</option>
|
||||
[% ELSE %]
|
||||
<option value="t">t - Manuscript language material</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="f7">7- Bibliographic level</label></td>
|
||||
<td>
|
||||
<select name="f7" id="f7" size="1">
|
||||
[% IF ( f7a ) %]
|
||||
<option value="a" selected="selected">a- Monographic component part</option>
|
||||
[% ELSE %]
|
||||
<option value="a">a- Monographic component part</option>
|
||||
[% END %]
|
||||
[% IF ( f7b ) %]
|
||||
<option value="b" selected="selected">b- Serial component part</option>
|
||||
[% ELSE %]
|
||||
<option value="b">a- Serial component part</option>
|
||||
[% END %]
|
||||
[% IF ( f7c ) %]
|
||||
<option value="c" selected="selected">c- Collection</option>
|
||||
[% ELSE %]
|
||||
<option value="c">c- Collection</option>
|
||||
[% END %]
|
||||
[% IF ( f7d ) %]
|
||||
<option value="d" selected="selected">d- Subunit</option>
|
||||
[% ELSE %]
|
||||
<option value="d">d- Subunit</option>
|
||||
[% END %]
|
||||
[% IF ( f7i ) %]
|
||||
<option value="i" selected="selected">i- Integrating resource</option>
|
||||
[% ELSE %]
|
||||
<option value="i">i- Integrating resource</option>
|
||||
[% END %]
|
||||
[% IF ( f7m ) %]
|
||||
<option value="m" selected="selected">m- Monograph/item</option>
|
||||
[% ELSE %]
|
||||
<option value="m">m- Monograph/item</option>
|
||||
[% END %]
|
||||
[% IF ( f7s ) %]
|
||||
<option value="s" selected="selected">s- Serial</option>
|
||||
[% ELSE %]
|
||||
<option value="s">s- Serial</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="f8">8- Hierarchic level</label></td>
|
||||
<td>
|
||||
<select name="f8" id="f8" size="1">
|
||||
[% IF ( f8 ) %]
|
||||
<option value=" " selected="selected">No specific type</option>
|
||||
[% ELSE %]
|
||||
<option value=" ">No specific type</option>
|
||||
[% END %]
|
||||
[% IF ( f8a ) %]
|
||||
<option value="a" selected="selected">a- Archival</option>
|
||||
[% ELSE %]
|
||||
<option value="a">a- Archival</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="f9">9- Encoding</label></td>
|
||||
<td>
|
||||
<select name="f9" id="f9" size="1">
|
||||
[% IF ( f9 ) %]
|
||||
<option value=" " selected="selected">MARC-8</option>
|
||||
[% ELSE %]
|
||||
<option value=" ">MARC-8</option>
|
||||
[% END %]
|
||||
[% IF ( f9a ) %]
|
||||
<option value="a" selected="selected">a- UCS/Unicode</option>
|
||||
[% ELSE %]
|
||||
<option value="a">a- UCS/Unicode</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10-16 indicator/subfields/size</td>
|
||||
<td>(auto-filled)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="f17">17- Encoding</label></td>
|
||||
<td>
|
||||
<select name="f17" id="f17" size="1">
|
||||
[% IF ( f17 ) %]
|
||||
<option value=" " selected="selected">full level</option>
|
||||
[% ELSE %]
|
||||
<option value=" ">Full level</option>
|
||||
[% END %]
|
||||
[% IF ( f171 ) %]
|
||||
<option value="1" selected="selected">1- Full level, material not examined</option>
|
||||
[% ELSE %]
|
||||
<option value="1">1- Full level, material not examined</option>
|
||||
[% END %]
|
||||
[% IF ( f172 ) %]
|
||||
<option value="2" selected="selected">2 - Less-than-full level, material not examined</option>
|
||||
[% ELSE %]
|
||||
<option value="2">2 - Less-than-full level, material not examined</option>
|
||||
[% END %]
|
||||
[% IF ( f173 ) %]
|
||||
<option value="3" selected="selected">3- Abbreviated level</option>
|
||||
[% ELSE %]
|
||||
<option value="3">3- Abbreviated level</option>
|
||||
[% END %]
|
||||
[% IF ( f174 ) %]
|
||||
<option value="4" selected="selected">4- Core level</option>
|
||||
[% ELSE %]
|
||||
<option value="4">4- Core level</option>
|
||||
[% END %]
|
||||
[% IF ( f175 ) %]
|
||||
<option value="5" selected="selected">5- Partial (preliminary) level</option>
|
||||
[% ELSE %]
|
||||
<option value="5">5- Partial (preliminary) level</option>
|
||||
[% END %]
|
||||
[% IF ( f177 ) %]
|
||||
<option value="7" selected="selected">7- Minimal level</option>
|
||||
[% ELSE %]
|
||||
<option value="7">7- Minimal level</option>
|
||||
[% END %]
|
||||
[% IF ( f178 ) %]
|
||||
<option value="8" selected="selected">8- Prepublication level</option>
|
||||
[% ELSE %]
|
||||
<option value="8">8- Prepublication level</option>
|
||||
[% END %]
|
||||
[% IF ( f17u ) %]
|
||||
<option value="u" selected="selected">u - Unknown</option>
|
||||
[% ELSE %]
|
||||
<option value="u">u - Unknown</option>
|
||||
[% END %]
|
||||
[% IF ( f17z ) %]
|
||||
<option value="z" selected="selected">z- Not applicable</option>
|
||||
[% ELSE %]
|
||||
<option value="z">z- Not applicableFull level</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="f18">18 - Descriptive cataloging form</label></td>
|
||||
<td>
|
||||
<select name="f18" id="f18" size="1">
|
||||
[% IF ( f18 ) %]
|
||||
<option value=" " selected="selected">Non-ISBD</option>
|
||||
[% ELSE %]
|
||||
<option value=" ">Non-ISBD</option>
|
||||
[% END %]
|
||||
[% IF ( f18a ) %]
|
||||
<option value="a" selected="selected">a- AACR 2</option>
|
||||
[% ELSE %]
|
||||
<option value="a">a- AACR 2</option>
|
||||
[% END %]
|
||||
[% IF ( f18c ) %]
|
||||
<option value="c" selected="selected">c- ISBD punctuation omitted</option>
|
||||
[% ELSE %]
|
||||
<option value="c">c- ISBD punctuation omitted</option>
|
||||
[% END %]
|
||||
[% IF ( f18i ) %]
|
||||
<option value="i" selected="selected">i- ISBD punctuation included</option>
|
||||
[% ELSE %]
|
||||
<option value="i">i- ISBD punctuation included</option>
|
||||
[% END %]
|
||||
[% IF ( f18u ) %]
|
||||
<option value="u" selected="selected">u- Unknown</option>
|
||||
[% ELSE %]
|
||||
<option value="u">u- Unknown</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="f19">19 - Linked record requirement</label></td>
|
||||
<td>
|
||||
<select name="f19" id="f19" size="1">
|
||||
[% IF ( f19 ) %]
|
||||
<option value=" " selected="selected">Related record not required</option>
|
||||
[% ELSE %]
|
||||
<option value=" ">Related record not required</option>
|
||||
[% END %]
|
||||
[% IF ( f18r ) %]
|
||||
<option value="r" selected="selected">r- Related record required</option>
|
||||
[% ELSE %]
|
||||
<option value="r">r- Related record required</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20-24 entry map & lengths</td>
|
||||
<td>(auto-filled)</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<fieldset class="action"><input type="submit" value="OK" /> <a href="#" class="cancel close">Cancel</a></fieldset>
|
||||
</form>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
function report() {
|
||||
var doc = opener.document;
|
||||
var field = doc.getElementById("[% index %]");
|
||||
|
||||
field.value =
|
||||
' '+
|
||||
document.f_pop.f5.value +
|
||||
document.f_pop.f6.value+
|
||||
document.f_pop.f7.value+
|
||||
document.f_pop.f8.value+
|
||||
document.f_pop.f9.value+
|
||||
'22 '+
|
||||
document.f_pop.f17.value+
|
||||
document.f_pop.f18.value+
|
||||
document.f_pop.f19.value+
|
||||
'4500';
|
||||
self.close();
|
||||
return false;
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
[% INCLUDE 'popup-bottom.inc' %]
|
Loading…
Reference in a new issue