Bugzilla – Attachment 145007 Details for
Bug 32445
Status display of 'not for loan' items is broken in OPAC/staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32445: Fix notforloan display
Bug-32445-Fix-notforloan-display.patch (text/plain), 4.34 KB, created by
Martin Renvoize (ashimema)
on 2023-01-04 12:28:37 UTC
(
hide
)
Description:
Bug 32445: Fix notforloan display
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-01-04 12:28:37 UTC
Size:
4.34 KB
patch
obsolete
>From e5d286f21bf7ca1311b00bd7133e65f993d9eacf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 3 Jan 2023 11:29:34 +0100 >Subject: [PATCH] Bug 32445: Fix notforloan display > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../bootstrap/en/includes/item-status.inc | 29 ++++++++++--------- > 1 file changed, 15 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >index fc457e816ba..601cd8984ea 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >@@ -9,9 +9,9 @@ > > [% IF ( item.itemlost ) %] > [% SET itemavailable = 0 %] >- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %] >- [% IF ( av_lib_include ) %] >- <span class="item-status lost">[% av_lib_include | html %]</span> >+ [% itemlost_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %] >+ [% IF itemlost_lib %] >+ <span class="item-status lost">[% itemlost_lib | html %]</span> > [% ELSE %] > <span class="item-status lost">Item lost</span> > [% END %] >@@ -71,25 +71,27 @@ > > [% IF ( item.withdrawn ) %] > [% SET itemavailable = 0 %] >- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, opac => 1 ) %] >- [% IF av_lib_include %] >- <span class="item-status withdrawn">[% av_lib_include | html %]</span> >+ [% withdrawn_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, opac => 1 ) %] >+ [% IF withdrawn_lib %] >+ <span class="item-status withdrawn">[% withdrawn_lib | html %]</span> > [% ELSE %] > <span class="item-status withdrawn">Item withdrawn</span> > [% END %] > [% END %] > > >-[% IF NOT ( item.isa('Koha::Item') ) AND item.itemnotforloan %] >+[% SET restricted_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, opac => 1 ) %] >+[% IF item.notforloan %] > [% SET itemavailable = 0 %] >- [% IF ( item.notforloanvalueopac ) %] >- <span class="item-status notforloan">[% item.notforloanvalueopac | html %] [% IF ( item.restrictedvalueopac ) %]<span class="restricted">([% item.restrictedvalueopac | html %])</span>[% END %]</span> >+ [% notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, opac => 1 ) %] >+ [% IF notforloan_lib %] >+ <span class="item-status notforloan">[% notforloan_lib | html %] [% IF restricted_lib %]<span class="restricted">([% restricted_lib | html %])</span>[% END %]</span> > [% ELSE %] >- <span class="item-status notforloan">Not for loan [% IF ( item.restrictedvalueopac ) %]<span class="restricted">([% item.restrictedvalueopac | html %])</span>[% END %]</span> >+ <span class="item-status notforloan">Not for loan [% IF restricted_lib %]<span class="restricted">([% restricted_lib | html %])</span>[% END %]</span> > [% END %] >-[% ELSIF NOT ( item.isa('Koha::Item') ) AND item.notforloan_per_itemtype %] >+[% ELSIF item.itemtype.notforloan %] > [% SET itemavailable = 0 %] >- <span class="item-status notforloan">Not for loan [% IF ( item.restrictedvalueopac ) %]<span class="restricted">([% item.restrictedvalueopac | html %])</span>[% END %]</span> >+ <span class="item-status notforloan">Not for loan [% IF restricted_lib %]<span class="restricted">([% restricted_lib | html %])</span>[% END %]</span> > [% END %] > > [% IF ( item.bundle_host ) %] >@@ -122,6 +124,5 @@ > [% END %] > > [% IF ( itemavailable ) %] >- [% IF NOT item.isa('Koha::Item') %][% SET restrictedvalueopac = item.restrictedvalueopac %][% END %] >- <span class="item-status available">Available [% IF restrictedvalueopac %]<span class="restricted">([% restrictedvalueopac | html %])</span>[% END %]</span> >+ <span class="item-status available">Available [% IF restricted_lib %]<span class="restricted">([% restricted_lib | html %])</span>[% END %]</span> > [% END %] >-- >2.39.0
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 32445
:
144542
|
144926
|
144927
|
144928
|
144929
|
144930
|
144971
|
144978
|
144987
|
144988
|
144989
|
144990
|
144991
|
144992
|
144993
|
144994
|
145004
|
145005
|
145006
|
145007
|
145008
|
145009
|
145010
|
145011
|
145014
|
145015
|
145016
|
145017
|
145018
|
145019
|
145020
|
145021