Bugzilla – Attachment 124744 Details for
Bug 28762
Item status shows incorrectly on course-details.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28762: (QA follow-up) A first attempt to sync the includes
Bug-28762-QA-follow-up-A-first-attempt-to-sync-the.patch (text/plain), 5.42 KB, created by
Marcel de Rooy
on 2021-09-10 09:28:41 UTC
(
hide
)
Description:
Bug 28762: (QA follow-up) A first attempt to sync the includes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-09-10 09:28:41 UTC
Size:
5.42 KB
patch
obsolete
>From bc008ee0619f25c5d0635eab329fa0605381a43a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 10 Sep 2021 09:27:30 +0000 >Subject: [PATCH] Bug 28762: (QA follow-up) A first attempt to sync the > includes >Content-Type: text/plain; charset=utf-8 > >This is just a start. >Should we resolve all differences? >--- > .../intranet-tmpl/prog/en/includes/item-status.inc | 14 +++++++++----- > .../bootstrap/en/includes/item-status.inc | 10 +++++++--- > 2 files changed, 16 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/item-status.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/item-status.inc >index ba7e9b9737..59e0e2087f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/item-status.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/item-status.inc >@@ -1,3 +1,5 @@ >+[%# Lets keep this include in sync between OPAC and staff: make your changes in that perspective at both sides please ! %] >+ > [% USE Branches %] > [% USE AuthorisedValues %] > [% SET itemavailable = 1 %] >@@ -7,9 +9,11 @@ > [%#- structure is used by course reserves pages, which do -%] > [%#- not use an API to fetch items that populates item.datedue. -%] > >+[% SET opac = staff ? 0 : 1 %] >+ > [% IF ( item.itemlost ) %] > [% SET itemavailable = 0 %] >- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) %] >+ [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, 'opac' => opac ) %] > [% IF ( av_lib_include ) %] > <span class="item-status lost">[% av_lib_include | html %]</span> > [% ELSE %] >@@ -54,7 +58,7 @@ > > [% IF ( item.withdrawn ) %] > [% SET itemavailable = 0 %] >- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) %] >+ [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, 'opac' => opac ) %] > [% IF av_lib_include %] > <span class="item-status withdrawn">[% av_lib_include | html %]</span> > [% ELSE %] >@@ -62,9 +66,9 @@ > [% END %] > [% END %] > >-[% IF ( item.notforloan ) %] >+[% IF ( NOT ( item.isa('Koha::Item') ) AND item.itemnotforloan ) OR item.notforloan %] > [% SET itemavailable = 0 %] >- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] >+ [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan, 'opac' => opac ) %] > [% IF av_lib_include %] > <span class="item-status notforloan">[% av_lib_include | html %]</span> > [% ELSE %] >@@ -74,7 +78,7 @@ > > [% IF ( item.damaged ) %] > [% SET itemavailable = 0 %] >- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged ) %] >+ [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged, 'opac' => opac ) %] > [% IF av_lib_include %] > <span class="item-status damaged">[% av_lib_include | html %]</span> > [% ELSE %] >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 cd04f9f4a5..88c6e37477 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >@@ -1,3 +1,5 @@ >+[%# Lets keep this include in sync between OPAC and staff: make your changes in that perspective at both sides please ! %] >+ > [% USE Branches %] > [% USE AuthorisedValues %] > [% SET itemavailable = 1 %] >@@ -7,9 +9,11 @@ > [%#- structure is used by course reserves pages, which do -%] > [%#- not use an API to fetch items that populates item.datedue. -%] > >+[% SET opac = staff ? 0 : 1 %] >+ > [% IF ( item.itemlost ) %] > [% SET itemavailable = 0 %] >- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %] >+ [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, 'opac' => opac ) %] > [% IF ( av_lib_include ) %] > <span class="item-status lost">[% av_lib_include | html %]</span> > [% ELSE %] >@@ -54,7 +58,7 @@ > > [% IF ( item.withdrawn ) %] > [% SET itemavailable = 0 %] >- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, opac => 1 ) %] >+ [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, 'opac' => opac ) %] > [% IF av_lib_include %] > <span class="item-status withdrawn">[% av_lib_include | html %]</span> > [% ELSE %] >@@ -77,7 +81,7 @@ > > [% IF ( item.damaged ) %] > [% SET itemavailable = 0 %] >- [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged, opac => 1 ) %] >+ [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged, 'opac' => opac ) %] > [% IF av_lib_include %] > <span class="item-status damaged">[% av_lib_include | html %]</span> > [% ELSE %] >-- >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 28762
:
123233
|
123234
|
123236
|
123237
|
124661
|
124666
|
124667
|
124668
|
124744
|
125220
|
125228
|
125229
|
125233
|
161563
|
161564
|
161565
|
161566
|
161567
|
161568
|
161569
|
161570
|
161571
|
161572
|
161573
|
161574
|
161584
|
161585
|
161586
|
161587
|
161588
|
161589
|
161590
|
161591
|
163310
|
163311
|
163312
|
163313
|
163314
|
163315
|
163316
|
163317
|
165843
|
165844
|
165845
|
165846
|
165847
|
165848
|
165849
|
165850
|
169172
|
169273
|
169274
|
169275
|
169276
|
169277
|
169278
|
169279
|
169280
|
169281
|
169311
|
169312
|
169313
|
169314
|
169354
|
169355
|
169356
|
169357
|
169358
|
169359
|
169360
|
169361
|
169362
|
169363
|
169364
|
169365
|
169366
|
169367
|
169393