Bugzilla – Attachment 80170 Details for
Bug 19490
Add a 'holds' column to the Batch Item Modification Tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19490: Add a 'Holds' column to the items batchmodification tool
Bug-19490-Add-a-Holds-column-to-the-items-batchmod.patch (text/plain), 5.99 KB, created by
Katrin Fischer
on 2018-10-06 20:53:56 UTC
(
hide
)
Description:
Bug 19490: Add a 'Holds' column to the items batchmodification tool
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-10-06 20:53:56 UTC
Size:
5.99 KB
patch
obsolete
>From 16304ccb81e1f155f712440e3d6ba8377e743590 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 14 May 2018 20:57:57 +0000 >Subject: [PATCH] Bug 19490: Add a 'Holds' column to the items > batchmodification tool >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: >1 - Add some items to bathc modification >2 - Note there is no indication fo holds >3 - Apply patch >4 - Reload and note you can see how many holds (or none) >5 - Note you can hide this column with css: > #batchMod-edit .holds_count { display: none; } >6 - Note the column has a tooltip to indicate item vs. record holds > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt | 2 ++ > koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js | 10 +++++----- > tools/batchMod.pl | 4 ++++ > 3 files changed, 11 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >index ed8584f..af61435 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >@@ -158,6 +158,7 @@ $(document).ready(function(){ > <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 %] >@@ -176,6 +177,7 @@ $(document).ready(function(){ > <td> </td> > [% END %] > <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> >+ <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> > [% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field | html %]</td> > [% END %] </tr> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >index 40ae5bd..c20a415 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >@@ -11,7 +11,7 @@ function hideColumns(){ > $("#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"); > } >@@ -24,7 +24,7 @@ function hideColumn(num) { > 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 >@@ -60,7 +60,7 @@ function showColumn(num){ > $("#"+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 >@@ -82,14 +82,14 @@ function showColumn(num){ > 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: '/' }); >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index d3c8d50..7f730ae 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -574,6 +574,8 @@ sub BuildItemsData{ > $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); >@@ -597,6 +599,8 @@ sub BuildItemsData{ > $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); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19490
:
75321
|
75489
|
75516
|
75533
|
75534
|
79429
|
79430
| 80170 |
80171
|
80705
|
80708