From 03382a089df2e48799c0dcaa0b3cecebef6c1ddf Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 2 Dec 2014 13:33:11 +0100 Subject: [PATCH] Bug 13372: Items lost report improvements This enhancement adds new column to display the call number on the items lost report. On the way, DataTables and ColVis are added on the table. Test plan: 1/ Go on the items lost report (reports/itemslost.pl) and verify that the call number column is correctly filled. 2/ On the way, verify that the 'Library' and 'Current location' now contain the name instead of the code. 3/ Go on the columns configuration in the admin module (admin/columns_settings.pl), play with the ColVis plugin and confirm that all works correctly. Signed-off-by: David Roberts Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- C4/Items.pm | 2 +- admin/columns_settings.yml | 31 +++++ .../prog/en/modules/admin/columns_settings.tt | 7 ++ .../prog/en/modules/reports/itemslost.tt | 106 +++++++++++------- 4 files changed, 105 insertions(+), 41 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 845bc70cd3..aea1c1d159 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1000,7 +1000,7 @@ sub GetLostItems { my $query = " SELECT title, author, lib, itemlost, authorised_value, barcode, datelastseen, price, replacementprice, homebranch, - itype, itemtype, holdingbranch, location, itemnotes, items.biblionumber as biblionumber + itype, itemtype, holdingbranch, location, itemnotes, items.biblionumber as biblionumber, itemcallnumber FROM items LEFT JOIN biblio ON (items.biblionumber = biblio.biblionumber) LEFT JOIN biblioitems ON (items.biblionumber = biblioitems.biblionumber) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 5222253489..f2d9cc9e7e 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -51,3 +51,34 @@ modules: columnname: active - columnname: actions + reports: + lostitems: + lostitems-table: + - + columnname: title + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: author + - + columnname: lostcode + - + columnname: barcode + - + columnname: callnumber + - + columnname: datelastseen + - + columnname: price + - + columnname: replacementprice + - + columnname: library + - + columnname: itemtype + - + columnname: current_location + - + columnname: location + - + columnname: notes diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt index b1a8565396..db629e5d60 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt @@ -144,6 +144,13 @@

Circulation tables

[% PROCESS pagelist module=modules.circ modulename="circ" %] + +

Reports

+
+

Reports tables

+ [% PROCESS pagelist module=modules.reports modulename="reports" %] +
+ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt index 8fb7872f19..b751a290bd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt @@ -1,6 +1,29 @@ +[% USE Branches %] +[% USE ColumnsSettings %] [% INCLUDE 'doc-head-open.inc' %] Koha › Reports › Lost items [% INCLUDE 'doc-head-close.inc' %] + +[% INCLUDE 'datatables.inc' %] +[% INCLUDE 'columns_settings.inc' %] + + [% INCLUDE 'header.inc' %] @@ -26,47 +49,50 @@ [% END %] - [% IF ( itemsloop ) %] - - - - - - - - - - - - - - - [% FOREACH itemsloo IN itemsloop %] - [% UNLESS ( loop.odd ) %] - - [% ELSE %] - - [% END %] - - - - - - - - - - - - - + [% IF itemsloop %] +
TitleAuthorLost codeBarcodeDate last seenPriceRep.priceLibraryItem typeCurrent locationLocationNotes
- [% itemsloo.title |html %] - [% itemsloo.author %][% itemsloo.lib %] - [% itemsloo.barcode %] - [% itemsloo.datelastseen %][% itemsloo.price %][% itemsloo.replacementprice %][% itemsloo.homebranch %][% IF ( itemsloo.itype_level ) %][% itemsloo.itype %][% ELSE %][% itemsloo.itemtype %][% END %][% itemsloo.holdingbranch %][% itemsloo.location %][% itemsloo.itemnotes %]
+ + + + + + + + + + + + + + + + + + + [% FOREACH itemsloo IN itemsloop %] + + + + + + + + + + + + + + + + [% END %] + +
TitleAuthorLost codeBarcodeCall numberDate last seenPriceRep.priceLibraryItem typeCurrent locationLocationNotes
+ [% itemsloo.title |html %] + [% itemsloo.author %][% itemsloo.lib %] + [% itemsloo.barcode %] + [% itemsloo.itemcallnumber %][% itemsloo.datelastseen %][% itemsloo.price %][% itemsloo.replacementprice %][% Branches.GetName(itemsloo.homebranch) %][% IF ( itemsloo.itype_level ) %][% itemsloo.itype %][% ELSE %][% itemsloo.itemtype %][% END %][% Branches.GetName(itemsloo.holdingbranch) %][% itemsloo.location %][% itemsloo.itemnotes %]
[% END %] - - [% END %] [% ELSE %]
-- 2.20.1