<tr>
<th> </th>
<th class="anti-the">Title</th>
+ <th class="holds_count" title="Item holds / Total holds">Holds</th>
[% FOREACH item_header_loo IN item_header_loop %]
<th> [% item_header_loo.header_value | html %] </th>
[% END %]
<td> </td>
[% END %]
<td><label for="row[% item_loo.itemnumber | html %]"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item_loo.biblionumber | uri %]">[% item_loo.title | html %]</a>[% IF ( item_loo.author ) %], by [% item_loo.author | html %][% END %]</label></td>
+ <td class="holds_count"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber | uri %]">[% IF item_loo.holds %][% item_loo.item_holds | html %]/[% item_loo.holds | html %][% ELSE %][% item_loo.holds | html %][% END %]</a></td>
[% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field | html %]</td>
[% END %] </tr>
[% END %]
$("#showall").prop("checked", false).parent().removeClass("selected");
for( i=0; i<valCookie.length; i++ ){
if(valCookie[i] !== ''){
- index = valCookie[i] - 2;
+ index = valCookie[i] - 3;
$("#itemst td:nth-child("+valCookie[i]+"),#itemst th:nth-child("+valCookie[i]+")").toggle();
$("#checkheader"+index).prop("checked", false).parent().removeClass("selected");
}
valCookie = $.cookie("showColumns");
// set the index of the table column to hide
$("#"+num).parent().removeClass("selected");
- var hide = Number(num.replace("checkheader","")) + 2;
+ var hide = Number(num.replace("checkheader","")) + 3;
// hide header and cells matching the index
$("#itemst td:nth-child("+hide+"),#itemst th:nth-child("+hide+")").toggle();
// set or modify cookie with the hidden column's index
$("#"+num).parent().addClass("selected");
valCookie = $.cookie("showColumns");
// set the index of the table column to hide
- show = Number(num.replace("checkheader","")) + 2;
+ show = Number(num.replace("checkheader","")) + 3;
// hide header and cells matching the index
$("#itemst td:nth-child("+show+"),#itemst th:nth-child("+show+")").toggle();
// set or modify cookie with the hidden column's index
function showAllColumns(){
$("#selections").checkCheckboxes();
$("#selections span").addClass("selected");
- $("#itemst td:nth-child(2),#itemst tr th:nth-child(2)").nextAll().show();
+ $("#itemst td:nth-child(3),#itemst tr th:nth-child(3)").nextAll().show();
$.removeCookie("showColumns", { path: '/' });
$("#hideall").prop("checked", false).parent().removeClass("selected");
}
function hideAllColumns(){
$("#selections").unCheckCheckboxes();
$("#selections span").removeClass("selected");
- $("#itemst td:nth-child(2),#itemst th:nth-child(2)").nextAll().hide();
+ $("#itemst td:nth-child(3),#itemst th:nth-child(3)").nextAll().hide();
$("#hideall").prop("checked", true).parent().addClass("selected");
var cookieString = allColumns.join("/");
$.cookie("showColumns", cookieString, { expires : date, path: '/' });
$this_row{author} = $biblio->author;
$this_row{isbn} = $biblio->biblioitem->isbn;
$this_row{biblionumber} = $biblio->biblionumber;
+ $this_row{holds} = $biblio->holds->count;
+ $this_row{item_holds} = Koha::Holds->search( itemnumber => $itemnumber )->count;
if (%this_row) {
push(@big_array, \%this_row);
$row_data{title} = $row->{title};
$row_data{isbn} = $row->{isbn};
$row_data{biblionumber} = $row->{biblionumber};
+ $row_data{holds} = $row->{holds};
+ $row_data{item_holds} = $row->{item_holds};
my $is_on_loan = C4::Circulation::IsItemIssued( $row->{itemnumber} );
$row_data{onloan} = $is_on_loan ? 1 : 0;
push(@item_value_loop,\%row_data);