Bugzilla – Attachment 60466 Details for
Bug 8548
Add callnumber sort option to overdue report
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 8548: Add datatable to circ overdue report, remove sortby filter
SIGNED-OFF-Bug-8548-Add-datatable-to-circ-overdue-.patch (text/plain), 5.27 KB, created by
Baptiste Wojtkowski (bwoj)
on 2017-02-20 14:03:55 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 8548: Add datatable to circ overdue report, remove sortby filter
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2017-02-20 14:03:55 UTC
Size:
5.27 KB
patch
obsolete
>From 135a010446802a314bf2fc0c3a4dbe9453d00011 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 14 Feb 2017 01:36:44 +0000 >Subject: [PATCH] [SIGNED OFF] Bug 8548: Add datatable to circ overdue report, > remove sortby filter > >This patch adds a datatable to the circ overdue report. Since the >datatable makes sorting easy, I've also removed the sort by filter on >the side. > >To test: >1) Go to Circulation -> Overdues >2) Notice overdues report shows as datatable >3) Confirm sorting on all columns works >4) Test the Filters and confirm they all still work as expected > >Sponsored-by: Catalyst IT >Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >--- > circ/overdue.pl | 26 ----------------- > .../intranet-tmpl/prog/en/modules/circ/overdue.tt | 34 +++++----------------- > 2 files changed, 8 insertions(+), 52 deletions(-) > >diff --git a/circ/overdue.pl b/circ/overdue.pl >index ab723e1..d7536c3 100755 >--- a/circ/overdue.pl >+++ b/circ/overdue.pl >@@ -105,20 +105,6 @@ for my $attrcode (grep { /^patron_attr_filter_/ } $input->multi_param) { > my $have_pattr_filter_data = keys(%cgi_attrcode_to_attrvalues) > 0; > > my @patron_attr_filter_loop; # array of [ domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category ] >-my @patron_attr_order_loop; # array of { label => $patron_attr_label, value => $patron_attr_order } >- >-my @sort_roots = qw(borrower title barcode date_due); >-push @sort_roots, map {$_ . " desc"} @sort_roots; >-my @order_loop = ({selected => $order ? 0 : 1}); # initial blank row >-foreach (@sort_roots) { >- my $tmpl_name = $_; >- $tmpl_name =~ s/\s/_/g; >- push @order_loop, { >- selected => $order eq $_ ? 1 : 0, >- ordervalue => $_, >- 'order_' . $tmpl_name => 1, >- }; >-} > > my $sth = $dbh->prepare('SELECT code,description,repeatable,authorised_value_category > FROM borrower_attribute_types >@@ -139,19 +125,7 @@ while (my $row = $sth->fetchrow_hashref) { > $row->{isclone} = $isclone; > push @patron_attr_filter_loop, { %$row }; # careful: must store a *deep copy* of the modified row > } continue { $isclone = 1, ++$serial } >- foreach my $sortorder ('asc', 'desc') { >- my $ordervalue = "patron_attr_${sortorder}_${code}"; >- push @order_loop, { >- selected => $order eq $ordervalue ? 1 : 0, >- ordervalue => $ordervalue, >- label => $row->{description}, >- $sortorder => 1, >- }; >- } > } continue { ++$ordinal } >-for (@patron_attr_order_loop) { $_->{selected} = 1 if $order eq $_->{value} } >- >-$template->param(ORDER_LOOP => \@order_loop); > > my %borrowernumber_to_attributes; # hash of { borrowernumber => { attrcode => [ [val,display], [val,display], ... ] } } > # i.e. val differs from display when attr is an authorised value >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >index 6c3ee80..5e5f466 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >@@ -3,6 +3,8 @@ > <title>Koha › Circulation › Items overdue as of [% todaysdate %]</title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] >+[% INCLUDE 'datatables.inc' %] >+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > [%- USE Branches -%] > <script type="text/javascript"> > //<![CDATA[ >@@ -59,6 +61,12 @@ > }; > }); > } >+ >+ $(document).ready(function(){ >+ $("#overduest").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sPaginationType": "four_button" >+ })); >+ }); > //]]> > </script> > <style type="text/css"> >@@ -233,32 +241,6 @@ > </select> > </li> > >- <li><label for="order">Sort by:</label> <select name="order" id="order"> >-[% FOREACH ORDER_LOO IN ORDER_LOOP %] >- [% IF ( ORDER_LOO.selected ) %] >- <option value="[% ORDER_LOO.ordervalue %]" selected="selected"> >- [% ELSE %] >- <option value="[% ORDER_LOO.ordervalue %]"> >- [% END %] >- [% IF ( ORDER_LOO.order_date_due ) %]Due date >- [% ELSIF ( ORDER_LOO.order_borrower ) %]Patron >- [% ELSIF ( ORDER_LOO.order_barcode ) %]Barcode >- [% ELSIF ( ORDER_LOO.order_title ) %]Title >- [% ELSIF ( ORDER_LOO.order_date_due_desc ) %]Due date desc >- [% ELSIF ( ORDER_LOO.order_borrower_desc ) %]Patron desc >- [% ELSIF ( ORDER_LOO.order_barcode_desc ) %]Barcode desc >- [% ELSIF ( ORDER_LOO.order_title_desc ) %]Title desc >- [% ELSE %][% ORDER_LOO.label %] >- [% IF ( ORDER_LOO.desc ) %]desc[% END %] >- [% END %] >- </option> >-[% END %] >- [% FOREACH patron_attr_order_loo IN patron_attr_order_loop %] >- [% IF ( patron_attr_order_loo.selected ) %]<option value="[% patron_attr_order_loo.value |html %]" selected="selected">[% patron_attr_order_loo.label %]</option> >- [% ELSE %]<option value="[% patron_attr_order_loo.value |html %]">[% patron_attr_order_loo.label %]</option>[% END %] >- [% END %] >-</select></li> >- > <li class="radio"><label for="showall">Show any items currently checked out:</label> > [% IF ( showall ) %] > <input type="checkbox" id="showall" name="showall" value="show" checked="checked" /> >-- >2.7.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 8548
:
60170
|
60466
|
60483
|
60484
|
61302