1 [% PROCESS 'authorities-search-results.inc' %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Tools › Batch record modification</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% INCLUDE 'greybox.inc' %]
6 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
7 [% INCLUDE 'datatables.inc' %]
8 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
9 <script type="text/javascript" src="[% themelang %]/js/background-job-progressbar.js"></script>
10 <script type="text/javascript">
12 $(document).ready(function() {
13 $("#selectall").click(function(e){
15 $(".records").checkCheckboxes();
17 $("#clearall").click(function(e){
19 $(".records").unCheckCheckboxes();
21 $("#selectall").click();
23 $("table#biblios").dataTable($.extend(true, {}, dataTablesDefaults, {
25 { "aTargets": [ 0, 3 ], "bSortable": false, "bSearchable": false },
26 { "aTargets": [ 1 ], "sType": "num-html" }
33 $("table#authorities").dataTable($.extend(true, {}, dataTablesDefaults, {
35 { "aTargets": [ 0, 3 ], "bSortable": false, "bSearchable": false },
36 { "aTargets": [ 1 ], "sType": "num-html" }
43 $("#mainformsubmit").click(function(){
44 return submitBackgroundJob(document.getElementById("process"));
51 <body id="tools_batch_record_modification" class="tools">
52 [% INCLUDE 'header.inc' %]
53 [% INCLUDE 'cat-search.inc' %]
55 <div id="breadcrumbs">
56 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
57 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
58 <a href="/cgi-bin/koha/tools/batch_record_modification.pl">Batch record modification</a>
61 <div id="doc3" class="yui-t2">
65 <h1>Batch record modification</h1>
66 [% FOREACH message IN messages %]
67 [% IF message.type == 'success' %]
68 <div class="dialog message">
69 [% ELSIF message.type == 'warning' %]
70 <div class="dialog alert">
71 [% ELSIF message.type == 'error' %]
72 <div class="dialog error" style="margin:auto;">
74 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]">[% biblio.title %]</a></td>
75 [% IF message.code == 'no_action_defined_for_the_template' %]
76 The selected template (id=[% message.mmtid%]) does not exist or no action is defined.
77 [% ELSIF message.code == 'biblio_not_exists' %]
78 The biblionumber [% message.biblionumber %] does not exist in the database.
79 [% ELSIF message.code == 'authority_not_exists' %]
80 The authority id [% message.authid %] does not exist in the database.
81 [% ELSIF message.code == 'biblio_not_modified' %]
82 The biblio <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber %]">[% message.biblionumber %]</a> has not been modified. An error occurred on modifying it.
83 [% ELSIF message.code == 'authority_not_modified' %]
84 The authority <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% message.authid %]">[% message.authid %]</a> has not been modified. An error occurred on modifying it.
85 [% ELSIF message.code == 'biblio_modified' %]
86 The biblio <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber %]">[% message.biblionumber %]</a> has successfully been modified.
87 [% ELSIF message.code == 'authority_modified' %]
88 The authority <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% message.authid %]">[% message.authid %]</a> has successfully been modified.
90 [% IF message.error %]
91 (The error was: [% message.error%], see the Koha logfile for more information).
95 [% IF view == 'form' %]
96 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_record_modification.pl">
97 <fieldset class="rows">
98 <legend>Record type</legend>
100 <li><label for="biblio_type">Biblios: </label><input type="radio" name="recordtype" value="biblio" id="biblio_type" checked="checked" /></li>
101 <li><label for="authority_type">Authorities: </label><input type="radio" name="recordtype" value="authority" id="authority_type" /></li>
104 <fieldset class="rows">
105 <legend>Use a file</legend>
107 <li><label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" /></li>
110 <fieldset class="rows">
111 <legend>Or enter a list of record numbers</legend>
114 <label for="recordnumber_list">Record number list (one per line): </label>
115 <textarea rows="10" cols="30" id="recordnumber_list" name="recordnumber_list"></textarea>
119 <fieldset class="rows">
120 <legend>Use MARC Modification Template:</legend>
123 <label for="marc_modification_template_id" class="required">Modify record using the following template: </label>
124 <select name="marc_modification_template_id" id="marc_modification_template_id" required="required">
125 <option value="">Select a template</option>
126 [% FOREACH mmt IN MarcModificationTemplatesLoop %]
127 <option value="[% mmt.template_id %]">[% mmt.name %]</option>
133 <fieldset class="action">
134 <input type="hidden" name="op" value="list" />
135 <input type="submit" value="Continue" class="button" />
136 <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a>
139 [% ELSIF view == 'list' %]
141 [% IF recordtype == 'biblio' %]
143 <a id="selectall" href="#">Select All</a>
144 | <a id="clearall" href="#">Clear All</a>
146 <form action="/cgi-bin/koha/tools/batch_record_modification.pl" method="post" id="process">
147 <table id="biblios" class="records">
151 <th>Biblionumber</th>
157 [% FOR biblio IN records %]
159 <td><input type="checkbox" name="record_id" value="[% biblio.biblionumber %]" data-items="[% biblio.itemnumbers.size %]" data-issues="[% biblio.issues_count %]" data-reserves="[% biblio.reserves.size %]" /></td>
160 <td>[% biblio.biblionumber %]</td>
161 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]">[% biblio.title %]</a></td>
162 <td><a href="/cgi-bin/koha/svc/records/preview?record_type=biblio&record_id=[% biblio.biblionumber %]&mmtid=[% mmtid %]" title="MARC preview" rel="gb_page_center[600,500]">Preview MARC</a>
168 <div class="note">Reminder: this action will modify all selected biblios!</div>
171 <a id="selectall" href="#">Select All</a>
172 | <a id="clearall" href="#">Clear All</a>
174 <form action="/cgi-bin/koha/tools/batch_record_modification.pl" method="post" id="process">
175 <table id="authorities" class="records">
185 [% FOR authority IN records %]
187 <td><input type="checkbox" name="record_id" value="[% authority.authid %]" data-usage="[% authority.count_usage %]" /></td>
188 <td><a href="/cgi-bin/koha/authorities/detail.pl?authid=[% authority.authid %]">[% authority.authid %]</a></td>
189 <td>[% PROCESS authresult summary=authority.summary %]</td>
190 <td><a href="/cgi-bin/koha/svc/records/preview?record_type=authority&record_id=[% authority.authid %]&mmtid=[% mmtid %]" title="MARC preview" rel="gb_page_center[600,500]">Preview MARC</a>
195 <div class="note">Reminder: this action will modify all selected authorities!</div>
197 <fieldset class="action">
198 <input type="hidden" name="op" value="modify" />
199 <input type="hidden" name="recordtype" value="[% recordtype %]" />
200 <input type="button" id="mainformsubmit" value="Modify selected records" class="button" />
201 <input type="hidden" name="runinbackground" id="runinbackground" value="" />
202 <input type="hidden" name="completedJobID" id="completedJobID" value="" />
203 <input type="hidden" name="marc_modification_template_id" value="[% mmtid %]" />
204 <a class="cancel" href="/cgi-bin/koha/tools/batch_record_modification.pl">Cancel</a>
207 <div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
208 <div id="jobfailed"></div>
212 There is no record ids defined.
214 [% ELSIF view == 'report' %]
215 [% IF report.total_records == report.total_success %]
216 All records have successfully been modified!
218 [% report.total_success %] / [% report.total_records %] records have successfully been modified.
219 Some errors occurred.
221 <p><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a></p>
222 [% ELSIF view == 'errors' %]
223 [% FOR error IN errors %]
224 [% IF error == 'no_template_defined' %]
225 No MARC modification template is defined. You have <a href="/cgi-bin/koha/tools/marc_modification_templates.pl">to create</a> at least one template for using this tool.
229 No action defined for the template.
234 [% INCLUDE 'tools-menu.inc' %]
237 [% INCLUDE 'intranet-bottom.inc' %]