width : auto;
}
+form {
+ display : inline;
+ margin : 0;
+ padding : 0;
+}
+
h1 {
font-size : 138.5%;
}
list-style : disc;
}
+p.availability {
+ font-size : 87%;
+}
+
.available {
- font-size : 0.75em;
+ color : #006600;
}
.inwait {
background-color : #F9FF9A;
}
-.unavailable {
- background-color : #FFED3D;
-}
-
/* action buttons */
#action {
margin-top : .5em;
padding : 3px 3px 5px 5px;
}
+.searchresults table {
+ margin : 0;
+}
+
.searchresults td, .searchresults th, .searchresults table {
border: 0;
}
border-bottom : 1px solid #CCCCCC;
}
-.searchresults table {
- border-top : 0px solid #CCCCCC;
-}
-
-p.availability {
- color:#666666;
+.searchresults tr:first-child {
+ border : 0;
}
-.available {
- font-size: 90%;
+.searchresults table {
+ border-top : 0px solid #CCCCCC;
}
.searchresults a.reserve, .searchresults a.reserve:visited {
}
.unavailable {
color: #990033;
+}
+
+#corner {
+ position: absolute;
+ top: .5em;
+ right: .2em;
+}
+
+#corner a.cart {
+ background-image : url(/opac-tmpl/prog/images/cart-small.gif);
+ background-position: left;
+ background-repeat : no-repeat;
+ padding: 0 15px;
+ text-decoration: none;
+}
+
+.pages {
+ line-height : 1.8em;
+ text-align: center;
+}
+a:link.current {
+ background-color: transparent;
+ color: #3366CC;
+ font-weight: bold;
+ padding: 1px 5px 1px 5px;
+ text-decoration: none;
+}
+a:visited.current {
+ background-color: transparent;
+ color: #3366CC;
+ font-weight: bold;
+ padding: 1px 5px 1px 5px;
+ text-decoration: none;
+}
+
+a:hover.current {
+ background-color: #CCFF00;
+ color: #CC3333;
+ font-weight: bold;
+ padding: 1px 5px 1px 5px;
+ text-decoration: none;
+}
+
+a:active.current {
+ background-color: #99CC00;
+ color: #FFFF99;
+ font-weight: bold;
+ padding: 1px 5px 1px 5px;
+ text-decoration: none;
+}
+
+.current {
+ background-color: #FFFFFF;
+ color: #3366CC;
+ font-weight: bold;
+ padding: 1px 5px 1px 5px;
+ text-decoration: none;
+}
+
+a:link.nav {
+ background-color: #EFF1DC;
+ border: 1px solid #CCCC99;
+ color: #3366CC;
+ font-weight: bold;
+ padding: 1px 5px 1px 5px;
+ text-decoration: none;
+}
+
+a:visited.nav {
+ background-color: #EFF1DC;
+ border: 1px solid #CCCC99;
+ color: #3366CC;
+ font-weight: bold;
+ padding: 1px 5px 1px 5px;
+ text-decoration: none;
+}
+
+a:hover.nav {
+ background-color: #FFFFCC;
+ border: 1px solid #CCCC99;
+ color: #CC3333;
+ font-weight: bold;
+ padding: 1px 5px 1px 5px;
+ text-decoration: none;
+}
+
+a:active.nav {
+ background-color: #FFFFCC;
+ border: 1px solid #CCCC99;
+ color: #D25500;
+ font-weight: bold;
+ padding: 1px 5px 1px 5px;
+ text-decoration: none;
+}
+
+input.icon {
+ background-position: left;
+ background-repeat: no-repeat;
+ font-size : 96%;
+ font-weight: bold;
+ padding: 2px 2px 2px 22px;
+ background-color: #6699CC;
+ border: 1px outset #666666;
+ color: #FFFFCC;
+}
+
+input.shelf, a.shelf {
+ background-image: url(/opac-tmpl/prog/images/addtobasket.gif);
+}
+
+input.clearall, a.clearall {
+ background-image: url(/opac-tmpl/prog/images/clearbasket.gif);
+}
+
+/* Tabs */
+ul.link-tabs {
+ list-style-type: none;
+ margin: 9px 0 -2px 5px;
+ padding: 0;
+}
+
+ul.link-tabs li {
+ display: inline;
+ padding: 0px;
+}
+
+ul.link-tabs li a {
+ font-weight: bold;
+ padding: 2px 4px 2px 4px;
+ text-decoration: none;
+ border-top: 1px solid #DDDDDD;
+ border-left : 1px solid #DDDDDD;
+ border-right : 1px solid #666666;
+}
+
+ul.link-tabs li#power_formButton a, ul.link-tabs li#proximity_formButton a {
+ padding: 2px 4px 3px 4px;
+}
+
+ul.link-tabs li.off a {
+ background-color: #EEEEEB;
+ border-bottom: 1px solid #DDDDDD;
+}
+
+ul.link-tabs li.off a:hover {
+ padding: 2px 3px 2px 4px;
+ background-color: #FFFFEC;
+ border-top: 1px solid #BEBF84;
+ border-left : 1px solid #BEBF84;
+ border-right : 2px solid #333333;
+}
+
+ul.link-tabs li.on a {
+ background-color: #FFFFFF;
+ border-bottom: 1px solid #FFFFFF;
+}
+
+ul.link-tabs li a.debit {
+ background-color : #FFFF99;
+ color : #990033;
+}
+
+div.tab-container {
+ border : 1px solid #DDDDDD;
+ margin-top : 4px;
+ padding : .7em;
+ width : 90%;
+}
+
+div.message {
+ border : 1px solid #8ebaff;
+ padding : .3em;
+ margin : .3em;
+ width : 50%;
}
\ No newline at end of file
var MSG_NO_RECORD_SELECTED = _("No item was selected");
var MSG_NO_RECORD_ADDED = _("No item was added to your book bag");
<!-- TMPL_IF NAME="AmazonContent" --> $(document).ready(function() {
- //verify_images();
+ verify_images();
});
<!-- /TMPL_IF -->
</script>
<div id="members">
<ul>
- <!-- TMPL_IF NAME="opacbookbag"-->
- <li>
- <a href="#" onclick="javascript:openBasket();" title="A "shopping cart" for your selections">Book Bag<span id="basket">
- <script language="javascript" type="text/javascript">
- if(basketcount){ document.write(basketcount) };
- </script></span>
- </a>
- </li>
- <!-- /TMPL_IF -->
<!--TMPL_IF NAME="virtualshelves" --><li><a href="/cgi-bin/koha/opac-shelves.pl">Virtual Shelves</a></li><!-- /TMPL_IF --><!-- TMPL_IF NAME="loggedinusername" --><li><a href="/cgi-bin/koha/opac-user.pl">Your Account</a></li><!-- /TMPL_IF --><!-- TMPL_IF NAME="loggedinusername" --><li><span class="members">Logged in as <span class="loggedinusername"><!-- TMPL_LOOP NAME="USER_INFO" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --><!-- /TMPL_LOOP --></span></span></li><li><a class="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1">Log Out</a></li><!-- TMPL_ELSE --><li><a href="/cgi-bin/koha/opac-user.pl">Your Account</a></li><!-- /TMPL_IF -->
</ul>
</div>
</form>
<a href="/cgi-bin/koha/opac-search.pl">Advanced Search</a>
</div>
+
+<div id="corner"><!-- TMPL_IF NAME="opacbookbag" --><a class="cart" href="/cgi-bin/koha/opac-basket.pl" onclick="openBasket(); return false;" title="A "shopping cart" for your selections">Book Bag<span id="basket"><script language="javascript" type="text/javascript">if(basketcount){ document.write(basketcount) };</script></span></a><!-- /TMPL_IF --><!-- TMPL_IF NAME="opaclanguagesdisplay" --><div id="languages">
+ <ul>
+ <!-- TMPL_LOOP NAME="languages" --><li><a href="/cgi-bin/koha/changelanguage.pl?language=<!-- TMPL_VAR NAME="language" -->"><!-- TMPL_VAR NAME="label" --></a> </li><!-- /TMPL_LOOP -->
+ </ul></div><!-- /TMPL_IF --></div>
+
+ <div id="breadcrumbs" class="yui-g">
+<!-- TMPL_IF NAME="searchdesc" --><p><!-- TMPL_IF name="total" --><strong>“<!-- TMPL_VAR NAME="searchdesc" -->” </strong>returned <!-- TMPL_VAR NAME="total" --> results. <!-- TMPL_IF NAME="available" -->Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->">Show all items</a><!-- TMPL_ELSE -->Limit to <a href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->&limit=available">currently available items.</a><!-- /TMPL_IF --><!-- TMPL_IF NAME="related" --> (related searches: <!-- TMPL_LOOP NAME="related" --><!-- TMPL_VAR NAME="related_search" --><!-- /TMPL_LOOP -->). <!-- /TMPL_IF --> <!-- <a href="http://a9.com/-/opensearch/search/B0007WF826/<!-- TMPL_VAR NAME="searchdesc" -->?count=10&startPage=1"><img title="RSS Feed for search <!-- TMPL_VAR NAME="searchdesc" -->" alt="RSS Feed for search <!-- TMPL_VAR NAME="searchdesc" -->" src="<!-- TMPL_VAR NAME="themelang" -->/../images/feed-icon-16x16.png" border="0" /></a> -->
+<!-- TMPL_ELSE -->
+<strong>“<!-- TMPL_VAR NAME="searchdesc" -->”</strong>
+<!-- TMPL_VAR NAME="search_error" -->
+<!-- /TMPL_IF --></p><!-- /TMPL_IF -->
+</div>
\ No newline at end of file
-function CheckAll()
-{
-count = document.mainform.elements.length;
- for (i=0; i < count; i++)
- {
- if(document.mainform.elements[i].checked == 1){
- document.mainform.elements[i].checked = 0;
- } else {
- document.mainform.elements[i].checked = 1;
+/**
+ * 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;
+ }
function confirmDelete(message) {
var agree = confirm(message);
<th>Location</th>
<th>Status</th>
<th>Date Due</th>
+ <th>Last Seen</th>
<th>Volume</th>
</tr>
<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
<!-- /TMPL_IF -->
<!-- /TMPL_IF --></td>
<td><!-- TMPL_VAR NAME="datedue" --></td>
+ <td><!-- TMPL_VAR NAME="datelastseen" --></td>
<td><!-- TMPL_VAR NAME="volumeddesc" --></td>
<!-- TMPL_IF NAME="type" -->
<td><a href="/cgi-bin/koha/maint/catmaintain.pl?type=fixitemtype&bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->&item=<!-- TMPL_VAR NAME="itemtype" -->">Fix Itemtype</a></td>
<div id="doc3" class="yui-t1">
<div id="bd">
-<!-- TMPL_IF NAME="total" -->
+<!-- <!-- TMPL_IF NAME="total" -->
<div id="breadcrumbs" class="yui-g">
<p><strong>“<!-- TMPL_VAR NAME="searchdesc" -->”</strong> returned <!-- TMPL_VAR NAME="total" --> results.</p>
</div>
</p>
</div>
<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
+<!-- /TMPL_IF --> -->
<div id="yui-main">
<!-- TABLE RESULTS START -->
<table>
<tr><td colspan="3"><p class="searchresults">
- <!-- RE-SORT START --> <label><select id="sort_by" name="sort_by" onchange="document.myform.submit();"> <!--TMPL_INCLUDE Name="resort_form.inc"--> </select></label> <!-- RESORT END -->
+ <!-- RE-SORT START --> <label><select id="sort_by" name="sort_by" onchange="document.bookbag_form.submit();"> <!--TMPL_INCLUDE Name="resort_form.inc"--> </select></label> <!-- RESORT END -->
- <!-- TMPL_IF name="opacbookbag" --><a href="#" onclick="SelectAll()"><img src="/opac-tmpl/prog/images/checkall.gif" alt="Check All" border="0"></a>
- <input type="button" class="button" value="Add checked items to book bag" onclick="addMultiple(); return false;" />
- <input type="reset" value="Clear All" class="button" />
+ <!-- TMPL_IF name="opacbookbag" --><a href="#" onclick="SelectAll()"><img src="/opac-tmpl/prog/images/checkall.gif" alt="Check All" border="0" /></a>
+ <input type="button" class="icon shelf" value="Add checked items to book bag" onclick="addMultiple(); return false;" />
+ <input type="reset" value="Clear All" class="icon shelf" />
<!-- /TMPL_IF --></p></td></tr>
<!-- Actual Search Results -->
<!-- TMPL_LOOP NAME="SEARCH_RESULTS" -->
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_IF -->
- <td> <!-- TMPL_IF NAME="AmazonContent" -->
+ <td><!-- TMPL_IF NAME="AmazonContent" -->
<a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
<img src="<!-- TMPL_IF NAME="isbn" -->http://images.amazon.com/images/P/<!-- TMPL_VAR name="isbn" -->.01.TZZZZZZZ.jpg<!-- TMPL_ELSE -->http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif<!-- /TMPL_IF -->" alt="image" class="thumbnail" />
</a>
<!-- TMPL_ELSE -->
<!-- TMPL_IF name="imageurl" -->
- <img src="<!-- TMPL_VAR name="imageurl" -->" title="<!-- TMPL_VAR name="description" -->"/>
+ <img src="<!-- TMPL_VAR name="imageurl" -->" title="<!-- TMPL_VAR name="description" -->" />
<!-- TMPL_ELSE -->
<!-- TMPL_VAR name="description" -->
<!-- /TMPL_IF -->
<div class="pages">
<!-- Row of numbers corresponding to search result pages -->
<!-- TMPL_IF NAME="previous_page_offset" -->
- <a class="nav" href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->&offset=<!-- TMPL_VAR NAME="previous_page_offset" -->">
+ <a class="nav" href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->&offset=<!-- TMPL_VAR NAME="previous_page_offset" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="limit" -->&limit=<!-- TMPL_VAR NAME="limit" --><!-- /TMPL_IF -->">
<< Previous
</a>
<!-- /TMPL_IF -->
<!-- TMPL_LOOP NAME="PAGE_NUMBERS" -->
- <!-- TMPL_IF NAME="highlight" -->
- <span class="current"><!-- TMPL_VAR NAME="pg" --></span>
+ <!-- TMPL_IF NAME="highlight" --><span class="current"><!-- TMPL_VAR NAME="pg" --></span>
<!-- TMPL_ELSE -->
- <a class="nav" href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->&offset=<!-- TMPL_VAR NAME="offset" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->">
- <!-- TMPL_VAR NAME="pg" -->
- </a>
+ <a class="nav" href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->&offset=<!-- TMPL_VAR NAME="offset" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="limit" -->&limit=<!-- TMPL_VAR NAME="limit" --><!-- /TMPL_IF -->"><!-- TMPL_VAR NAME="pg" --></a>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
- <!-- TMPL_IF NAME="next_page_offset" -->
- <a class="nav" href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->&offset=<!-- TMPL_VAR NAME="next_page_offset" -->">
- Next >>
- </a>
- <!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="next_page_offset" --><a class="nav" href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_VAR NAME="searchdesc" -->&offset=<!-- TMPL_VAR NAME="next_page_offset" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="limit" -->&limit=<!-- TMPL_VAR NAME="limit" --><!-- /TMPL_IF -->">Next >></a><!-- /TMPL_IF -->
</div>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- TMPL_IF name="suggestion" -->
-<div class="suggestion">Not finding what you're looking for?<br /> Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></div>
+<!-- TMPL_IF NAME="AnonSuggestions" --><div class="suggestion">Not finding what you're looking for?<br /> Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></div><!-- TMPL_ELSE --><!-- TMPL_IF NAME="loggedinusername" --><div class="suggestion">Not finding what you're looking for?<br /> Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></div><!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</div>
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<!-- TMPL_IF Name="viewshelf" -->
-<h3><a href="/cgi-bin/koha/opac-shelves.pl">Virtual Shelves</a> <img src="<!-- TMPL_VAR NAME="themelang" -->/images/caret.gif" width="16" height="16" alt=">" border="0" /> <!-- TMPL_IF NAME="itemsloop" --><em><!-- TMPL_VAR Name="shelfname" --></em><!-- TMPL_ELSE -->The Virtual Shelf <em><!-- TMPL_VAR Name="shelfname" --></em> is empty<!-- /TMPL_IF --></h3>
-<form class="inline" action="/cgi-bin/koha/opac-shelves.pl" method="post" name="myform">
+<h3><a href="/cgi-bin/koha/opac-shelves.pl">Virtual Shelves</a> <img src="<!-- TMPL_VAR NAME="themelang" -->/../images/caret.gif" width="16" height="16" alt=">" border="0" /> <em><!-- TMPL_VAR Name="shelfname" --></em></h3>
+<!-- TMPL_IF NAME="itemsloop" -->
+<form action="/cgi-bin/koha/opac-shelves.pl" method="post" name="myform">
<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>
+ <!-- TMPL_IF name="manageshelf" --><th>
+ <a href="/cgi-bin/koha/opac-shelves.pl" onclick="CheckAll(); return false;"><img src="<!-- TMPL_VAR NAME="themelang" -->/../images/checkall.gif" alt="Check All" border="0" /></a>
+ </th><!-- /TMPL_IF -->
<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>
+ <!-- TMPL_IF name="color" -->
+ <tr class="highlight">
+ <!-- TMPL_ELSE -->
+ <tr><!-- /TMPL_IF -->
+ <!-- TMPL_IF name="manageshelf" --><td>
<input type="checkbox" name="MOD-<!-- TMPL_VAR Name="biblionumber" -->" />
- <input type="hidden" name="ModBiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->">
- </td>
+ <input type="hidden" name="ModBiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
+ </td><!-- /TMPL_IF -->
<td>
- <img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" />
+ <img src="<!-- TMPL_VAR NAME="themelang" -->/../itemtypeimg/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" />
</td>
<td>
<!-- TMPL_IF name="BiblioDefaultViewmarc" -->
<!-- /TMPL_LOOP -->
</table>
<!-- TMPL_ELSE -->
- <tr><td colspan="5">This Virtual Shelf is empty.</td></tr>
+ <div class="message">This Virtual Shelf is empty.</div>
<!-- /TMPL_IF -->
</table>
- <!-- TMPL_IF name="manageshelf" --><!-- TMPL_IF NAME="itemsloop" --><a href="/cgi-bin/koha/opac-shelves.pl" onclick="CheckAll(); return false;"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/checkall.gif" height="18" width="18" alt="Check All" title="Check All" border="0" /></a><input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR Name="shelfnumber" -->" />
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="manageshelf" --><!-- TMPL_IF NAME="itemsloop" --><input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR Name="shelfnumber" -->" />
<input type="hidden" name="modifyshelfcontents" value="1" />
- <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" /><input type="submit" value="Remove Selected Items" class="icon delete" onclick="return confirmDelete('Are you sure you want to remove these items from the list?')" /><!-- /TMPL_IF --><!-- /TMPL_IF --></form><!-- TMPL_IF name="manageshelf" --> <form class="inline" method="get" action="/cgi-bin/koha/opac-shelves.pl"><input type="hidden" name="op" value="modif" /><input type="hidden" value="<!-- TMPL_VAR NAME="shelfnumber" -->" name="shelf" /><input type="submit" value="Rename this Shelf" class="icon edit" /></form> <!-- TMPL_UNLESS NAME="itemsloop" --><form class="inline" method="get" action="/cgi-bin/koha/opac-shelves.pl"><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 Virtual Shelf" onclick="return confirmDelete('Are you sure you want to delete this Virtual Shelf?')" /></form><!-- /TMPL_UNLESS -->
-<br /><br /><!-- TMPL_IF name="manageshelf" -->
-<form action="/cgi-bin/koha/opac-shelves.pl" method="post">
- <table>
- <tr><th colspan="2">Add an Item to this Virtual 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="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->" /><input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" /><input type="hidden" name="modifyshelfcontents" value="1" /><input type="submit" value="Save" class="submit" /></td>
- </tr>
- </table>
-</form><!-- /TMPL_IF -->
+ <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" /><input type="submit" value="Remove Selected Items" class="icon delete" onclick="return confirmDelete('Are you sure you want to remove these items from the list?')" /><!-- /TMPL_IF --><!-- /TMPL_IF --></form><!-- TMPL_IF name="manageshelf" --><!-- TMPL_UNLESS NAME="itemsloop" --><form method="get" action="/cgi-bin/koha/opac-shelves.pl"><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 Virtual Shelf" onclick="return confirmDelete('Are you sure you want to delete this Virtual Shelf?')" /></form><!-- /TMPL_UNLESS -->
<!-- /TMPL_IF -->
-<form class="inline" method="get" action="opac-shelves.pl"><input type="submit" class="icon back" value="Back to Virtual Shelves" /></form> <form class="inline" action="opac-shelves.pl" method="get"><input type="hidden" value="1" name="shelves" /><input type="submit" value="Add or Remove Virtual Shelves" class="icon add" /></form>
<!-- TMPL_ELSE -->
<!-- TMPL_IF Name="shelves" -->
<!-- TMPL_IF Name="status1" -->
<p class="error"><!-- TMPL_VAR Name="string" --></p>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
-<div id="center">
<form method="post" action="/cgi-bin/koha/opac-shelves.pl">
<input type="hidden" name="shelves" value="1">
<div class="form"><table>
</table></div>
<p><input type="hidden" name="category" value="1" /><input type="submit" value="Add New Shelf" class="icon add"></p>
- </form>
- </div>
+ </form>
<div id="right"><!-- TMPL_IF NAME="shelveslooppriv" -->
<form method="post" action="/cgi-bin/koha/opac-shelves.pl" name="mainform">
</table><p><sup>*</sup>All items must be removed from Virtual Shelves prior to deletion.</p>
<input type="submit" value="Delete Selected Lists" onclick="return confirmDelete('Are you sure you want to delete this list?')" class="icon delete" /> </form>
<!-- /TMPL_IF -->
- <p><form class="inline" action="opac-shelves.pl" method="get"><input type="submit" class="icon back" value="Back to Virtual Shelves" /></form></p>
+ <p><form action="opac-shelves.pl" method="get"><input type="submit" class="icon back" value="Back to Virtual Shelves" /></form></p>
</div>
<!-- TMPL_ELSE -->
<!-- TMPL_IF name="edit" -->
</form>
<!-- /TMPL_IF -->
+<!-- TMPL_UNLESS NAME="viewshelf" -->
<h2>Virtual Shelves</h2>
<ul class="link-tabs">
<!-- TMPL_IF name="showprivateshelves" -->
-<li id="privateshelves_tab" class="on">
-<!-- TMPL_ELSE -->
-<li id="privateshelves_tab" class="off">
-<!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves" onclick="changeView('privateshelves'); return false;">Your Virtual Shelves</a> </li>
-<!-- TMPL_IF name="showpublicshelves" -->
-<li id="publicshelves_tab" class="on">
-<!-- TMPL_ELSE -->
-<li id="publicshelves_tab" class="off">
+<li id="privateshelves_tab" class="on"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your Virtual Shelves</a> </li>
+<!-- TMPL_ELSE -->
+<li id="privateshelves_tab" class="off"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Your Virtual Shelves</a> </li>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF name="showpublicshelves" -->
+<li id="publicshelves_tab" class="on"><a href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves">Public Virtual Shelves</a></li>
+<!-- TMPL_ELSE -->
+<li id="publicshelves_tab" class="off"><a href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves">Public Virtual Shelves</a></li>
<!-- /TMPL_IF -->
-<a href="/cgi-bin/koha/opac-shelves.pl?display=publicshelves" onclick="changeView('publicshelves'); return false;">Public Virtual Shelves</a></li>
-
</ul>
+
<!-- TMPL_IF name="showprivateshelves" -->
-<div id="privateshelves" style="display:block;">
-<!-- TMPL_ELSE -->
-<div id="privateshelves" style="display:none;">
+<div id="privateshelves" class="tab-container" style="display:block;">
+<!-- TMPL_ELSE -->
+<div id="privateshelves" class="tab-container" style="display:none;">
<!-- /TMPL_IF -->
+
<!-- TMPL_IF NAME="loggedinusername" -->
-<table>
+<!-- TMPL_IF NAME="shelveslooppriv" --><table>
<tr><th>List Name</th><th>Contents</th><th> </th></tr>
<!-- TMPL_IF NAME="shelveslooppriv" --><!-- TMPL_LOOP Name="shelveslooppriv" -->
-<!-- TMPL_IF name="color" --> <tr class="highlight"><!--TMPL_ELSE--><tr><!-- /TMPL_IF --><td><a href="opac-shelves.pl?viewshelf=<!-- TMPL_VAR Name="shelf" -->"><!-- TMPL_VAR Name="shelfname" --></a></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" -->">Rename</a><!-- TMPL_ELSE --> <!-- /TMPL_IF --></td></tr><!-- /TMPL_LOOP --><!-- TMPL_ELSE --><tr><td colspan="4">Click below to create a new Virtual Shelf!</td></tr><!-- /TMPL_IF --></table>
-<p><form action="opac-shelves.pl" method="get"><input type="hidden" value="1" name="shelves" /><input type="submit" value="Add or Remove Virtual Shelves" class="icon add" /></form></p>
+<!-- TMPL_IF name="color" --> <tr class="highlight"><!--TMPL_ELSE--><tr><!-- /TMPL_IF --><td><a href="opac-shelves.pl?viewshelf=<!-- TMPL_VAR Name="shelf" -->"><!-- TMPL_VAR Name="shelfname" --></a></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" -->">Rename</a> <a class="delete" href="opac-shelves.pl?shelves=1&DEL-<!-- TMPL_VAR NAME="shelf" -->=1">Delete</a><!-- TMPL_ELSE --> <!-- /TMPL_IF --></td></tr><!-- /TMPL_LOOP --><!-- TMPL_ELSE --><tr><td colspan="4">Click below to create a new Virtual Shelf!</td></tr><!-- /TMPL_IF --></table>
+<!-- TMPL_ELSE -->No private shelves.<!-- /TMPL_IF -->
<!-- TMPL_ELSE -->
<p><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create your own private Virtual Shelf</p>
<!-- /TMPL_IF -->
-
</div>
-<!-- TMPL_IF name="showpublicshelves" --><div id="publicshelves" style="display:block;">
+<!-- TMPL_IF name="showpublicshelves" -->
+<div id="publicshelves" class="tab-container" style="display:block;">
<!-- TMPL_ELSE -->
-<div id="publicshelves" style="display:none;">
-<!-- /TMPL_IF --><table>
+<div id="publicshelves" class="tab-container" style="display:none;">
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="shelvesloop" -->
+<table>
<tr><th>List Name</th><th>Contents</th></tr>
<!-- TMPL_LOOP Name="shelvesloop" -->
<!-- TMPL_IF name="color" --> <tr class="highlight"><!--TMPL_ELSE--><tr><!-- /TMPL_IF --><td><a href="opac-shelves.pl?viewshelf=<!-- TMPL_VAR Name="shelf" -->"><!-- TMPL_VAR Name="shelfname" --></a></td><td><!-- TMPL_VAR Name="shelfbookcount" --> item(s)</td></tr>
<!-- /TMPL_LOOP -->
- </table></div>
+ </table>
+ <!-- TMPL_ELSE -->
+ No public shelves.
+ <!-- /TMPL_IF --></div>
<!-- /TMPL_IF -->
+ <!-- /TMPL_UNLESS -->
+
<!-- /TMPL_IF -->
</div>
}
}
+ # set the default tab, etc.
+ my $shelf_type = $query->param('display');
+ if ((!$shelf_type) || ($shelf_type eq 'privateshelves')) {
+ $template->param(showprivateshelves => 1);
+ } elsif ($shelf_type eq 'publicshelves') {
+ $template->param(showpublicshelves => 1);
+ }
+
# getting the Shelves list
my $shelflist = GetShelves( $loggedinuser, 2 );
$template->param( { loggedinuser => $loggedinuser } );
GetShelves( $loggedinuser, 2 )
; # rebuild shelflist in case a shelf has been added
-my $color = '';
+my $color='';
my @shelvesloop;
-foreach my $element ( sort keys %$shelflist ) {
- my %line;
- ( $color eq 1 ) ? ( $color = 0 ) : ( $color = 1 );
- $line{'toggle'} = $color;
- $line{'shelf'} = $element;
- $line{'shelfname'} = $shelflist->{$element}->{'shelfname'};
- $line{ "category" . $shelflist->{$element}->{'category'} } = 1;
- $line{'mine'} = 1 if $shelflist->{$element}->{'owner'} eq $loggedinuser;
- $line{'shelfvirtualcount'} = $shelflist->{$element}->{'count'};
- $line{'canmanage'} =
- ShelfPossibleAction( $loggedinuser, $element, 'manage' );
- $line{'firstname'} = $shelflist->{$element}->{'firstname'}
- unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
- $line{'surname'} = $shelflist->{$element}->{'surname'}
- unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
- push( @shelvesloop, \%line );
- }
+my @shelveslooppriv;
+foreach my $element (sort keys %$shelflist) {
+ my %line;
+ my %linepriv;
+ ($color eq 0) ? ($color=1) : ($color=0);
+ if ($shelflist->{$element}->{'category'} eq 2) {
+ $line{'color'}= $color;
+ $line{'shelf'}=$element;
+ $line{'shelfname'}=$shelflist->{$element}->{'shelfname'};
+ $line{"category".$shelflist->{$element}->{'category'}} = 1;
+ $line{'mine'} = 1 if $shelflist->{$element}->{'owner'} eq $loggedinuser;
+ $line{'shelfbookcount'}=$shelflist->{$element}->{'count'};
+ $line{'canmanage'} = ShelfPossibleAction($loggedinuser,$element,'manage');
+ $line{'firstname'}=$shelflist->{$element}->{'firstname'} unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
+ $line{'surname'}=$shelflist->{$element}->{'surname'} unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
+
+ push (@shelvesloop, \%line);
+ } elsif ($shelflist->{$element}->{'category'} eq 1) {
+ $linepriv{'color'}= $color;
+ $linepriv{'shelf'}=$element;
+ $linepriv{'shelfname'}=$shelflist->{$element}->{'shelfname'};
+ $linepriv{"category".$shelflist->{$element}->{'category'}} = 1;
+ $linepriv{'mine'} = 1 if $shelflist->{$element}->{'owner'} eq $loggedinuser;
+ $linepriv{'shelfbookcount'}=$shelflist->{$element}->{'count'};
+ $linepriv{'canmanage'} = ShelfPossibleAction($loggedinuser,$element,'manage');
+ $linepriv{'firstname'}=$shelflist->{$element}->{'firstname'} unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
+ $linepriv{'surname'}=$shelflist->{$element}->{'surname'} unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
+ push (@shelveslooppriv, \%linepriv);
+ }
+}
$template->param(
+ shelveslooppriv => \@shelveslooppriv,
shelvesloop => \@shelvesloop,
"BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1,
);