Bugzilla – Attachment 29199 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] - Restore showing earliest renewal date for 'too early' renewals
Bug-11703-QA-Followup---Restore-showing-earliest-r.patch (text/plain), 3.36 KB, created by
Kyle M Hall (khall)
on 2014-06-24 16:17:30 UTC
(
hide
)
Description:
Bug 11703 [QA Followup] - Restore showing earliest renewal date for 'too early' renewals
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-06-24 16:17:30 UTC
Size:
3.36 KB
patch
obsolete
>From 547ad27f974e1dbf1ce55bb9ccd9318fa8ba0a55 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 7 May 2014 11:17:38 -0400 >Subject: [PATCH] Bug 11703 [QA Followup] - Restore showing earliest renewal date for 'too early' renewals > >--- > .../intranet-tmpl/prog/en/includes/strings.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 2 +- > svc/checkouts.pl | 13 ++++++++++++- > 3 files changed, 14 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >index 536a055..df9ca78 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >@@ -13,7 +13,7 @@ > var BY = _("by _AUTHOR_"); > var ON_HOLD = _("On hold"); > var NOT_RENEWABLE = _("Not renewable"); >- var NOT_RENEWABLE_TOO_SOON = _("Cannot renew, renewal is premature"); >+ var NOT_RENEWABLE_TOO_SOON = _("No renewal before %s"); > var RENEWALS_REMAINING = _("%s of %s renewals remaining"); > var HOLD_IS_SUSPENDED = _("Hold is <strong>suspended</strong>"); > var UNTIL = _("until %s"); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index 4ab7be1..11dcc42 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -238,7 +238,7 @@ $(document).ready(function() { > span_class = "renewals-allowed"; > } else if ( oObj.can_renew_error == "too_soon" ) { > content += "<span class='renewals-disabled'>" >- + NOT_RENEWABLE_TOO_SOON >+ + NOT_RENEWABLE_TOO_SOON.format( oObj.can_renew_date ) > + "</span>"; > > span_style = "display: none"; >diff --git a/svc/checkouts.pl b/svc/checkouts.pl >index bcb3444..9de51ac 100755 >--- a/svc/checkouts.pl >+++ b/svc/checkouts.pl >@@ -27,7 +27,8 @@ use JSON qw(to_json); > > use C4::Auth qw(check_cookie_auth); > use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue ); >-use C4::Circulation qw(GetIssuingCharges CanBookBeRenewed GetRenewCount); >+use C4::Circulation >+ qw(GetIssuingCharges CanBookBeRenewed GetRenewCount GetSoonestRenewDate); > use C4::Context; > > use Koha::DateUtils; >@@ -116,6 +117,15 @@ while ( my $c = $sth->fetchrow_hashref() ) { > > my ( $can_renew, $can_renew_error ) = > CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} ); >+ my $can_renew_date = >+ $can_renew_error eq 'too_soon' >+ ? output_pref( >+ { >+ dt => GetSoonestRenewDate( $c->{borrowernumber}, $c->{itemnumber} ), >+ as_due_date => 1 >+ } >+ ) >+ : undef; > > my ( $renewals_count, $renewals_allowed, $renewals_remaining ) = > GetRenewCount( $c->{borrowernumber}, $c->{itemnumber} ); >@@ -134,6 +144,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > price => $c->{replacementprice} || q{}, > can_renew => $can_renew, > can_renew_error => $can_renew_error, >+ can_renew_date => $can_renew_date, > itemnumber => $c->{itemnumber}, > borrowernumber => $c->{borrowernumber}, > biblionumber => $c->{biblionumber}, >-- >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