Bugzilla – Attachment 114437 Details for
Bug 8694
Show accurate subscription renewal warning for expired subscriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8694: Show accurate subscription renewal warning for expired subscriptions
Bug-8694-Show-accurate-subscription-renewal-warnin.patch (text/plain), 2.53 KB, created by
Jonathan Druart
on 2020-12-16 13:44:02 UTC
(
hide
)
Description:
Bug 8694: Show accurate subscription renewal warning for expired subscriptions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-12-16 13:44:02 UTC
Size:
2.53 KB
patch
obsolete
>From ce66f186409246400ee88fb012fd839368fc2f43 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 16 Dec 2020 14:42:03 +0100 >Subject: [PATCH] Bug 8694: Show accurate subscription renewal warning for > expired subscriptions > >If a subscription is going to expired we should not phrase the warning > "Subscription will expire [ date in the past ]." > >Test plan: >Create a subscription with relevant expiration date. >The detail page of the subscription show correctly the warning about the >expiration date. >--- > .../prog/en/modules/serials/subscription-detail.tt | 6 ++++-- > serials/subscription-detail.pl | 1 + > 2 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index cdb5a2f895..deb65a1470 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -33,8 +33,10 @@ > > <h1>Subscription for [% bibliotitle | html %] [% IF closed %](closed)[% END %]</h1> > >- [% IF ( abouttoexpire ) %] >- [% UNLESS closed %] >+ [% IF abouttoexpire AND NOT closed %] >+ [% IF has_expired_already %] >+ <div class="dialog message">Subscription expired on [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div> >+ [% ELSE %] > <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div> > [% END %] > [% END %] >diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl >index ac4abcef18..0855848b20 100755 >--- a/serials/subscription-detail.pl >+++ b/serials/subscription-detail.pl >@@ -120,6 +120,7 @@ for my $date ( qw(startdate enddate firstacquidate histstartdate histenddate) ) > my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $subs->{location} }); > $subs->{location} = $av->count ? $av->next->lib : ''; > $subs->{abouttoexpire} = abouttoexpire($subs->{subscriptionid}); >+$subs->{has_expired_already} = dt_from_string($subs->{enddate})->compare(dt_from_string); > $template->param(%{ $subs }); > $template->param(biblionumber_for_new_subscription => $subs->{bibnum}); > my @irregular_issues = split /;/, $subs->{irregularity}; >-- >2.20.1
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 8694
:
11871
|
11907
|
114437
|
115246
|
135879