Bugzilla – Attachment 34062 Details for
Bug 13372
Items lost report improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13372: Items lost report improvements
Bug-13372-Items-lost-report-improvements.patch (text/plain), 8.41 KB, created by
Jonathan Druart
on 2014-12-02 12:36:28 UTC
(
hide
)
Description:
Bug 13372: Items lost report improvements
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-12-02 12:36:28 UTC
Size:
8.41 KB
patch
obsolete
>From c89e2fe1e35a39cd55f86ade1ccc962312ee6be9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >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. >--- > 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 e63ef1b..aab6582 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -997,7 +997,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 9e9a49c..8952ed0 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -21,3 +21,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 f812709..c78c75e 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 >@@ -143,6 +143,13 @@ > <h4>Circulation tables</h4> > [% PROCESS pagelist module=modules.circ modulename="circ" %] > </div> >+ >+ <h3><a href="#reports">Reports</a></h3> >+ <div id="reports"> >+ <h4>Reports tables</h4> >+ [% PROCESS pagelist module=modules.reports modulename="reports" %] >+ </div> >+ > </div> > </div> > </div> >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 8fb7872..b751a29 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' %] > <title>Koha › Reports › Lost items</title> > [% INCLUDE 'doc-head-close.inc' %] >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+[% INCLUDE 'datatables.inc' %] >+[% INCLUDE 'columns_settings.inc' %] >+<script type='text/javascript'> >+//<![CDATA[ >+ $(document).ready(function() { >+ var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %]; >+ var lostitems_table = KohaTable("#lostitems-table", { >+ "sDom": 'C<"clearfix">t', >+ "aaSorting": [], >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ { "sType": "title-string", "aTargets" : [ "title-string" ] } >+ ], >+ "bPaginate": false, >+ }, columns_settings); >+ >+ }); >+//]]> >+</script> >+ > </head> > <body id="rep_itemslost" class="rep"> > [% INCLUDE 'header.inc' %] >@@ -26,47 +49,50 @@ > [% END %] > </div> > >- [% IF ( itemsloop ) %]<table> >- <tr> >- <th>Title</th> >- <th>Author</th> >- <th>Lost code</th> >- <th>Barcode</th> >- <th>Date last seen</th> >- <th>Price</th> >- <th>Rep.price</th> >- <th>Library</th> >- <th>Item type</th> >- <th>Current location</th> >- <th>Location</th> >- <th>Notes</th> >- </tr> >- [% FOREACH itemsloo IN itemsloop %] >- [% UNLESS ( loop.odd ) %] >- <tr class="highlight"> >- [% ELSE %] >- <tr> >- [% END %] >- <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemsloo.biblionumber %]" title="[% itemsloo.itemnotes %]"> >- [% itemsloo.title |html %] >- </a></td> >- <td>[% itemsloo.author %]</td> >- <td>[% itemsloo.lib %]</td> >- <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itemsloo.biblionumber %]" title="[% itemsloo.itemnotes %]"> >- [% itemsloo.barcode %] >- </a></td> >- <td>[% itemsloo.datelastseen %]</td> >- <td>[% itemsloo.price %]</td> >- <td>[% itemsloo.replacementprice %]</td> >- <td>[% itemsloo.homebranch %]</td> >- <td>[% IF ( itemsloo.itype_level ) %][% itemsloo.itype %][% ELSE %][% itemsloo.itemtype %][% END %]</td> >- <td>[% itemsloo.holdingbranch %]</td> >- <td>[% itemsloo.location %]</td> >- <td>[% itemsloo.itemnotes %]</td> >- </tr> >+ [% IF itemsloop %] >+ <table id="lostitems-table"> >+ <thead> >+ <tr> >+ <th>Title</th> >+ <th>Author</th> >+ <th>Lost code</th> >+ <th>Barcode</th> >+ <th>Call number</th> >+ <th>Date last seen</th> >+ <th>Price</th> >+ <th>Rep.price</th> >+ <th>Library</th> >+ <th>Item type</th> >+ <th>Current location</th> >+ <th>Location</th> >+ <th>Notes</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH itemsloo IN itemsloop %] >+ <tr> >+ <td> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemsloo.biblionumber %]" title="[% itemsloo.itemnotes %]">[% itemsloo.title |html %]</a> >+ </td> >+ <td>[% itemsloo.author %]</td> >+ <td>[% itemsloo.lib %]</td> >+ <td> >+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itemsloo.biblionumber %]" title="[% itemsloo.itemnotes %]">[% itemsloo.barcode %]</a> >+ </td> >+ <td>[% itemsloo.itemcallnumber %]</td> >+ <td>[% itemsloo.datelastseen %]</td> >+ <td>[% itemsloo.price %]</td> >+ <td>[% itemsloo.replacementprice %]</td> >+ <td>[% Branches.GetName(itemsloo.homebranch) %]</td> >+ <td>[% IF ( itemsloo.itype_level ) %][% itemsloo.itype %][% ELSE %][% itemsloo.itemtype %][% END %]</td> >+ <td>[% Branches.GetName(itemsloo.holdingbranch) %]</td> >+ <td>[% itemsloo.location %]</td> >+ <td>[% itemsloo.itemnotes %]</td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> > [% END %] >- </table> >- [% END %] > [% ELSE %] > > <form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post"> >-- >2.1.0
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 13372
:
34062
|
34163
|
34404
|
34913
|
34914