Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tmpl
Owen Leonard bd7cca935b Updated fix for Bug 2170, Adding 'edititems' user-permission
This patch follows up on the addition of the 'edititems'
permission by adding a check of the new permission to places
in the interface which link to the edit item screen.

The catalogue toolbar had to be extensively re-worked in
order to ensure that the "New" and "Edit" menus would appear
(or not) whether or not edit_catalogue, edit_items, or
create_subscription permissions are on.

Revised for current HEAD

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-14 13:10:57 +13:00

158 lines
8.4 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Tools &rsaquo; Batch item modification</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="background-job.inc" -->
<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/css/pages/batchMod.css" />
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script src="<!-- TMPL_VAR name="themelang" -->/lib/yui/cookie/cookie-min.js"></script>
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
<script type="text/javascript">
//<![CDATA[
// Prepare array of all column headers, incrementing each index by
// two to accomodate control and title columns
var allColumns = new Array(<!-- TMPL_LOOP NAME="item_header_loop" -->'<!-- TMPL_VAR NAME="__counter__" -->'<!-- TMPL_UNLESS NAME="__last__" -->,<!-- /TMPL_UNLESS --><!-- /TMPL_LOOP -->);
for( x=0; x<allColumns.length; x++ ){
allColumns[x] = Number(allColumns[x]) + 2;
}
//]]>
</script>
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/js/pages/batchMod.js"></script>
<!--[if IE]>
<style type="text/css">#selections { display: none; }</style>
<![endif]-->
<link type="text/css" rel="stylesheet" href="<!-- TMPL_VAR NAME="themelang" -->/css/addbiblio.css" />
</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> &rsaquo;
<a href="/cgi-bin/koha/tools/batchMod.pl">Batch item modification</a>
</div>
<div id="doc3" class="yui-t7">
<div id="bd">
<div id="yui-main">
<!-- TMPL_IF NAME="show" --><h1>Batch item modification</h1><!-- TMPL_ELSE --><h1>Batch item modification results</h1><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="barcode_not_unique" --><div class="dialog alert"><strong>Error saving item</strong>: Barcode must be unique.</div><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="no_next_barcode" --><div class="dialog alert"><strong>Error saving items</strong>: Unable to automatically determine values for barcodes. No item has been inserted.</div><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="book_on_loan" --><div class="dialog alert"><strong>Cannot Delete</strong>: item is checked out.</div><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="book_reserved" --><div class="dialogalert"><strong>Cannot Delete</strong>: item has a waiting hold.</div><!-- /TMPL_IF -->
<!-- TMPL_IF name="notfoundbarcodes" -->
<div class="dialog alert"><p>Warning, the following barcodes were not found:</p></div>
<table style="margin:auto;">
<thead>
<tr><th>Barcodes not found</th></tr>
</thead>
<tbody>
<!-- TMPL_LOOP name="notfoundbarcodes" -->
<tr><td><!-- TMPL_VAR name="barcode" --></td></td>
<!-- /TMPL_LOOP -->
</tbody>
</table>
<!-- TMPL_UNLESS name="too_many_items" -->
<h4>The following barcodes were found: </h4>
<!-- /TMPL_UNLESS -->
<!-- /TMPL_IF --> <!-- /notfoundbarcodes -->
<form name="f" action="batchMod.pl" method="post">
<input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->" />
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
<input type="hidden" name="runinbackground" id="runinbackground" value="" />
<input type="hidden" name="completedJobID" id="completedJobID" value="" />
<!-- TMPL_IF name="item_loop" -->
<!-- TMPL_IF NAME="show" --><div id="toolbar"><a id="selectallbutton" href="#">Select All</a> | <a id="clearallbutton" href="#">Clear All</a></div><!-- TMPL_ELSE --><!-- /TMPL_IF -->
<div id="cataloguing_additem_itemlist">
<p id="selections"><strong>Show/hide columns:</strong> <span class="selected"><input type="checkbox" checked="checked" id="showall"/><label for="showall">Show all columns</label></span> <span><input type="checkbox" id="hideall"/><label for="hideall">Hide all columns</label></span>
<!-- TMPL_LOOP NAME="item_header_loop" -->
<span class="selected"><input id="checkheader<!-- TMPL_VAR NAME="__counter" -->" type="checkbox" checked="checked" /> <label for="checkheader<!-- TMPL_VAR NAME="__counter__" -->"><!-- TMPL_VAR NAME="header_value" --></label> </span>
<!-- /TMPL_LOOP -->
</p>
<table id="itemst">
<thead>
<tr>
<th>&nbsp;</th>
<th>Title</th>
<!-- TMPL_LOOP NAME="item_header_loop" -->
<th> <!-- TMPL_VAR NAME="header_value" --> </th>
<!-- /TMPL_LOOP -->
</tr>
</thead>
<tbody>
<!-- TMPL_LOOP NAME="item_loop" --> <tr> <!-- TMPL_IF NAME="show" --><!-- TMPL_IF Name="nomod"--> <td class="error">Cannot Edit</td><!--TMPL_ELSE--><td><input type="checkbox" name="itemnumber" value="<!--TMPL_VAR Name="itemnumber"-->" id="row<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" /></td><!--/TMPL_IF--><!--TMPL_ELSE--><td>&nbsp;</td><!-- /TMPL_IF -->
<td><label for="row<!-- TMPL_VAR NAME="itemnumber" -->"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></label></td>
<!-- TMPL_LOOP NAME="item_value" --> <td><!-- TMPL_VAR ESCAPE="HTML" NAME="field" --></td>
<!-- /TMPL_LOOP --> </tr>
<!-- /TMPL_LOOP -->
</tbody>
</table>
</div>
<!-- /TMPL_IF --><!-- /item_loop -->
<!-- TMPL_IF NAME="simple_items_display" -->
<p>The following items were modified:</p>
<ul>
<!-- TMPL_LOOP NAME="simple_items_display" -->
<li>
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" --><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->"><!-- TMPL_VAR NAME="barcode" --></a><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="barcode" --><!-- /TMPL_IF -->
</li>
<!-- /TMPL_LOOP -->
</ul>
<!-- /TMPL_IF --><!-- /simple_items_display -->
<!-- TMPL_IF name="show" -->
<!-- TMPL_IF name="too_many_items" -->
<p>Too many items (<!-- TMPL_VAR NAME="too_many_items" -->): not displaying each one individually.</p>
<!-- TMPL_LOOP name="itemnumbers_hashref" -->
<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
<!-- /TMPL_LOOP -->
<!-- /TMPL_IF --><!-- /too_many_items -->
<div id="cataloguing_additem_newitem">
<h2>Edit Items</h2>
<fieldset class="rows">
<ol>
<!-- TMPL_LOOP NAME="item" -->
<li><div class="subfield_line" style="<!-- TMPL_VAR NAME='visibility' -->" id="subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->">
<label><!-- TMPL_VAR NAME="subfield" --> -
<!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF -->
<!-- TMPL_VAR NAME="marc_lib" -->
<!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF -->
</label>
<!-- TMPL_VAR NAME="marc_value" -->
<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
<!-- TMPL_IF NAME="repeatable" -->
<span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">+</span>
<!-- /TMPL_IF -->
</div></li>
<!-- /TMPL_LOOP -->
</ol>
</fieldset>
<fieldset class="action">
<div id="jobpanel">
<div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
<div id="jobfailed"></div>
</div>
<input type="submit" name="mainformsubmit" value="Save" onclick="return submitBackgroundJob(this.form);" />
<a href="/cgi-bin/koha/tools/batchMod.pl" class="cancel" onclick="history.back();return false;">Cancel</a>
</fieldset>
</div>
<!-- TMPL_ELSE --> <!-- // show -->
<fieldset class="action">
<a href="/cgi-bin/koha/tools/batchMod.pl">Done</a>
</fieldset>
<!-- /TMPL_IF -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->