Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl
Galen Charlton ae5b76c89b bug 2157: add ability to 'clean' staged record batches
batches, it is now possible to 'clean' a batch by
removing all bib and item records staged in the batch.  This
has the effect of helping to reduce database space used
by old import batches as well as removing staged records
from the cataloging reservoir search.  Note that 'cleaning'
a batch affects only the copies of the records that were staged;
if the batch was committed, cleaning the batch does not
affect any bibs and items that were committed into the catalog.

Also note that once you clean a committed batch of records, it is
impossible to undo the previous commit operation.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-10 20:34:55 -04:00

306 lines
13 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Tools &rsaquo; Manage Staged MARC Records
<!-- TMPL_IF name="import_batch_id" -->
&rsaquo; Batch <!-- TMPL_VAR name="import_batch_id" -->
<!-- /TMPL_IF -->
</title>
<!-- TMPL_INCLUDE NAME="greybox.inc" -->
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="background-job.inc" -->
<style type="text/css">
#jobpanel,#jobstatus,#jobfailed { display : none; }
#jobstatus { margin:.4em; }
#jobprogress{ width:200px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; }</style>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
<!-- TMPL_IF name="import_batch_id" -->
&rsaquo;
<a href="<!-- TMPL_VAR name="script_name"-->">Manage Staged MARC Records</a>
&rsaquo; Batch <!-- TMPL_VAR name="import_batch_id" -->
<!-- TMPL_ELSE -->
&rsaquo; Manage Staged MARC Records
<!-- /TMPL_IF -->
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h1>Manage Staged MARC Records
<!-- TMPL_IF name="import_batch_id" -->
&rsaquo; Batch <!-- TMPL_VAR name="import_batch_id" -->
<!-- /TMPL_IF -->
</h1>
<!-- TMPL_IF name="label_batch" -->
<div class="dialog message">
<p>Label batch created, with id: <!-- TMPL_VAR name="label_batch" --> </p>
</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="did_clean" -->
<div class="dialog message">Cleaned import batch #<!-- TMPL_VAR name="import_batch_id" --></div>
<!-- /TMPL_IF -->
<!-- TMPL_UNLESS name="batch_list" -->
<!-- TMPL_UNLESS name="batch_info" -->
<span class="problem">No records have been staged.</span>
<a href="/cgi-bin/koha/tools/stage-marc-import.pl">Stage MARC records for import</a>.
<!-- /TMPL_UNLESS -->
<!-- /TMPL_UNLESS -->
<!-- TMPL_IF name="batch_info" -->
<fieldset class="rows">
<ol>
<li><span class="label">File name</span> <!-- TMPL_VAR name="file_name" --></li>
<li><span class="label">Comments</span> <!-- TMPL_IF NAME="comments" --><!-- TMPL_VAR name="comments" -->(none)<!-- /TMPL_IF --></li>
<li><span class="label">Staged</span> <!-- TMPL_VAR name="upload_timestamp" --></li>
<li><span class="label">Status</span> <!-- TMPL_VAR name="import_status" --></li>
<li><span class="label">Matching rule applied</span>
<!-- TMPL_IF name="current_matcher_id" -->
<!-- TMPL_VAR name="current_matcher_code" --> (<!-- TMPL_VAR name="current_matcher_description" -->)
<!-- TMPL_ELSE -->
No matching rule in effect
<!-- /TMPL_IF -->
</li>
<li><span class="label">Action if matching record found</span> <!-- TMPL_VAR NAME="overlay_action" --></li>
<li><span class="label">Action if no match found</span> <!-- TMPL_VAR NAME="nomatch_action" --></li>
<li><span class="label">Item processing</span> <!-- TMPL_VAR NAME="item_action" --></li>
</ol>
</fieldset>
<!-- TMPL_IF name="can_commit" -->
<div id="matchingrules">
<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
<fieldset class="rows">
<input type="hidden" name="op" value="redo-matching" />
<input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
<input type="hidden" name="current_matcher_id" value="<!-- TMPL_VAR name="current_matcher_id" -->" />
<ol>
<li><label for="new_matcher_id">New matching rule</label>
<select name="new_matcher_id" id="new_matcher_id">
<option value="">Do not look for matching records</option>
<!-- TMPL_LOOP name="available_matchers" -->
<!-- TMPL_IF name="selected" -->
<option value="<!-- TMPL_VAR name="matcher_id" -->" selected="selected">
<!-- TMPL_VAR name="code" --> (<!-- TMPL_VAR name="description" -->)
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR name="matcher_id" -->">
<!-- TMPL_VAR name="code" --> (<!-- TMPL_VAR name="description" -->)
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<li><label for="overlay_action">Action if matching record found</label>
<!-- TMPL_INCLUDE NAME="tools-overlay-action.inc" -->
</li>
<li><label for="overlay_action">Action if no match found</label>
<!-- TMPL_INCLUDE NAME="tools-nomatch-action.inc" -->
</li>
<li><label for="overlay_action">Item processing</label>
<!-- TMPL_INCLUDE NAME="tools-item-action.inc" -->
</li>
</ol>
<fieldset class="action"><input type="submit" class="button" value="Apply different matching rule" /></fieldset>
</fieldset>
</form>
<!-- TMPL_IF name="rematch_attempted" -->
<!-- TMPL_IF name="rematch_failed" -->
<div class="dialog alert">Failed to apply different matching rule</div>
<!-- TMPL_ELSE -->
<div class="dialog message">Applied different matching rule. Number of records matched now
<!-- TMPL_VAR name="num_with_matches" -->
</div>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- TMPL_IF name="changed_overlay_action" -->
<div class="dialog message">Changed action if matching record found</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="changed_nomatch_action" -->
<div class="dialog message">Changed action if no match found</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="changed_item_action" -->
<div class="dialog message">Changed item processing option</div>
<!-- /TMPL_IF -->
</div>
<!-- /TMPL_IF -->
<div>
<!-- TMPL_IF name="can_commit" -->
<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
<input type="hidden" name="op" value="commit-batch" />
<input type="hidden" name="runinbackground" value="" />
<input type="hidden" name="completedJobID" value="" />
<input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
<fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Import into catalog" onclick="return submitBackgroundJob(this.form);" /></fieldset>
</form>
<div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
<div id="jobfailed"></div></div>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="can_revert" -->
<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
<input type="hidden" name="op" value="revert-batch" />
<input type="hidden" name="runinbackground" value="" />
<input type="hidden" name="completedJobID" value="" />
<input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
<fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Undo import into catalog" onclick="return submitBackgroundJob(this.form);" /></fieldset>
</form>
<div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
<div id="jobfailed"></div></div>
<!-- /TMPL_IF -->
</div>
<!-- TMPL_IF name="did_commit" -->
<div class="dialog message">Completed import of records</div>
<table>
<tr><td>Number of records added</td><td><!-- TMPL_VAR name="num_added" --></td></tr>
<tr><td>Number of records updated</td><td><!-- TMPL_VAR name="num_updated" --></td></tr>
<tr><td>Number of records ignored</td><td><!-- TMPL_VAR name="num_ignored" --></td></tr>
<tr><td>Number of items added</td><td><!-- TMPL_VAR name="num_items_added" --></td></tr>
<tr><td>Number of items ignored because of duplicate barcode</td><td><!-- TMPL_VAR name="num_items_errored" --></td></tr>
</table>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="did_revert" -->
<div class="dialog message">Undid import of records</div>
<table>
<tr><td>Number of records deleted</td><td><!-- TMPL_VAR name="num_deleted" --></td></tr>
<tr><td>Number of items deleted</td><td><!-- TMPL_VAR name="num_items_deleted" --></td></tr>
<tr><td>Number of records not deleted due to items on loan</td><td><!-- TMPL_VAR name="num_errors" --></td></tr>
<tr><td>Number of records changed back</td><td><!-- TMPL_VAR name="num_reverted" --></td></tr>
<tr><td>Number of records ignored</td><td><!-- TMPL_VAR name="num_ignored" --></td></tr>
</table>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<br style="clear:both;" />
<!-- TMPL_IF name="batch_list" -->
<!-- TMPL_IF name="pages" -->
<div class="pages">
Page
<!-- TMPL_LOOP name="pages" -->
<!-- TMPL_IF name="current_page" -->
<span class="current"><!-- TMPL_VAR name="page_number" --></span>
<!-- TMPL_ELSE -->
<a class="nav" href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</div>
<!-- /TMPL_IF -->
<table>
<tr>
<th>#</th>
<th>File name</th>
<th>Comments</th>
<th>Status</th>
<th>Staged</th>
<th># Bibs</th>
<th># Items</th>
<th>Action</th>
</tr>
<!-- TMPL_LOOP name="batch_list" -->
<tr>
<td><!-- TMPL_VAR name="import_batch_id" --></td>
<td><a href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->"><!-- TMPL_VAR name="file_name" --></a></td>
<td><!-- TMPL_VAR name="comments" --></td>
<td><!-- TMPL_VAR name="import_status" --></td>
<td><!-- TMPL_VAR name="upload_timestamp" --></td>
<td><!-- TMPL_VAR name="num_biblios" --></td>
<td><!-- TMPL_VAR name="num_items" --><!-- TMPL_IF NAME="num_items" --> <a href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&amp;op=create_labels">(Create Label Batch)</a><!-- /TMPL_IF --></td>
<td><!-- TMPL_IF name="can_clean" -->
<form method="POST" action="<!-- TMPL_VAR name="script_name" -->" name="clean_batch_<!-- TMPL_VAR name='import_batch_id'-->" id="clean_batch_<!-- TMPL_VAR name='import_batch_id'-->" >
<input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
<input type="hidden" name="op" value="clean-batch" />
<input type="submit" class="button" value="Clean" onclick="return confirm(_('Clear all reservoir records staged in this batch? This cannot be undone.'));" />
</form>
<!-- /TMPL_IF -->
</td>
</tr>
<!-- /TMPL_LOOP -->
</table>
<!-- TMPL_IF name="pages" -->
<div class="pages">
Page
<!-- TMPL_LOOP name="pages" -->
<!-- TMPL_IF name="current_page" -->
<span class="current"><!-- TMPL_VAR name="page_number" --></span>
<!-- TMPL_ELSE -->
<a class="nav" href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</div>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- TMPL_IF name="biblio_list" -->
<!-- TMPL_IF name="pages" -->
<div class="pages">
Page
<!-- TMPL_LOOP name="pages" -->
<!-- TMPL_IF name="current_page" -->
<span class="current"><!-- TMPL_VAR name="page_number" --></span>
<!-- TMPL_ELSE -->
<a class="nav" href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&amp;offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</div>
<!-- /TMPL_IF -->
<table>
<tr>
<th>#</th>
<th>Citation</th>
<th>Status</th>
<th>Match?</th>
<th>Bib</th>
</tr>
<!-- TMPL_LOOP name="biblio_list" -->
<tr>
<td><!-- TMPL_VAR name="record_sequence"--></td>
<td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR name='import_record_id' -->" rel="gb_page_center[600,500]"><!-- TMPL_VAR name="citation"--></a></td>
<td><!-- TMPL_VAR name="status"--></td>
<td><!-- TMPL_VAR name="overlay_status"--></td>
<td><!-- TMPL_IF name="final_match_biblionumber" -->
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name='final_match_biblionumber' -->"><!-- TMPL_VAR name="final_match_biblionumber"--></a>
<!-- /TMPL_IF -->
</td>
</tr>
<!-- TMPL_IF name="match_biblionumber" -->
<tr>
<td />
<td class="highlight" colspan="4">Matches biblio <!-- TMPL_VAR name="match_biblionumber" --> (score = <!-- TMPL_VAR name="match_score" -->): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="match_biblionumber" -->"><!-- TMPL_VAR name="match_citation" --></a></td>
</tr>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</table>
<!-- TMPL_IF name="pages" -->
<div class="pages">
Page
<!-- TMPL_LOOP name="pages" -->
<!-- TMPL_IF name="current_page" -->
<span class="current"><!-- TMPL_VAR name="page_number" --></span>
<!-- TMPL_ELSE -->
<a class="nav" href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&amp;offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</div>
<!-- /TMPL_IF -->
<!-- TMPL_ELSE -->
<!-- TMPL_IF name="batch_info" -->
<div class="dialog alert">There are no records in this batch to import.
<a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>.</div>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->