9c71bf4227
In the template of the export tools, the value 'marc' is set for the 'format' variable. It should be 'iso2709'. There was a mess in the tools/export.pl script. 2 variables did the same thing: $format and $output_format This patch fixes that replacing $format with $output_format Test plan: Try to export biblio in iso2709 and csv using the export tools and from the checkout list. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Before applying the patch, attemping an MARC export from tools/export.pl resulted in an error. After the patch the export works correctly. Exports from the checkouts page also work correctly. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes tests and QA script. Also tested authority export. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
272 lines
9.6 KiB
Text
272 lines
9.6 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › MARC export</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function() {
|
|
$('#exporttype').tabs();
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body id="tools_export" class="tools">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › MARC export</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<div id="exporttype" class="toptabs">
|
|
<ul>
|
|
<li><a href="#bibs">Export bibliographic records</a></li>
|
|
<li><a href="#auths">Export authority records</a></li>
|
|
[% IF ( allow_db_export ) %]
|
|
<li><a href="#db">Export database</a></li>
|
|
[% END %]
|
|
[% IF ( allow_conf_export ) %]
|
|
<li><a href="#conf">Export configuration</a></li>
|
|
[% END %]
|
|
</ul>
|
|
<div id="bibs">
|
|
<p>
|
|
<b>Note : The items are exported by this tool unless specified.</b>
|
|
</p>
|
|
|
|
<form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
|
|
<fieldset class="rows">
|
|
<legend> Select records to export </legend>
|
|
<ol><li>
|
|
<label for="start">From biblio number: </label>
|
|
<input id="start" type="text" name="StartingBiblionumber" size="5" />
|
|
</li>
|
|
<li>
|
|
<label for="end">To biblio number: </label>
|
|
<input id="end" type="text" name="EndingBiblionumber" size="5" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="itemtype">Item type: </label>
|
|
<select name="itemtype" id="itemtype">
|
|
<option value="">-- All --</option>
|
|
[% FOREACH itemtypeloo IN itemtypeloop %]
|
|
[% IF ( itemtypeloo.selected ) %]
|
|
<option value="[% itemtypeloo.value %]" selected="selected">[% itemtypeloo.description %]</option>
|
|
[% ELSE %]
|
|
<option value="[% itemtypeloo.value %]">[% itemtypeloo.description %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="branch">Library: </label>
|
|
<select id="branch" name="branch">
|
|
<option value="">-- All --</option>
|
|
[% FOREACH branchloo IN branchloop %]
|
|
[% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
|
|
[% ELSE %]
|
|
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="startcn">From item call number: </label>
|
|
<input id="startcn" type="text" name="start_callnumber" size="5" />
|
|
</li>
|
|
<li>
|
|
<label for="endcn">To item call number: </label>
|
|
<input id="endcn" type="text" name="end_callnumber" size="5" />
|
|
</li>
|
|
<li>Accession date (inclusive):
|
|
<ul><li>
|
|
<label for="from">Start date:</label>
|
|
<input type="text" size="10" id="from" name="start_accession" value="[% from %]" class="datepickerfrom" />
|
|
</li>
|
|
<li><label for="to">
|
|
End date:
|
|
</label>
|
|
<input size="10" id="to" name="end_accession" value="[% end_accession %]" type="text" class="datepickerto" />
|
|
</li>
|
|
</ul></li></ol>
|
|
</fieldset>
|
|
<fieldset class="rows">
|
|
<legend>
|
|
Use a file
|
|
</legend>
|
|
<ol>
|
|
<li>File containing a list of biblio numbers with one biblio number per line. This list works as a filter: it is compatible with other parameters.</li>
|
|
<li><label for="id_list_file">File : </label> <input type="file" id="id_list_file" name="id_list_file" /></li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="rows">
|
|
<legend> Options</legend>
|
|
<ol> <li>
|
|
<label for="dont_export_item">Don't export items</label>
|
|
<input id="dont_export_item" type="checkbox" name="dont_export_item" />
|
|
</li>
|
|
<li>
|
|
<label for="strip_nonlocal_items">Remove non-local items</label>
|
|
<input id="strip_nonlocal_items" type="checkbox" name="strip_nonlocal_items" />
|
|
</li>
|
|
<li>
|
|
<label for="export_remove_fields">Don't export fields</label>
|
|
<input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields %]" />
|
|
separate by a blank. (e.g., 100a 200 606)
|
|
</li></ol>
|
|
</fieldset>
|
|
<fieldset class="rows">
|
|
<legend>
|
|
Output format
|
|
</legend>
|
|
<ol><li>
|
|
<label for="output_format">File format: </label>
|
|
<select id="output_format" name="output_format">
|
|
<option value="iso2709">marc</option>
|
|
<option value="xml">xml</option>
|
|
</select>
|
|
|
|
</li>
|
|
<li>
|
|
<label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
|
|
</li></ol>
|
|
</fieldset>
|
|
<input type="hidden" name="op" value="export" />
|
|
<input type="hidden" name="record_type" value="bibs" />
|
|
|
|
<fieldset class="action"><input type="submit" value="Export bibliographic records" class="button" /></fieldset>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="auths">
|
|
<form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
|
|
<fieldset class="rows">
|
|
<legend> Select records to export </legend>
|
|
<ol><li>
|
|
<label for="start">From authid: </label>
|
|
<input id="start" type="text" name="starting_authid" size="6" />
|
|
</li>
|
|
<li>
|
|
<label for="end">To authid: </label>
|
|
<input id="end" type="text" name="ending_authid" size="6" />
|
|
</li>
|
|
<li>
|
|
<label for="authtype">Authority type: </label>
|
|
<select name="authtype" id="authtype">
|
|
<option value="">-- All --</option>
|
|
[% FOREACH authtypeloo IN authtypeloop %]
|
|
[% IF ( authtypeloo.selected ) %]
|
|
<option value="[% authtypeloo.value %]" selected="selected">[% authtypeloo.description %]</option>
|
|
[% ELSE %]
|
|
<option value="[% authtypeloo.value %]">[% authtypeloo.description %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="rows">
|
|
<legend>
|
|
Use a file
|
|
</legend>
|
|
<ol>
|
|
<li>File containing a list of authids with one authid per line. This list works as a filter: it is compatible with other parameters.</li>
|
|
<li><label for="id_list_file">File : </label> <input type="file" id="id_list_file" name="id_list_file" /></li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="rows">
|
|
<legend>Options</legend>
|
|
<ol>
|
|
<li>
|
|
<label for="export_remove_fields">Don't export fields</label>
|
|
<input id="export_remove_fields" type="text" name="export_remove_fields" />
|
|
separate by a blank. (e.g., 100a 200 606)
|
|
</li></ol>
|
|
</fieldset>
|
|
<fieldset class="rows">
|
|
<legend>Output format</legend>
|
|
<ol><li>
|
|
<label for="output_format">File format: </label>
|
|
<select id="output_format" name="output_format">
|
|
<option value="marc">marc</option>
|
|
<option value="xml">xml</option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
|
|
</li></ol>
|
|
</fieldset>
|
|
<input type="hidden" name="op" value="export" />
|
|
<input type="hidden" name="record_type" value="auths" />
|
|
|
|
<fieldset class="action"><input type="submit" value="Export authority records" class="button" /></fieldset>
|
|
</form>
|
|
</div>
|
|
|
|
[% IF ( allow_db_export ) %]
|
|
<div id="db">
|
|
<form method="post" action="/cgi-bin/koha/tools/export.pl">
|
|
<p><b>Note : This export file will be very large, and is generated nightly.</b></p>
|
|
<fieldset class="rows">
|
|
<legend> Choose a file </legend>
|
|
[% IF ( dbfiles && (dbfiles.size > 0) ) %]
|
|
<ul>
|
|
[% FOREACH dbfile IN dbfiles %]
|
|
<li><input type="radio" name="filename" value="[% dbfile %]">[% dbfile %]</input></li>
|
|
[% END %]
|
|
</ul>
|
|
[% ELSE %]
|
|
<p>Unfortunately, no backups are available.</p>
|
|
[% END %]
|
|
</fieldset>
|
|
|
|
[% IF ( dbfiles && (dbfiles.size > 0) ) %]
|
|
<input type="hidden" name="op" value="export" />
|
|
<input type="hidden" name="record_type" value="db" />
|
|
<fieldset class="action"><input type="submit" value="Download database" class="button" /></fieldset>
|
|
[% END %]
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF ( allow_conf_export ) %]
|
|
<div id="conf">
|
|
<form method="post" action="/cgi-bin/koha/tools/export.pl">
|
|
<p><b>Note : This export file will be very large, and is generated nightly.</b></p>
|
|
<fieldset class="rows">
|
|
<legend> Choose a file </legend>
|
|
[% IF ( conffiles && (conffiles.size > 0) ) %]
|
|
<ul>
|
|
[% FOREACH conffile IN conffiles %]
|
|
<li><input type="radio" name="filename" value="[% conffile %]">[% conffile %]</input></li>
|
|
[% END %]
|
|
</ul>
|
|
[% ELSE %]
|
|
<p>Unfortunately, no backups are available.</p>
|
|
[% END %]
|
|
</fieldset>
|
|
|
|
[% IF ( conffiles && (conffiles.size > 0) ) %]
|
|
<input type="hidden" name="op" value="export" />
|
|
<input type="hidden" name="record_type" value="conf" />
|
|
<fieldset class="action"><input type="submit" value="Download configuration" class="button" /></fieldset>
|
|
[% END %]
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b noprint">
|
|
[% INCLUDE 'tools-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|