Bugzilla – Attachment 29196 Details for
Bug 11703
Convert checkouts table to ajax datatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11703 [QA Followup]
Bug-11703-QA-Followup.patch (text/plain), 27.28 KB, created by
Kyle M Hall (khall)
on 2014-06-24 16:17:18 UTC
(
hide
)
Description:
Bug 11703 [QA Followup]
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-06-24 16:17:18 UTC
Size:
27.28 KB
patch
obsolete
>From 551f12f02bc175d6c02696c11dd37d4521b5f4b2 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 14 Apr 2014 13:45:22 -0400 >Subject: [PATCH] Bug 11703 [QA Followup] > >* Bold record title, fix table width >* Change output_pref_due to output_pref >* Retain functionality of IssuesDefaultSortOrder system preferences >* Use datatables.inc in circulation.tt >* Fix up holds table details >* Add plugin to about >* fix relatives' checkouts >* add too_many string >* remove dead syspref from db >* Sort relatives' checkouts and holds tables client side >* Provide context for translation of strings >* Fix unterminated string literal, add missing paren >* Add replacement of _AUTHOR_ with title's author for holds >* Format prices correctly >* Format checkout dates correctly > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > installer/data/mysql/updatedatabase.pl | 10 ++ > .../intranet-tmpl/prog/en/includes/strings.inc | 20 ++-- > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 62 ++++++++---- > koha-tmpl/intranet-tmpl/prog/en/js/holds.js | 43 ++++---- > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 4 + > .../prog/en/modules/circ/circulation.tt | 5 +- > svc/checkin.pl | 2 - > svc/checkouts.pl | 112 ++++++++++++-------- > svc/holds.pl | 17 ++-- > svc/renew.pl | 4 +- > 10 files changed, 170 insertions(+), 109 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index c68ba51..fb2406a 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8560,6 +8560,16 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.15.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do(q{ >+ DELETE FROM systempreferences WHERE variable = 'UseTableSortForCirc' >+ }); >+ >+ print "Upgrade to $DBversion done (Bug 11703 - Convert checkouts table to ajax datatable)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >index e22810a..3755dd1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >@@ -10,20 +10,18 @@ > var REASON_UNKNOWN = _("reason unkown"); > var TODAYS_CHECKOUTS = _("Today's checkouts"); > var PREVIOUS_CHECKOUTS = _("Previous checkouts"); >- var BY = _("by"); >+ var BY = _("by _AUTHOR_"); > var ON_HOLD = _("On hold"); > var NOT_RENEWABLE = _("Not renewable"); >- var OF = _("of"); >- var RENEWALS_REMAINING = _("renewals remaining"); >- var HOLD_IS = _("Hold is"); >- var SUSPENDED = _("suspended"); >- var UNTIL = _("until"); >- var ITEM_IS = _("Item is"); >- var WAITING = _("waiting"); >- var AT = _("at"); >- var IN_TRANSIT = _("in transit"); >+ var NOT_RENEWABLE_TOO_SOON = _("Cannot renew, renewal is premature"); >+ var RENEWALS_REMAINING = _("_RENEWALS_REMAINING_ of _RENEWALS_ALLOWED_ renewals remaining"); >+ var HOLD_IS_SUSPENDED = _("Hold is <strong>suspended</strong>"); >+ var UNTIL = _("until _SUSPEND_UNTIL_"); >+ var ITEM_IS_WAITING = _("Item is <strong>waiting</strong>"); // >+ var AT = _("at _WAITING_AT_BRANCH_"); >+ var ITEM_IS_IN_TRANSIT = _("Item is <strong>in transit</strong> from _FROM_BRANCH_"); > var FROM = _("from"); >- var NOT_TRANSFERRED_YET = _("Item hasn't been transferred yet from"); >+ var NOT_TRANSFERRED_YET = _("Item hasn't been transferred yet from _FROM_BRANCH_"); > var NO = _("No"); > var YES = _("Yes"); > //]]> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index 268eefe..eca940a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -127,12 +127,12 @@ $(document).ready(function() { > var issuesTable; > var drawn = 0; > issuesTable = $("#issues-table").dataTable({ >+ "bAutoWidth": false, > "sDom": "<'row-fluid'<'span6'><'span6'>r>t<'row-fluid'>t", >- "aaSorting": [[ 0, "desc" ]], > "aoColumns": [ > { > "mDataProp": function( oObj ) { >- if ( $.datepicker.formatDate('yy-mm-dd', new Date(oObj.issuedate) ) == ymd ) { >+ if ( oObj.issued_today ) { > return "<strong>" + TODAYS_CHECKOUTS + "</strong>"; > } else { > return "<strong>" + PREVIOUS_CHECKOUTS + "</strong>"; >@@ -157,7 +157,7 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >- title = "<a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" >+ title = "<span class='strong'><a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" > + oObj.biblionumber > + "'>" > + oObj.title; >@@ -166,10 +166,10 @@ $(document).ready(function() { > title += " " + value.subfield; > }); > >- title += "</a>"; >+ title += "</a></span>"; > > if ( oObj.author ) { >- title += " " + BY + " " + oObj.author; >+ title += " " + BY.replace( "_AUTHOR_", " " + oObj.author ); > } > > if ( oObj.itemnotes ) { >@@ -195,18 +195,21 @@ $(document).ready(function() { > } > }, > { "mDataProp": "itemtype" }, >- { "mDataProp": "issuedate" }, >+ { "mDataProp": "issuedate_formatted" }, > { "mDataProp": "branchname" }, > { "mDataProp": "itemcallnumber" }, > { >- "bSortable": false, > "mDataProp": function ( oObj ) { >+ if ( ! oObj.charge ) oObj.charge = 0; > return parseFloat(oObj.charge).toFixed(2); > } > }, > { >- "bSortable": false, >- "mDataProp": "price" }, >+ "mDataProp": function ( oObj ) { >+ if ( ! oObj.price ) oObj.price = 0; >+ return parseFloat(oObj.price).toFixed(2); >+ } >+ }, > { > "bSortable": false, > "mDataProp": function ( oObj ) { >@@ -233,6 +236,13 @@ $(document).ready(function() { > > span_style = "display: none"; > span_class = "renewals-allowed"; >+ } else if ( oObj.can_renew_error == "too_soon" ) { >+ content += "<span class='renewals-disabled'>" >+ + NOT_RENEWABLE_TOO_SOON >+ + "</span>"; >+ >+ span_style = "display: none"; >+ span_class = "renewals-allowed"; > } else { > content += "<span class='renewals-disabled'>" > + oObj.can_renew_error >@@ -248,10 +258,8 @@ $(document).ready(function() { > > if ( oObj.renewals_remaining ) { > content += "<span class='renewals'>(" >- + oObj.renewals_remaining >- + " " + OF + " " >- + oObj.renewals_allowed + " " >- + RENEWALS_REMAINING + ")</span>"; >+ + RENEWALS_REMAINING.replace( "_RENEWALS_REMAINING_", oObj.renewals_remaining ).replace( "_RENEWALS_ALLOWED_", oObj.renewals_allowed ) >+ + ")</span>"; > } > > content += "</span>"; >@@ -333,10 +341,16 @@ $(document).ready(function() { > $("#relatives-issues-tab").click( function() { > if ( ! relativesIssuesTable ) { > relativesIssuesTable = $("#relatives-issues-table").dataTable({ >+ "bAutoWidth": false, > "sDom": "<'row-fluid'<'span6'><'span6'>r>t<'row-fluid'>t", > "aaSorting": [], > "aoColumns": [ > { >+ "mDataProp": "date_due", >+ "bVisible": false, >+ }, >+ { >+ "iDataSort": 1, // Sort on hidden unformatted date due column > "mDataProp": function( oObj ) { > var today = new Date(); > var due = new Date( oObj.date_due ); >@@ -349,7 +363,7 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >- title = "<a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" >+ title = "<span class='strong'><a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" > + oObj.biblionumber > + "'>" > + oObj.title; >@@ -358,7 +372,7 @@ $(document).ready(function() { > title += " " + value.subfield; > }); > >- title += "</a>"; >+ title += "</a></span>"; > > if ( oObj.author ) { > title += " " + BY + " " + oObj.author; >@@ -387,11 +401,21 @@ $(document).ready(function() { > } > }, > { "mDataProp": "itemtype" }, >- { "mDataProp": "issuedate" }, >+ { "mDataProp": "issuedate_formatted" }, > { "mDataProp": "branchname" }, > { "mDataProp": "itemcallnumber" }, >- { "mDataProp": "charge" }, >- { "mDataProp": "price" }, >+ { >+ "mDataProp": function ( oObj ) { >+ if ( ! oObj.charge ) oObj.charge = 0; >+ return parseFloat(oObj.charge).toFixed(2); >+ } >+ }, >+ { >+ "mDataProp": function ( oObj ) { >+ if ( ! oObj.price ) oObj.price = 0; >+ return parseFloat(oObj.price).toFixed(2); >+ } >+ }, > { > "mDataProp": function( oObj ) { > return "<a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=" + oObj.borrowernumber + "'>" >@@ -401,7 +425,7 @@ $(document).ready(function() { > ], > "bPaginate": false, > "bProcessing": true, >- "bServerSide": true, >+ "bServerSide": false, > "sAjaxSource": '/cgi-bin/koha/svc/checkouts.pl', > "fnServerData": function ( sSource, aoData, fnCallback ) { > $.each(relatives_borrowernumbers, function( index, value ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/holds.js b/koha-tmpl/intranet-tmpl/prog/en/js/holds.js >index 76dfee5..eab5ae4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/holds.js >@@ -4,6 +4,7 @@ $(document).ready(function() { > $("#holds-tab").click( function() { > if ( ! holdsTable ) { > holdsTable = $("#holds-table").dataTable({ >+ "bAutoWidth": false, > "sDom": "<'row-fluid'<'span6'><'span6'>r>t<'row-fluid'>t", > "aoColumns": [ > { >@@ -11,7 +12,7 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >- title = "<a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" >+ title = "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" > + oObj.biblionumber > + "'>" > + oObj.title; >@@ -23,7 +24,7 @@ $(document).ready(function() { > title += "</a>"; > > if ( oObj.author ) { >- title += " " + BY + " " + oObj.author; >+ title += " " + BY.replace( "_AUTHOR_", oObj.author ); > } > > if ( oObj.itemnotes ) { >@@ -34,17 +35,6 @@ $(document).ready(function() { > title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>" > } > >- title += " " >- + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=" >- + oObj.biblionumber >- + "&itemnumber=" >- + oObj.itemnumber >- + "#" >- + oObj.itemnumber >- + "'>" >- + oObj.barcode >- + "</a>"; >- > return title; > } > }, >@@ -58,9 +48,9 @@ $(document).ready(function() { > var data = ""; > > if ( oObj.suspend == 1 ) { >- data += "<p>" + HOLD_IS + " <strong> " + SUSPENDED + " </strong>"; >+ data += "<p>" + HOLD_IS_SUSPENDED; > if ( oObj.suspend_until ) { >- data += " " + UNTIL + " " + oObj.suspend_until_formatted; >+ data += " " + UNTIL.replace( "_SUSPEND_UNTIL_", oObj.suspend_until_formatted ); > } > data += "</p>"; > } >@@ -68,19 +58,27 @@ $(document).ready(function() { > if ( oObj.barcode ) { > data += "<em>"; > if ( oObj.found == "W" ) { >- data += ITEM_IS + " <strong> " + WAITING + " </strong>"; >+ data += ITEM_IS_WAITING; > > if ( ! oObj.waiting_here ) { >- data += " " + AT + " " + oObj.waiting_at; >+ data += " " + AT.replace("_WAITING_AT_BRANCH_", oObj.waiting_at ); > } > } else if ( oObj.transferred ) { >- data += ITEM_IS + " <strong> " + IN_TRANSIT + " </strong> " + FROM + oObj.from_branch; >+ data += ITEM_IS_IN_TRANSIT.replace( "_FROM_BRANCH_", oObj.from_branch ); > } else if ( oObj.not_transferred ) { >- data += NOT_TRANSFERRED_YET + " " + oObj.not_transferred_by; >- } data += "</em>"; >+ data += NOT_TRANSFERRED_YET.replace( "_FROM_BRANCH_", oObj.not_transferred_by ); >+ } >+ data += "</em>"; > > data += " <a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" >- + oObj.biblionumber + "'>" + oObj.barcode + "</a>"; >+ + oObj.biblionumber >+ + "&itemnumber=" >+ + oObj.itemnumber >+ + "#" >+ + oObj.itemnumber >+ + "'>" >+ + oObj.barcode >+ + "</a>"; > } > > return data; >@@ -97,6 +95,7 @@ $(document).ready(function() { > } > }, > { >+ "bSortable": false, > "mDataProp": function( oObj ) { > return "<select name='rank-request'>" > + "<option value='n'>" + NO + "</option>" >@@ -110,7 +109,7 @@ $(document).ready(function() { > ], > "bPaginate": false, > "bProcessing": true, >- "bServerSide": true, >+ "bServerSide": false, > "sAjaxSource": '/cgi-bin/koha/svc/holds.pl', > "fnServerData": function ( sSource, aoData, fnCallback ) { > aoData.push( { "name": "borrowernumber", "value": borrowernumber } ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 69dcb29..adda84b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -524,6 +524,10 @@ > > <p>The <a href="http://www.openjs.com/scripts/events/keyboard_shortcuts/">OpenJS keyboard shortcuts library</a> > by Binny V A is licensed under the BSD license.</p> >+ >+ <h2>jquery.dataTables.grouping.js</h2> >+ <p>The <a href="https://code.google.com/p/jquery-datatables-row-grouping/">jquery.dataTables.grouping.js</a> >+ plugin by Jovan Popovic is licensed under the BSD and GPL v2 license.</p> > </div> > > <div id="translations"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 9951030..e9c4479 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -15,9 +15,9 @@ > [% INCLUDE 'calendar.inc' %] > > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > [% INCLUDE 'strings.inc' %] >+[% INCLUDE 'datatables.inc' %] >+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script> > [% INCLUDE 'timepicker.inc' %] > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script> >@@ -721,6 +721,7 @@ No patron matched <span class="ex">[% message %]</span> > <table id="relatives-issues-table"> > <thead> > <tr> >+ <th scope="col">Due date (unformatted, hidden)</th> > <th scope="col">Due date</th> > <th scope="col">Title</th> > <th scope="col">Item type</th> >diff --git a/svc/checkin.pl b/svc/checkin.pl >index a303e52..000ddbc 100755 >--- a/svc/checkin.pl >+++ b/svc/checkin.pl >@@ -27,8 +27,6 @@ use C4::Items qw(GetBarcodeFromItemnumber); > use C4::Context; > use C4::Auth qw(check_cookie_auth); > >-use Koha::DateUtils qw(output_pref_due); >- > my $input = new CGI; > > my ( $auth_status, $sessionID ) = >diff --git a/svc/checkouts.pl b/svc/checkouts.pl >index ab59fb4..bcb3444 100755 >--- a/svc/checkouts.pl >+++ b/svc/checkouts.pl >@@ -81,7 +81,9 @@ my $sql = ' > borrowernumber, > surname, > firstname, >- cardnumber >+ cardnumber, >+ >+ DATEDIFF( issuedate, CURRENT_DATE() ) AS not_issued_today > FROM issues > LEFT JOIN items USING ( itemnumber ) > LEFT JOIN biblio USING ( biblionumber ) >@@ -95,7 +97,7 @@ if ( @borrowernumber == 1 ) { > $sql .= '= ?'; > } > else { >- $sql = ' IN (' . join( ',', ('?') x @borrowernumber ) . ') '; >+ $sql .= ' IN (' . join( ',', ('?') x @borrowernumber ) . ') '; > } > push( @parameters, @borrowernumber ); > >@@ -103,11 +105,12 @@ $sql .= " ORDER BY $sorting_column $sorting_direction "; > > my $dbh = C4::Context->dbh(); > my $sth = $dbh->prepare($sql); >-$sth->execute( @parameters ); >+$sth->execute(@parameters); > > my $item_level_itypes = C4::Context->preference('item-level_itypes'); > >-my @checkouts; >+my @checkouts_today; >+my @checkouts_previous; > while ( my $c = $sth->fetchrow_hashref() ) { > my ($charge) = GetIssuingCharges( $c->{itemnumber}, $c->{borrowernumber} ); > >@@ -116,50 +119,71 @@ while ( my $c = $sth->fetchrow_hashref() ) { > > my ( $renewals_count, $renewals_allowed, $renewals_remaining ) = > GetRenewCount( $c->{borrowernumber}, $c->{itemnumber} ); >- push( >- @checkouts, >- { >- DT_RowId => $c->{itemnumber} . '-' . $c->{borrowernumber}, >- title => $c->{title}, >- author => $c->{author}, >- barcode => $c->{barcode}, >- itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype}, >- itemnotes => $c->{itemnotes}, >- branchcode => $c->{branchcode}, >- branchname => $c->{branchname}, >- itemcallnumber => $c->{itemcallnumber} || q{}, >- charge => $charge, >- price => $c->{replacementprice} || q{}, >- can_renew => $can_renew, >- can_renew_error => $can_renew_error, >- itemnumber => $c->{itemnumber}, >- borrowernumber => $c->{borrowernumber}, >- biblionumber => $c->{biblionumber}, >- issuedate => $c->{issuedate}, >- date_due => $c->{date_due}, >- renewals_count => $renewals_count, >- renewals_allowed => $renewals_allowed, >- renewals_remaining => $renewals_remaining, >- issuedate_formatted => >- output_pref( dt_from_string( $c->{issuedate} ) ), >- date_due_formatted => >- output_pref_due( dt_from_string( $c->{date_due} ) ), >- subtitle => GetRecordValue( >- 'subtitle', >- GetMarcBiblio( $c->{biblionumber} ), >- GetFrameworkCode( $c->{biblionumber} ) >- ), >- borrower => { >- surname => $c->{surname}, >- firstname => $c->{firstname}, >- cardnumber => $c->{cardnumber}, >+ >+ my $checkout = { >+ DT_RowId => $c->{itemnumber} . '-' . $c->{borrowernumber}, >+ title => $c->{title}, >+ author => $c->{author}, >+ barcode => $c->{barcode}, >+ itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype}, >+ itemnotes => $c->{itemnotes}, >+ branchcode => $c->{branchcode}, >+ branchname => $c->{branchname}, >+ itemcallnumber => $c->{itemcallnumber} || q{}, >+ charge => $charge, >+ price => $c->{replacementprice} || q{}, >+ can_renew => $can_renew, >+ can_renew_error => $can_renew_error, >+ itemnumber => $c->{itemnumber}, >+ borrowernumber => $c->{borrowernumber}, >+ biblionumber => $c->{biblionumber}, >+ issuedate => $c->{issuedate}, >+ date_due => $c->{date_due}, >+ renewals_count => $renewals_count, >+ renewals_allowed => $renewals_allowed, >+ renewals_remaining => $renewals_remaining, >+ issuedate_formatted => output_pref( >+ { >+ dt => dt_from_string( $c->{issuedate} ), >+ as_due_date => 1 >+ } >+ ), >+ date_due_formatted => output_pref( >+ { >+ dt => dt_from_string( $c->{date_due} ), >+ as_due_date => 1 > } >- } >- ); >+ ), >+ subtitle => GetRecordValue( >+ 'subtitle', >+ GetMarcBiblio( $c->{biblionumber} ), >+ GetFrameworkCode( $c->{biblionumber} ) >+ ), >+ borrower => { >+ surname => $c->{surname}, >+ firstname => $c->{firstname}, >+ cardnumber => $c->{cardnumber}, >+ }, >+ issued_today => !$c->{not_issued_today}, >+ }; >+ >+ if ( $c->{not_issued_today} ) { >+ push( @checkouts_previous, $checkout ); >+ } >+ else { >+ push( @checkouts_today, $checkout ); >+ } > } > >+@checkouts_today = reverse(@checkouts_today) >+ if ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); >+@checkouts_previous = reverse(@checkouts_previous) >+ if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' ); >+ >+my @checkouts = ( @checkouts_today, @checkouts_previous ); >+ > my $data; >-$data->{'iTotalRecords'} = scalar @checkouts; #FIXME >+$data->{'iTotalRecords'} = scalar @checkouts; > $data->{'iTotalDisplayRecords'} = scalar @checkouts; > $data->{'sEcho'} = $input->param('sEcho') || undef; > $data->{'aaData'} = \@checkouts; >diff --git a/svc/holds.pl b/svc/holds.pl >index 9fbdb5f..85e0f5b 100755 >--- a/svc/holds.pl >+++ b/svc/holds.pl >@@ -95,14 +95,17 @@ while ( my $h = $holds_rs->next() ) { > 'subtitle', GetMarcBiblio($biblionumber), > GetFrameworkCode($biblionumber) > ), >- reservedate_formatted => $h->reservedate() >- ? output_pref_due( dt_from_string( $h->reservedate() ) ) >+ reservedate_formatted => $h->reservedate() ? output_pref( >+ { dt => dt_from_string( $h->reservedate() ), dateonly => 1 } >+ ) > : q{}, >- suspend_until_formatted => $h->suspend_until() >- ? output_pref_due( dt_from_string( $h->suspend_until() ) ) >+ suspend_until_formatted => $h->suspend_until() ? output_pref( >+ { dt => dt_from_string( $h->suspend_until() ), dateonly => 1 } >+ ) > : q{}, >- expirationdate_formatted => $h->expirationdate() >- ? output_pref_due( dt_from_string( $h->expirationdate() ) ) >+ expirationdate_formatted => $h->expirationdate() ? output_pref( >+ { dt => dt_from_string( $h->expirationdate() ), dateonly => 1 } >+ ) > : q{}, > }; > >@@ -120,7 +123,7 @@ while ( my $h = $holds_rs->next() ) { > if ($transferred_when) { > $hold->{color} = 'transferred'; > $hold->{transferred} = 1; >- $hold->{date_sent} = format_date($transferred_when); >+ $hold->{date_sent} = output_pref( dt_from_string($transferred_when) ); > $hold->{from_branch} = GetBranchName($transferred_from); > } > elsif ( $item->holdingbranch()->branchcode() ne >diff --git a/svc/renew.pl b/svc/renew.pl >index add9e9f..fa8475a 100755 >--- a/svc/renew.pl >+++ b/svc/renew.pl >@@ -26,7 +26,7 @@ use C4::Circulation; > use C4::Context; > use C4::Auth qw(check_cookie_auth); > >-use Koha::DateUtils qw(output_pref_due dt_from_string); >+use Koha::DateUtils qw(output_pref dt_from_string); > > my $input = new CGI; > >@@ -63,7 +63,7 @@ $data->{branchcode} = $branchcode; > > if ( $data->{renew_okay} ) { > $date_due = AddRenewal( $borrowernumber, $itemnumber, $branchcode, $date_due ); >- $data->{date_due} = output_pref_due( $date_due ); >+ $data->{date_due} = output_pref( { dt => $date_due, as_due_date => 1 } ); > } > > print to_json($data); >-- >1.7.2.5
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 11703
:
25105
|
25110
|
25111
|
25213
|
25217
|
25218
|
25220
|
25221
|
25261
|
25262
|
25263
|
25264
|
25271
|
25272
|
25289
|
25290
|
25292
|
25390
|
25391
|
25986
|
25987
|
25988
|
25989
|
25990
|
25991
|
25992
|
25993
|
25994
|
25995
|
25996
|
25997
|
25998
|
25999
|
26081
|
26085
|
26115
|
26131
|
26158
|
26160
|
26241
|
26986
|
26990
|
26991
|
27102
|
27241
|
27338
|
27339
|
27340
|
27341
|
27342
|
27349
|
27350
|
27353
|
27354
|
27356
|
27548
|
27610
|
27717
|
27718
|
27745
|
27746
|
27750
|
27751
|
28025
|
28026
|
28027
|
28028
|
28029
|
29195
|
29196
|
29197
|
29198
|
29199
|
29279
|
29280
|
29281
|
29282
|
29283
|
29284
|
29419
|
29420
|
29432
|
29433
|
29434
|
29438
|
29439
|
29440
|
29444
|
29445
|
29446
|
29447
|
29448
|
29449
|
29450
|
29451
|
29452
|
29453
|
29454
|
29472
|
29473
|
29474
|
29475
|
29476
|
29477
|
29478
|
29479
|
29480
|
29493
|
30228