(13, 'delete_anonymize_patrons', 'Delete old borrowers and anonymize circulation history (deletes borrower reading history)'),
(13, 'batch_upload_patron_images', 'Upload patron images in batch or one at a time'),
(13, 'schedule_tasks', 'Schedule tasks to run'),
- (13, 'batchmod', 'Perform batch modification of items'),
- (13, 'batchdel', 'Perform batch deletion of items'),
+ (13, 'items_batchmod', 'Perform batch modification of items'),
+ (13, 'items_batchdel', 'Perform batch deletion of items'),
(13, 'manage_csv_profiles', 'Manage CSV export profiles'),
(13, 'moderate_tags', 'Moderate patron tags'),
(13, 'rotating_collections', 'Manage rotating collections'),
SetVersion ($DBversion);
}
+$DBversion = "3.02.00.129";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("UPDATE `permissions` SET `code` = 'items_batchdel' WHERE `permissions`.`module_bit` =13 AND `permissions`.`code` = 'batchdel' LIMIT 1 ;");
+ $dbh->do("UPDATE `permissions` SET `code` = 'items_batchmod' WHERE `permissions`.`module_bit` =13 AND `permissions`.`code` = 'batchmod' LIMIT 1 ;");
+ print "Upgrade done (Change permissions names for item batch modification / deletion)\n";
+
+ SetVersion ($DBversion);
+}
+
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
items.barcode Barcode
items.dateaccessioned Accession Date
items.booksellerid Supplier ID
-items.homebranch Permanent Branch Code
+items.homebranch Home Branch
items.price Price
items.replacementprice Replacement Price
items.replacementpricedate Date Replacement Price was set
items.restricted Item Restricted
items.binding Item needs binding
items.itemnotes Item Notes
-items.holdingbranch Current Branch
+items.holdingbranch Holding Branch
items.paidfor Has Item been lost and then paid for
items.timestamp Timestamp
items.location Location
</ul>
<h5>Catalog</h5>
<ul>
- <!-- TMPL_IF NAME="CAN_user_tools_batchdel" -->
+ <!-- TMPL_IF NAME="CAN_user_tools_items_batchdel" -->
<li><a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Batch deletion of items</a></li>
<!--/TMPL_IF-->
- <!-- TMPL_IF NAME="CAN_user_tools_batchmod" -->
+ <!-- TMPL_IF NAME="CAN_user_tools_items_batchmod" -->
<li><a href="/cgi-bin/koha/tools/batchMod.pl">Batch modification of items</a></li>
<!--/TMPL_IF-->
<!-- TMPL_IF NAME="CAN_user_tools_export_catalog" -->
//<![CDATA[
$(document).ready(function() {
$("#itemst").tablesorter();
+ $("#selectallbutton").click(function() {
+ $("#itemst").find("input:checkbox").each(function() {
+ $(this).attr("checked", true);
+ });
+ });
+ $("#clearallbutton").click(function() {
+ $("#itemst").find("input:checkbox").each(function() {
+ $(this).attr("checked", false);
+ });
+ });
+
});
//]]>
</script>
<!-- TMPL_IF name="item_loop" -->
<div id="cataloguing_additem_itemlist">
<div style="overflow:auto">
+ <div id="toolbar"><a id="selectallbutton" href="#">Select All</a> | <a id="clearallbutton" href="#">Clear All</a></div>
<table id="itemst">
<thead>
<tr>
<!-- TMPL_LOOP name="not_deleted_loop" -->
<tr>
<td><!-- TMPL_VAR name="itemnumber" --></td>
- <td><!-- TMPL_VAR name="barcode" --></td>
+ <td><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->"><!-- TMPL_VAR name="barcode" --></a></td>
<td><!-- TMPL_IF name="book_on_loan" -->Item is checked out<!-- TMPL_ELSIF name="book_reserved" -->Item has a waiting hold<!-- /TMPL_IF --></td>
</tr>
<!-- /TMPL_LOOP -->
//<![CDATA[
$(document).ready(function() {
$("#itemst").tablesorter();
+ $("#selectallbutton").click(function() {
+ $("#itemst").find("input:checkbox").each(function() {
+ $(this).attr("checked", true);
+ });
+ });
+ $("#clearallbutton").click(function() {
+ $("#itemst").find("input:checkbox").each(function() {
+ $(this).attr("checked", false);
+ });
+ });
+
});
//]]>
</script>
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
- <a href="/cgi-bin/koha/tools/batchMod.pl">Modify batches of notices</a>
+ <a href="/cgi-bin/koha/tools/batchMod.pl">Modify batches of items</a>
</div>
<div id="doc3" class="yui-t2">
<!-- TMPL_IF name="item_loop" -->
<div id="cataloguing_additem_itemlist">
<div style="overflow:auto">
+ <div id="toolbar"><a id="selectallbutton" href="#">Select All</a> | <a id="clearallbutton" href="#">Clear All</a></div>
<table id="itemst">
<thead>
<tr>
//<![CDATA[
$(document).ready(function() {
$("#itemst").tablesorter();
+
});
//]]>
</script>
<dt><a href="/cgi-bin/koha/tools/scheduler.pl">Task scheduler</a></dt>
<dd>Schedule tasks to run</dd>
<!-- /TMPL_IF -->
+
</dl>
</div>
<div class="yui-u">
<h3>Catalog</h3>
<dl>
- <!-- TMPL_IF NAME="CAN_user_tools_batchdel" -->
- <dt><a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Batch item deletion</a></dt>
- <dd>Perform batch deletion of items</dd>
+ <!-- TMPL_IF NAME="CAN_user_tools_items_batchmod" -->
+ <dt><a href="/cgi-bin/koha/tools/batchMod.pl">Modify a queryset of items</a></dt>
+ <dd>Perform batch modification of items</dd>
<!-- /TMPL_IF -->
- <!-- TMPL_IF NAME="CAN_user_tools_batchmod" -->
- <dt><a href="/cgi-bin/koha/tools/batchMod.pl">Batch item modification</a></dt>
- <dd>Perform batch modification of items</dd>
+ <!-- TMPL_IF NAME="CAN_user_tools_items_batchdel" -->
+ <dt><a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Delete a queryset of items</a></dt>
+ <dd>Perform batch deletion of items</dd>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="CAN_user_tools_export_catalog" -->
use strict;
sub kohaversion {
- our $VERSION = '3.01.00.128';
+ our $VERSION = '3.01.00.129';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
$template_flag = { tools => '*' };
} else {
$template_name = ($del) ? "tools/batchMod-del.tmpl" : "tools/batchMod-edit.tmpl";
- $template_flag = ($del) ? { tools => 'batchdel' } : { tools => 'batchmod' };
+ $template_flag = ($del) ? { tools => 'items_batchdel' } : { tools => 'items_batchmod' };
}
$deleted_items++;
} else {
$not_deleted_items++;
- push @not_deleted, { itemnumber => $itemdata->{'itemnumber'}, barcode => $itemdata->{'barcode'}, title => $itemdata->{'title'}, $return => 1 };
+ push @not_deleted, { biblionumber => $itemdata->{'biblionumber'}, itemnumber => $itemdata->{'itemnumber'}, barcode => $itemdata->{'barcode'}, title => $itemdata->{'title'}, $return => 1 };
}
} else {
if ($something_to_modify) {