253 lines
13 KiB
Cheetah
253 lines
13 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryNameTitle" --> Catalog -- <!-- TMPL_IF Name="viewshelf" -->Contents of <!-- TMPL_VAR Name="shelfname" --><!-- TMPL_ELSE -->List of Virtual Shelves<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<!--TMPL_INCLUDE NAME="masthead.inc" -->
|
|
<!--TMPL_INCLUDE NAME="navigation.inc" -->
|
|
|
|
<!-- TMPL_INCLUDE NAME="usermenu.inc" -->
|
|
|
|
<!-- TMPL_IF Name="viewshelf" -->
|
|
|
|
<h3>Contents of <!-- TMPL_VAR Name="shelfname" --></h3>
|
|
|
|
<a class="button" href="/cgi-bin/koha/opac-shelves.pl">Back to Virtual Shelves</a>
|
|
|
|
<!-- TMPL_IF name="manageshelf" -->
|
|
| <a class="button" href="/cgi-bin/koha/opac-shelves.pl?op=modif&shelf=<!-- TMPL_VAR Name="shelfnumber" -->">
|
|
Modify this Shelf</a>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<form action="/cgi-bin/koha/opac-shelves.pl"
|
|
method="POST"
|
|
name="mainform"
|
|
onsubmit="return checkForm(this);">
|
|
|
|
<!-- TMPL_IF NAME="itemsloop" -->
|
|
<table>
|
|
<input type="hidden" name="viewshelf" value="<!-- TMPL_VAR Name="shelfnumber" -->" />
|
|
<input type="hidden" name="modifyshelfcontents" value="1" />
|
|
<tr>
|
|
<th>
|
|
<a style="color:white;" href="/cgi-bin/koha/opac-shelves.pl" onclick="CheckAll(); return false;">Check All</a>
|
|
</th>
|
|
<th> </th>
|
|
<th>Title</th>
|
|
<th>Author</th>
|
|
<th>Call No.</th>
|
|
</tr>
|
|
<!-- TMPL_LOOP Name="itemsloop" -->
|
|
<tr<!-- TMPL_IF name="color" --> class="highlight"<!-- /TMPL_IF -->>
|
|
<td>
|
|
<input type="checkbox" name="MOD-<!-- TMPL_VAR Name="itemnumber" -->" />
|
|
<input type="hidden" name="ModBiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->">
|
|
</td>
|
|
<td>
|
|
<img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" />
|
|
</td>
|
|
<td>
|
|
<!-- TMPL_IF name="BiblioDefaultViewmarc" -->
|
|
<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
|
|
<!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
|
|
</a>
|
|
<!-- TMPL_ELSE -->
|
|
<!-- TMPL_IF name="BiblioDefaultViewisbd" -->
|
|
<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
|
|
<!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
|
|
</a>
|
|
<!-- TMPL_ELSE -->
|
|
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
|
|
<!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
|
|
</a>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_IF -->
|
|
</a>
|
|
</td>
|
|
<td><!-- TMPL_VAR Name="author" --></td>
|
|
<td><!-- TMPL_VAR NAME="classification" --></td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
<!-- TMPL_ELSE -->
|
|
<b>This shelf is empty.</b>
|
|
<!-- TMPL_UNLESS NAME="itemsloop" -->
|
|
<input type="hidden" name="DEL-<!-- TMPL_VAR NAME="shelfnumber" -->" />
|
|
<input type="hidden" name="shelves" value="1" />
|
|
<input type="submit" class="icon delete"
|
|
value="Delete this Shelf"
|
|
onclick="return confirmDelete('Are you sure you want to delete this shelf?')" />
|
|
<!-- /TMPL_UNLESS -->
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="manageshelf" -->
|
|
<!-- TMPL_IF NAME="itemsloop" -->
|
|
<h2>With selected items :</h2>
|
|
<p>
|
|
<label for="check-remove">remove</label>
|
|
<input id="check-remove"
|
|
type="checkbox"
|
|
name="remove"
|
|
/>
|
|
</p>
|
|
<p>
|
|
<label for="check-addbb">Add to bookbag</label>
|
|
<input id="check-addbb"
|
|
type="checkbox"
|
|
name="addToBookBag"
|
|
/>
|
|
</p>
|
|
<p><input type="submit"
|
|
value=" GO "
|
|
/>
|
|
</p>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_IF -->
|
|
</form>
|
|
<!-- TMPL_IF name="manageshelf" -->
|
|
|
|
<br />
|
|
<form action="/cgi-bin/koha/opac-shelves.pl" method="post">
|
|
<table>
|
|
<tr><th colspan="2">Add an Item to this Shelf by Barcode</th></tr>
|
|
<tr>
|
|
<td>
|
|
<label for="addbarcode">Barcode:</label>
|
|
</td>
|
|
<td>
|
|
<input name="addbarcode" type="text" id="addbarcode" size="14" maxlength="14" />
|
|
<input type="hidden" name="viewshelf" value="<!-- TMPL_VAR Name="shelfnumber" -->" />
|
|
<input type="hidden" name="modifyshelfcontents" value="1" />
|
|
<input type="submit" value=" Add " />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_ELSE -->
|
|
<!-- TMPL_IF Name="shelves" -->
|
|
<!-- TMPL_IF Name="status1" -->
|
|
<p class="error"><!-- TMPL_VAR Name="string1" --></p>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_LOOP Name="paramsloop" -->
|
|
<!-- TMPL_IF Name="status" -->
|
|
<p class="error"><!-- TMPL_VAR Name="string" --></p>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_LOOP -->
|
|
<form method="post" action="/cgi-bin/koha/opac-shelves.pl">
|
|
<input type="hidden" name="shelves" value="1">
|
|
<h3>Create a New a Virtual Shelf</h3>
|
|
<table>
|
|
<tr><th scope="row"><label for="addshelf">Shelf Name:</label> </th><td> <input id="addshelf" type="text" name="addshelf" size="25"></td></tr>
|
|
<tr><th scope="row"><label for="owner">Owner:</label> </th><td><input type="hidden" name="owner" id="owner" value="<!-- TMPL_VAR name="loggedinuser" -->"><!-- TMPL_VAR name="loggedinusername" --></td></tr>
|
|
<tr><th scope="row"><label for="category">Category:</label> </th><td><select name="category" id="category">
|
|
<option value="1">Private</option>
|
|
<option value="2">Public</option>
|
|
<option value="3">Free</option>
|
|
</select></td></tr></table>
|
|
<ul><li>A <strong>private</strong> virtual shelf is managed by you and can be seen only by you.</li><li> A <strong>public</strong> virtual shelf can be seen by everybody, but managed only by you.</li>
|
|
<li> A <strong>free</strong> virtual shelf can be added to and changed by any user.</li></ul>
|
|
<p><input type="submit" value="Add New Shelf"></p>
|
|
</form>
|
|
|
|
<!-- TMPL_IF NAME="shelvesloop" -->
|
|
<form method="post" action="/cgi-bin/koha/opac-shelves.pl" name="mainform">
|
|
<input type="hidden" name="shelves" value="1" />
|
|
<h3>Delete Virtual Shelves</h3>
|
|
<table>
|
|
<tr><th> </th><th>Shelf Name</th><th>Contents</th></tr>
|
|
<!-- TMPL_LOOP Name="shelvesloop" -->
|
|
<!-- TMPL_IF name="canmanage" -->
|
|
<tr>
|
|
<td><input type="checkbox" name="DEL-<!-- TMPL_VAR Name="shelf" -->" /></td><td><a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=<!-- TMPL_VAR Name="shelf" -->"><!-- TMPL_VAR Name="shelfname" --></a></td><td><!-- TMPL_VAR Name="shelfbookcount" --> item(s)</td></tr>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
<input type="submit" value="Delete Shelves" /></form>
|
|
<!-- /TMPL_IF -->
|
|
<p><form class="inline" action="opac-shelves.pl" method="get"><input type="submit" value="Back to Virtual Shelves" /></form></p>
|
|
|
|
<!-- TMPL_ELSE -->
|
|
<!-- TMPL_IF name="edit" -->
|
|
<form method="post">
|
|
<input type="hidden" name="op" value="modifsave">
|
|
<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->">
|
|
<h3>Modify Virtual Shelf <!-- TMPL_VAR name="shelfname"--></h3>
|
|
<table>
|
|
<tr><td><label for="shelfname">Shelf Name: </label></td><td><input type="text" id="shelfname" name="shelfname" size="25" value="<!-- TMPL_VAR name="shelfname"-->" /></td></tr>
|
|
<tr><td><label for="owner">Owner: </label></td><td><input type="hidden" id="owner" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->"><!-- TMPL_VAR NAME="loggedinusername" --></td></tr>
|
|
<tr><td><label for="category">Category: </label></td><td><select id="category" name="category">
|
|
<!-- TMPL_IF name="category1" -->
|
|
<option value="1" selected>Private</option>
|
|
<!-- TMPL_ELSE -->
|
|
<option value="1">Private</option>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="category2" -->
|
|
<option value="2" selected>Public</option>
|
|
<!-- TMPL_ELSE -->
|
|
<option value="2">Public</option>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="category3" -->
|
|
<option value="3" selected>Free</option>
|
|
<!-- TMPL_ELSE -->
|
|
<option value="3">Free</option>
|
|
<!-- /TMPL_IF -->
|
|
</select></td></tr>
|
|
</table>
|
|
<ul><li>A <strong>private</strong> virtual shelf is managed by you and can be seen <strong>only</strong> by you.</li>
|
|
<li> A <strong>public</strong> virtual shelf can be seen by <strong>everybody</strong>, but managed only by you.</li>
|
|
<li>A <strong>free</strong> virtual shelf can be added to or changed by <strong>any</strong> user.</li></ul>
|
|
<p><input type="submit" value="Save Changes"></p>
|
|
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
<h3>Virtual Shelves</h3>
|
|
|
|
<table>
|
|
<tr><th>Shelf Name</th><th>Category</th><th>Content Size</th><th> </th></tr>
|
|
<!-- TMPL_LOOP Name="shelvesloop" -->
|
|
<tr<!-- TMPL_IF name="color" --> class="highlight"<!-- /TMPL_IF -->><td><a href="opac-shelves.pl?viewshelf=<!-- TMPL_VAR Name="shelf" -->"><!-- TMPL_VAR Name="shelfname" --></a></td><td><!-- TMPL_IF NAME="category1" -->Private<!-- /TMPL_IF --><!-- TMPL_IF NAME="category2" -->Public<!-- /TMPL_IF --><!-- TMPL_IF NAME="category3" -->Free<!-- /TMPL_IF --></td><td><!-- TMPL_VAR Name="shelfbookcount" --> item(s)</td><td><!-- TMPL_IF name="mine" --><a href="opac-shelves.pl?op=modif&shelf=<!-- TMPL_VAR NAME="shelf" -->">Modify</a><!-- TMPL_ELSE --> <!-- /TMPL_IF --></td></tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
<p><form action="/cgi-bin/koha/opac-shelves.pl" method="get"><input type="hidden" value="1" name="shelves" /><input type="submit" value="Add or Remove Book Shelves" /></form></p>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_IF -->
|
|
|
|
<br clear="both" />
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
// Set the focus the barcode input if it exists.
|
|
var barcodeInput;
|
|
if (barcodeInput = document.getElementById('addbarcode')) {
|
|
barcodeInput.focus();
|
|
}
|
|
/**
|
|
* Function checkForm
|
|
* This function check the form beform submited it.
|
|
* If there are items to add to bookbag then add it there.
|
|
*/
|
|
function checkForm(form){
|
|
if( form.addToBookBag.checked ) { // add to BookBag
|
|
AddCheckedToBookBag(form);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Function AddCheckedToBookBag
|
|
* This function add the checked item to bookbag.
|
|
*/
|
|
function AddCheckedToBookBag(form) {
|
|
var inputs = form.getElementsByTagName('input');
|
|
for(var i=0,num=inputs.length; i < num; i++){
|
|
var input = inputs[i].getAttribute('type');
|
|
if (input == "checkbox") {
|
|
if( inputs[i].checked ) {
|
|
var itemnumber = inputs[i].getAttribute('name');
|
|
var regexp = /MOD-/;
|
|
if(itemnumber.match(regexp)){
|
|
var biblionumber = inputs[i+1].value;
|
|
addRecord(biblionumber,null,1); // function from basket.js
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<!-- TMPL_INCLUDE NAME="opac-bottom.inc"-->
|