Bugzilla – Attachment 155309 Details for
Bug 25393
Create separate 'no automatic renewal before' rule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25393: UI adjustments
Bug-25393-UI-adjustments.patch (text/plain), 8.41 KB, created by
Pedro Amorim
on 2023-09-07 14:43:56 UTC
(
hide
)
Description:
Bug 25393: UI adjustments
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-09-07 14:43:56 UTC
Size:
8.41 KB
patch
obsolete
>From 33a25a7a394ba4c0afe353866eb1f7f93fbfc608 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 11 Aug 2023 13:35:55 +0000 >Subject: [PATCH] Bug 25393: UI adjustments > >This updates the information messages that are displayed in Staff, OPAC and SCO >regarding renewals and if the item is up for automatic renewal or not. > >Add issues.auto_renew to svc/checkouts endpoint response > >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 19 +++++-------------- > .../bootstrap/en/modules/opac-user.tt | 11 +++-------- > .../bootstrap/en/modules/sco/sco-main.tt | 7 ++++--- > svc/checkouts | 2 ++ > 4 files changed, 14 insertions(+), 25 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 3ed706fa7e..6a8ddea24c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -522,13 +522,6 @@ $(document).ready(function() { > + __("No renewal before %s").format(oObj.can_renew_date) > + "</span>"; > >- span_style = "display: none"; >- span_class = "renewals-allowed"; >- } else if ( oObj.can_renew_error == "auto_too_soon" ) { >- msg += "<span class='renewals-disabled'>" >- + __("Scheduled for automatic renewal") >- + "</span>"; >- > span_style = "display: none"; > span_class = "renewals-allowed"; > } else if ( oObj.can_renew_error == "auto_too_late" ) { >@@ -550,13 +543,6 @@ $(document).ready(function() { > + __("Automatic renewal failed, account expired") > + "</span>"; > >- span_style = "display: none"; >- span_class = "renewals-allowed"; >- } else if ( oObj.can_renew_error == "auto_renew" ) { >- msg += "<span class='renewals-disabled'>" >- + __("Scheduled for automatic renewal") >- + "</span>"; >- > span_style = "display: none"; > span_class = "renewals-allowed"; > } else if ( oObj.can_renew_error == "onsite_checkout" ) { >@@ -604,6 +590,11 @@ $(document).ready(function() { > } > content += ")</span>"; > } >+ if(oObj.auto_renew){ >+ content += "<span class='renewals-info'>("; >+ content += __("Scheduled for automatic renewal"); >+ content += ")</span>"; >+ } > > return content; > } >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index d5b7835543..ae663507fd 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -500,17 +500,12 @@ > / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library > [% END %] > )</span> >- [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %] >- <span class="usr-msg automatic-renewal">Automatic renewal</span> >- <span class="renewals">( >- [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining >- [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %] >- / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library >- [% END %] >- )</span> > [% ELSIF ( ISSUE.item_denied_renewal ) %] > Renewal not allowed > [% END %] >+ [% IF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %] >+ <br><span class="usr-msg automatic-renewal">This item is scheduled for auto renewal.</span> >+ [% END %] > </td> > [% END %] > [% IF ( OPACFinesTab ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index 003c792402..2852e316f8 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -356,9 +356,7 @@ > <input type="submit" value="Renew item" class="btn btn-primary btn-sm renew" /> > [% END %] > [% ELSE %] >- [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %] >- <span>This item has been scheduled for automatic renewal and cannot be renewed</span> >- [% ELSIF ISSUE.renew_error == 'onsite_checkout' %] >+ [% IF ISSUE.renew_error == 'onsite_checkout' %] > <span>This is a on-site checkout, it cannot be renewed.</span> > [% ELSIF ISSUE.renew_error == 'too_unseen' %] > <span>You have renewed this item the maximum number of consecutive times without it being seen by the library.</span> >@@ -373,6 +371,9 @@ > <input type="hidden" name="confirmed" value="" /> > [% END %] > [% END %] >+ [% IF ISSUE.auto_renew %] >+ <br><span>This item is scheduled for automatic renewal</span> >+ [% END %] > </form> > </td> > [% UNLESS ( nofines ) %] >diff --git a/svc/checkouts b/svc/checkouts >index 20b1a34460..e45582d85c 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -72,6 +72,7 @@ my $sql = ' > issues.date_due, > issues.date_due < now() as date_due_overdue, > issues.timestamp, >+ issues.auto_renew, > > issues.onsite_checkout, > >@@ -272,6 +273,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > date_due => $c->{date_due}, > date_due_overdue => $c->{date_due_overdue} ? JSON::true : JSON::false, > timestamp => $c->{timestamp}, >+ auto_renew => $c->{auto_renew}, > onsite_checkout => $c->{onsite_checkout}, > enumchron => $c->{enumchron}, > renewals_count => $renewals_count, >-- >2.30.2
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 25393
:
154533
|
154534
|
154535
|
154536
|
154537
|
154538
|
154539
|
154540
|
154541
|
154661
|
154662
|
154663
|
154664
|
154665
|
154666
|
154667
|
154668
|
154669
|
155307
|
155308
|
155309
|
155310
|
155311
|
155312
|
155313
|
155314
|
155315
|
156829
|
156830
|
156831
|
156832
|
156833
|
156834
|
156835
|
156836
|
156837
|
156838
|
156839
|
156840