View | Details | Raw Unified | Return to bug 19490
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt (+2 lines)
Lines 137-142 $(document).ready(function(){ Link Here
137
    <tr>
137
    <tr>
138
        <th>&nbsp;</th>
138
        <th>&nbsp;</th>
139
        <th class="anti-the">Title</th>
139
        <th class="anti-the">Title</th>
140
        <th class="holds_count" title="Item holds / Total holds">Holds</th>
140
        [% FOREACH item_header_loo IN item_header_loop %]
141
        [% FOREACH item_header_loo IN item_header_loop %]
141
        <th> [% item_header_loo.header_value %] </th>
142
        <th> [% item_header_loo.header_value %] </th>
142
        [% END %] 
143
        [% END %] 
Lines 155-160 $(document).ready(function(){ Link Here
155
                  <td>&nbsp;</td>
156
                  <td>&nbsp;</td>
156
                [% END %]
157
                [% END %]
157
                <td><label for="row[% item_loo.itemnumber %]"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item_loo.biblionumber %]">[% item_loo.title %]</a>[% IF ( item_loo.author ) %], by [% item_loo.author %][% END %]</label></td>
158
                <td><label for="row[% item_loo.itemnumber %]"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item_loo.biblionumber %]">[% item_loo.title %]</a>[% IF ( item_loo.author ) %], by [% item_loo.author %][% END %]</label></td>
159
                <td class="holds_count"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber %]">[% IF item_loo.holds %][% item_loo.item_holds %]/[% item_loo.holds %][% ELSE %][% item_loo.holds %][% END %]</a></td>
158
                [% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field |html %]</td> 
160
                [% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field |html %]</td> 
159
        [% END %] </tr>
161
        [% END %] </tr>
160
            [% END %]
162
            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js (-5 / +5 lines)
Lines 11-17 function hideColumns(){ Link Here
11
    $("#showall").prop("checked", false).parent().removeClass("selected");
11
    $("#showall").prop("checked", false).parent().removeClass("selected");
12
    for( i=0; i<valCookie.length; i++ ){
12
    for( i=0; i<valCookie.length; i++ ){
13
      if(valCookie[i] !== ''){
13
      if(valCookie[i] !== ''){
14
        index = valCookie[i] - 2;
14
        index = valCookie[i] - 3;
15
        $("#itemst td:nth-child("+valCookie[i]+"),#itemst th:nth-child("+valCookie[i]+")").toggle();
15
        $("#itemst td:nth-child("+valCookie[i]+"),#itemst th:nth-child("+valCookie[i]+")").toggle();
16
        $("#checkheader"+index).prop("checked", false).parent().removeClass("selected");
16
        $("#checkheader"+index).prop("checked", false).parent().removeClass("selected");
17
      }
17
      }
Lines 24-30 function hideColumn(num) { Link Here
24
  valCookie = $.cookie("showColumns");
24
  valCookie = $.cookie("showColumns");
25
  // set the index of the table column to hide
25
  // set the index of the table column to hide
26
  $("#"+num).parent().removeClass("selected");
26
  $("#"+num).parent().removeClass("selected");
27
  var hide = Number(num.replace("checkheader","")) + 2;
27
  var hide = Number(num.replace("checkheader","")) + 3;
28
  // hide header and cells matching the index
28
  // hide header and cells matching the index
29
  $("#itemst td:nth-child("+hide+"),#itemst th:nth-child("+hide+")").toggle();
29
  $("#itemst td:nth-child("+hide+"),#itemst th:nth-child("+hide+")").toggle();
30
  // set or modify cookie with the hidden column's index
30
  // set or modify cookie with the hidden column's index
Lines 60-66 function showColumn(num){ Link Here
60
  $("#"+num).parent().addClass("selected");
60
  $("#"+num).parent().addClass("selected");
61
  valCookie = $.cookie("showColumns");
61
  valCookie = $.cookie("showColumns");
62
  // set the index of the table column to hide
62
  // set the index of the table column to hide
63
  show = Number(num.replace("checkheader","")) + 2;
63
  show = Number(num.replace("checkheader","")) + 3;
64
  // hide header and cells matching the index
64
  // hide header and cells matching the index
65
  $("#itemst td:nth-child("+show+"),#itemst th:nth-child("+show+")").toggle();
65
  $("#itemst td:nth-child("+show+"),#itemst th:nth-child("+show+")").toggle();
66
  // set or modify cookie with the hidden column's index
66
  // set or modify cookie with the hidden column's index
Lines 82-95 function showColumn(num){ Link Here
82
function showAllColumns(){
82
function showAllColumns(){
83
    $("#selections").checkCheckboxes();
83
    $("#selections").checkCheckboxes();
84
    $("#selections span").addClass("selected");
84
    $("#selections span").addClass("selected");
85
    $("#itemst td:nth-child(2),#itemst tr th:nth-child(2)").nextAll().show();
85
    $("#itemst td:nth-child(3),#itemst tr th:nth-child(3)").nextAll().show();
86
    $.removeCookie("showColumns", { path: '/' });
86
    $.removeCookie("showColumns", { path: '/' });
87
    $("#hideall").prop("checked", false).parent().removeClass("selected");
87
    $("#hideall").prop("checked", false).parent().removeClass("selected");
88
}
88
}
89
function hideAllColumns(){
89
function hideAllColumns(){
90
    $("#selections").unCheckCheckboxes();
90
    $("#selections").unCheckCheckboxes();
91
    $("#selections span").removeClass("selected");
91
    $("#selections span").removeClass("selected");
92
    $("#itemst td:nth-child(2),#itemst th:nth-child(2)").nextAll().hide();
92
    $("#itemst td:nth-child(3),#itemst th:nth-child(3)").nextAll().hide();
93
    $("#hideall").prop("checked", true).parent().addClass("selected");
93
    $("#hideall").prop("checked", true).parent().addClass("selected");
94
    var cookieString = allColumns.join("/");
94
    var cookieString = allColumns.join("/");
95
    $.cookie("showColumns", cookieString, { expires : date, path: '/' });
95
    $.cookie("showColumns", cookieString, { expires : date, path: '/' });
(-)a/tools/batchMod.pl (-1 / +4 lines)
Lines 581-586 sub BuildItemsData{ Link Here
581
            $this_row{author}       = $biblio->author;
581
            $this_row{author}       = $biblio->author;
582
            $this_row{isbn}         = $biblio->biblioitem->isbn;
582
            $this_row{isbn}         = $biblio->biblioitem->isbn;
583
            $this_row{biblionumber} = $biblio->biblionumber;
583
            $this_row{biblionumber} = $biblio->biblionumber;
584
            $this_row{holds}        = $biblio->holds->count;
585
            $this_row{item_holds}   = Koha::Holds->search( itemnumber => $itemnumber )->count;
584
586
585
			if (%this_row) {
587
			if (%this_row) {
586
				push(@big_array, \%this_row);
588
				push(@big_array, \%this_row);
Lines 604-609 sub BuildItemsData{ Link Here
604
      $row_data{title} = $row->{title};
606
      $row_data{title} = $row->{title};
605
      $row_data{isbn} = $row->{isbn};
607
      $row_data{isbn} = $row->{isbn};
606
      $row_data{biblionumber} = $row->{biblionumber};
608
      $row_data{biblionumber} = $row->{biblionumber};
609
      $row_data{holds}        = $row->{holds};
610
      $row_data{item_holds}   = $row->{item_holds};
607
      my $is_on_loan = C4::Circulation::IsItemIssued( $row->{itemnumber} );
611
      my $is_on_loan = C4::Circulation::IsItemIssued( $row->{itemnumber} );
608
      $row_data{onloan} = $is_on_loan ? 1 : 0;
612
      $row_data{onloan} = $is_on_loan ? 1 : 0;
609
			push(@item_value_loop,\%row_data);
613
			push(@item_value_loop,\%row_data);
610
- 

Return to bug 19490