Koha/koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl
kados 5f4542992a This is a minor change, but affects all templates:
previously, it wasn't possible to insert anything into the <head> on
an individual template unless it was the title of the page. Now, the
structure is a bit more flexible to allow additional head elements to
be included.
2007-03-11 21:08:11 +00:00

247 lines
12 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Add to Virtual Shelf</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="menus.inc" -->
<!-- TMPL_INCLUDE NAME="menu-bookshelves.inc" -->
<!-- TMPL_IF Name="viewshelf" -->
<div id="action">
<a class="button" href="/cgi-bin/koha/bookshelves/shelves.pl">Back to virtual Shelves</a>
<!-- TMPL_IF name="manageshelf" -->
<a class="button" href="/cgi-bin/koha/bookshelves/shelves.pl?op=modif&shelf=<!-- TMPL_VAR Name="shelfnumber" -->">
Modify this shelf</a>
<!-- /TMPL_IF -->
</div>
<h3>Contents of <!-- TMPL_VAR Name="shelfname" --></h3>
<form class="inline" action="/cgi-bin/koha/bookshelves/shelves.pl" method="post" name="mainform">
<!-- 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 href="javascript:CheckAll();">
<small>(Un)Check All</small>
</a>
</th>
<th>&nbsp;</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="REM-<!-- TMPL_VAR Name="itemnumber" -->" />
</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/catalogue/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/catalogue/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/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
<!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
</a>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</td>
<td><!-- TMPL_VAR Name="author" --></td>
<td><!-- TMPL_VAR NAME="classification" --></td>
</tr>
<!-- /TMPL_LOOP -->
</table>
<!-- TMPL_ELSE -->
<br />
<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" -->
<b>With selected items :</b>
<input type="submit"
value="Remove"
class="icon delete"
onclick="return confirmDelete('Are you sure you want to remove these items from the shelf?')"
style="display:inline;"
/>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</form>
<!-- TMPL_IF name="manageshelf" -->
<br />
<form action="/cgi-bin/koha/bookshelves/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="Save" />
</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/bookshelves/shelves.pl">
<input type="hidden" name="shelves" value="1">
<h3>Create a new 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>
</select></td></tr></table>
<ul>
<li>A <b>private</b> virtual shelf is managed by you and can be seen only by you.</li>
<li> A <b>public</b> virtual shelf can be seen by everybody, but managed only by you.</li>
</ul>
<p><input type="submit" value="Add a new shelf"></p>
</form>
<!-- TMPL_IF NAME="numberCanManage" -->
<!-- TMPL_IF NAME="shelvesloop" -->
<form method="post" action="/cgi-bin/koha/bookshelves/shelves.pl" name="mainform">
<input type="hidden" name="shelves" value="1" />
<h3>Delete virtual shelves</h3>
<table>
<tr><th>&nbsp;</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/bookshelves/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 -->
<!-- /TMPL_IF -->
<br />
<p><form class="inline" action="/cgi-bin/koha/bookshelves/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 -->
</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>
</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>&nbsp;</th></tr>
<!-- TMPL_LOOP Name="shelvesloop" -->
<tr<!-- TMPL_IF name="color" --> class="highlight"<!-- /TMPL_IF -->><td><a href="/cgi-bin/koha/bookshelves/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="/cgi-bin/koha/bookshelves/shelves.pl?op=modif&amp;shelf=<!-- TMPL_VAR NAME="shelf" -->">Modify</a><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td></tr>
<!-- /TMPL_LOOP -->
</table>
<p><form action="/cgi-bin/koha/bookshelves/shelves.pl" method="get"><input type="hidden" value="1" name="shelves" /><input type="submit" value="Add or remove virtual shelves" /></form></p>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<br clear="both" />
<script type="text/javascript">
function confirmDelete(s){
if (window.confirm(s))
return true;
return false;
}
/**
* this function checks all checkbox
* or uncheck all if there are already checked.
*/
function CheckAll(){
var checkboxes = document.getElementsByTagName('input');
var nbCheckbox = checkboxes.length;
var check = areAllChecked();
check = !check;
for(var i=0;i<nbCheckbox;i++){
if(checkboxes[i].getAttribute('type') == "checkbox" ){
checkboxes[i].checked = check;
}
}
}
/**
* this function return true if all checkbox are checked
*/
function areAllChecked(){
var checkboxes = document.getElementsByTagName('input');
var nbCheckbox = checkboxes.length;
for(var i=0;i<nbCheckbox;i++){
if(checkboxes[i].getAttribute('type') == "checkbox" ){
if(checkboxes[i].checked == 0){
return false;
}
}
}
return true;
}
</script>
<!-- TMPL_INCLUDE NAME="opac-bottom.inc"-->