$(function() {
[% IF ( opacbookbag ) %]$(".addtocart").show();[% END %]
- $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_('Clear all')+"<\/a>");
- $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_('Select all')+"<\/a>");
+ $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
+ $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
$("a.print").show();
- [% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]$("#placehold").html("<a href=\"#\" class=\"hold tag_hides disabled\">"+_('Place hold')+"<\/a>");
+ [% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]$("#placehold").html("<a href=\"#\" class=\"hold tag_hides disabled\">"+_("Place hold")+"<\/a>");
$("#selections-toolbar a.hold").click(function(){
holdSelections();
return false;
alert(alertString2);
}
}
+
+$(document).ready(function() {
+ $('#sort-submit').hide();
+});
+
//]]>
</script>
</head>
<a class="print" href="opac-shelves.pl" onclick="print(); return false;">Print list</a>
+<form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form">
+ <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
+
+ <label for="sort">Sort by: </label>
+ <select name="sort" onchange="$('#sorting-form').submit()">
+ <option value="">Default sorting</option>
+
+ [% IF sort == 'author' %]
+ <option value="author" selected="selected">Author</option>
+ [% ELSE %]
+ <option value="author">Author</option>
+ [% END %]
+
+ [% IF sort == 'title' %]
+ <option value="title" selected="selected">Title</option>
+ [% ELSE %]
+ <option value="title">Title</option>
+ [% END %]
+
+ [% IF sort == 'itemcallnumber' %]
+ <option value="itemcallnumber" selected="selected">Call number</option>
+ [% ELSE %]
+ <option value="itemcallnumber">Call number</option>
+ [% END %]
+
+ <input type="submit" id="sort-submit" value="Resort list" />
+ </select>
+</form>
+
[% IF ( manageshelf ) %] <span class="sep">|</span> <form method="get" action="opac-shelves.pl"><input type="hidden" name="op" value="modif" />
<input type="hidden" name="display" value="viewshelf" />
<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> <input type="submit" class="editshelf" value="Edit list" /></form>
<li>
<label for="sortfield" >Sort this list by: </label>
<select name="sortfield" id="sortfield">
- [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
- [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
- [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %]
- [% IF ( sort_itemcallnumber ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
+ [% IF ( sortfield == "title" ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
+ [% IF ( sortfield == "author" ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
+ [% IF ( sortfield == "copyrightdate" ) %]<option value="copyrightdate" selected="selected">Year</option>[% ELSE %]<option value="copyrightdate">Year</option>[% END %]
+ [% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
</select>
</li>
<li>
<li>
<label for="sortfield" >Sort this list by: </label>
<select name="sortfield" id="sortfield">
- [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
- [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
- [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %]
- [% IF ( sort_itemcallnumber ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
+ <option value="title">Title</option>
+ <option value="author">Author</option>
+ <option value="copyrightdate">Year</option>
+ <option value="itemcallnumber">Call number</option>
</select>
</li>
<li>