Bugzilla – Attachment 169453 Details for
Bug 37247
On subscriptions operation allowed without authentication
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37247: [23.05.x] Fix display of "closed"
Bug-37247-2305x-Fix-display-of-closed.patch (text/plain), 4.24 KB, created by
Fridolin Somers
on 2024-07-24 08:25:36 UTC
(
hide
)
Description:
Bug 37247: [23.05.x] Fix display of "closed"
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2024-07-24 08:25:36 UTC
Size:
4.24 KB
patch
obsolete
>From 556e40b3952d93965cf6586241ebe6474f02625e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 5 Jul 2024 14:47:42 +0200 >Subject: [PATCH] Bug 37247: [23.05.x] Fix display of "closed" > >The subscription was not shown as closed after we closed it. >This is because "closed" is not passed to the template. >It seems more reliable to rely on the subscription object (that is passed to both >serials/serials-collection.tt and serials/subscription-detail.tt, the >others are not showing the Reopen/Close buttons) > >Also fetch the subscription object after and reopen/close it to display >accurate values. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/includes/serials-toolbar.inc | 6 +++--- > .../prog/en/modules/serials/subscription-detail.tt | 4 ++-- > serials/subscription-detail.pl | 2 -- > 3 files changed, 5 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc >index b9465d6e19..ec757fdf9c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc >@@ -50,14 +50,14 @@ > [% END %] > > [% IF not cannotedit or CAN_user_serials_receive_serials %] >- [% IF CAN_user_serials_renew_subscription and not closed %] >+ [% IF CAN_user_serials_renew_subscription and not subscription.closed %] > <div class="btn-group"><a id="renew" class="btn btn-default" href="#"><i class="fa fa-refresh"></i> Renew</a></div> > [% END %] >- [% IF CAN_user_serials_receive_serials and not closed %] >+ [% IF CAN_user_serials_receive_serials and not subscription.closed %] > <div class="btn-group"><a id="receive" class="btn btn-default" href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscriptionid | html %]&serstatus=1,3"><i class="fa fa-inbox"></i> Receive</a></div> > [% END %] > [% UNLESS cannotedit %] >- [% IF closed %] >+ [% IF subscription.closed %] > <div class="btn-group"><a id="reopen" class="btn btn-default" href="#"><i class="fa fa-repeat"></i> Reopen</a></div> > [% ELSE %] > <div class="btn-group"><a id="close" class="btn btn-default" href="#"><i class="fa fa-times-circle"></i> Close</a></div> >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 d4b4ec1385..39dccc7f19 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 >@@ -42,10 +42,10 @@ > [% INCLUDE 'serials-toolbar.inc' %] > [% INCLUDE 'mana/mana-comment-status.inc' %] > >- <h1>Subscription for [% bibliotitle | html %] [% bibliosubtitle | html %] [% IF closed %](closed)[% END %]</h1> >+ <h1>Subscription for [% bibliotitle | html %] [% bibliosubtitle | html %] [% IF subscription.closed %](closed)[% END %]</h1> > > [% IF ( abouttoexpire ) %] >- [% UNLESS closed %] >+ [% UNLESS subscription.closed %] > <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 60c28fd9cc..7532447b13 100755 >--- a/serials/subscription-detail.pl >+++ b/serials/subscription-detail.pl >@@ -62,8 +62,6 @@ $subs->{enddate} ||= GetExpirationDate($subscriptionid); > my ($totalissues,@serialslist) = GetSerials($subscriptionid); > $totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue) > >-my $subscription = Koha::Subscriptions->find( $subscriptionid ); >- > if ( $op and $op eq "close" ) { > C4::Serials::CloseSubscription( $subscriptionid ); > } elsif ( $op and $op eq "reopen" ) { >-- >2.45.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 37247
:
168504
|
168513
|
168535
|
168769
|
168782
|
168783
|
169282
|
169283
|
169452
| 169453 |
169454