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 158-163 $(document).ready(function(){ Link Here
158
    <tr>
158
    <tr>
159
        <th>&nbsp;</th>
159
        <th>&nbsp;</th>
160
        <th class="anti-the">Title</th>
160
        <th class="anti-the">Title</th>
161
        <th class="holds_count" title="Item holds / Total holds">Holds</th>
161
        [% FOREACH item_header_loo IN item_header_loop %]
162
        [% FOREACH item_header_loo IN item_header_loop %]
162
        <th> [% item_header_loo.header_value | html %] </th>
163
        <th> [% item_header_loo.header_value | html %] </th>
163
        [% END %] 
164
        [% END %] 
Lines 176-181 $(document).ready(function(){ Link Here
176
                  <td>&nbsp;</td>
177
                  <td>&nbsp;</td>
177
                [% END %]
178
                [% END %]
178
                <td><label for="row[% item_loo.itemnumber | html %]"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item_loo.biblionumber | html %]">[% item_loo.title | html %]</a>[% IF ( item_loo.author ) %], by [% item_loo.author | html %][% END %]</label></td>
179
                <td><label for="row[% item_loo.itemnumber | html %]"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item_loo.biblionumber | html %]">[% item_loo.title | html %]</a>[% IF ( item_loo.author ) %], by [% item_loo.author | html %][% END %]</label></td>
180
                <td class="holds_count"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber | html %]">[% IF item_loo.holds %][% item_loo.item_holds | html %]/[% item_loo.holds | html %][% ELSE %][% item_loo.holds | html %][% END %]</a></td>
179
                [% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field | html %]</td>
181
                [% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field | html %]</td>
180
        [% END %] </tr>
182
        [% END %] </tr>
181
            [% END %]
183
            [% 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 574-579 sub BuildItemsData{ Link Here
574
            $this_row{author}       = $biblio->author;
574
            $this_row{author}       = $biblio->author;
575
            $this_row{isbn}         = $biblio->biblioitem->isbn;
575
            $this_row{isbn}         = $biblio->biblioitem->isbn;
576
            $this_row{biblionumber} = $biblio->biblionumber;
576
            $this_row{biblionumber} = $biblio->biblionumber;
577
            $this_row{holds}        = $biblio->holds->count;
578
            $this_row{item_holds}   = Koha::Holds->search( itemnumber => $itemnumber )->count;
577
579
578
			if (%this_row) {
580
			if (%this_row) {
579
				push(@big_array, \%this_row);
581
				push(@big_array, \%this_row);
Lines 597-602 sub BuildItemsData{ Link Here
597
      $row_data{title} = $row->{title};
599
      $row_data{title} = $row->{title};
598
      $row_data{isbn} = $row->{isbn};
600
      $row_data{isbn} = $row->{isbn};
599
      $row_data{biblionumber} = $row->{biblionumber};
601
      $row_data{biblionumber} = $row->{biblionumber};
602
      $row_data{holds}        = $row->{holds};
603
      $row_data{item_holds}   = $row->{item_holds};
600
      my $is_on_loan = C4::Circulation::IsItemIssued( $row->{itemnumber} );
604
      my $is_on_loan = C4::Circulation::IsItemIssued( $row->{itemnumber} );
601
      $row_data{onloan} = $is_on_loan ? 1 : 0;
605
      $row_data{onloan} = $is_on_loan ? 1 : 0;
602
			push(@item_value_loop,\%row_data);
606
			push(@item_value_loop,\%row_data);
603
- 

Return to bug 19490