Bugzilla – Attachment 178451 Details for
Bug 39078
Incorrect variable checks in course reserve details template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39078: Fix incorrect variable checks in course reserve details template
Bug-39078-Fix-incorrect-variable-checks-in-course-.patch (text/plain), 5.91 KB, created by
Marcel de Rooy
on 2025-02-21 09:11:48 UTC
(
hide
)
Description:
Bug 39078: Fix incorrect variable checks in course reserve details template
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-02-21 09:11:48 UTC
Size:
5.91 KB
patch
obsolete
>From b56fb9cd29f3d5be0c4ac94149d61c92f6a4ab48 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 10 Feb 2025 16:35:24 +0000 >Subject: [PATCH] Bug 39078: Fix incorrect variable checks in course reserve > details template >Content-Type: text/plain; charset=utf-8 > >This patch adds some variable checks and corrects some others so that >the course reserve detail template doesn't show empty parentheses. > >To test, apply the patch and create a course if necessary. > >- Add an item to the course. >- After submitting a barcode, check the checkbox next to each option and > select a different value (item type, collection, etc.). >- View the course details and check the columns for the fields you > changed. They should display the correct information: > "Updated field value (Original field value)" >- Add another item but this time don't change any options. The > information should be display as: > "Unchanged (Original field value)" >- There should be no instances where it looks like: > "Field value ()" > >Sponsored-by: Athens County Public Libraries >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../en/modules/course_reserves/course-details.tt | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index e2d3fb9655..6a61863052 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -151,10 +151,14 @@ > [% IF cr.course_item.itype_enabled %] > [% IF cr.course_item.enabled == 'yes' %] > <strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype ) | html %]</strong> >- ([% ItemTypes.GetDescription( cr.course_item.itype_storage ) | html %]) >+ [% IF (cr.course_item.itype_storage ) %] >+ ([% ItemTypes.GetDescription( cr.course_item.itype_storage ) | html %]) >+ [% END %] > [% ELSE %] > [% ItemTypes.GetDescription( cr.course_item.itype ) | html %] >- (<strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype) | html %]</strong>) >+ [% IF ( cr.item.effective_itemtype ) %] >+ (<strong>[% ItemTypes.GetDescription( cr.item.effective_itemtype) | html %]</strong>) >+ [% END %] > [% END %] > [% ELSE %] > <em>Unchanged</em> >@@ -168,7 +172,7 @@ > [% IF cr.course_item.ccode_enabled %] > [% IF cr.course_item.enabled == 'yes' %] > <strong>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode ) | html %]</strong> >- [% IF cr.item.ccode %] >+ [% IF cr.course_item.ccode_storage %] > ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.course_item.ccode_storage ) | html %]) > [% END %] > [% ELSE %] >@@ -188,7 +192,7 @@ > [% IF cr.course_item.location_enabled %] > [% IF cr.course_item.enabled == 'yes' %] > <strong>[% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]</strong> >- [% IF cr.item.permanent_location %] >+ [% IF cr.course_item.location_storage %] > ([% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location_storage ) | html %]) > [% END %] > [% ELSE %] >@@ -208,7 +212,7 @@ > [% IF cr.course_item.homebranch_enabled %] > [% IF cr.course_item.enabled == 'yes' %] > <strong>[% Branches.GetName( cr.item.homebranch ) | html %]</strong> >- [% IF cr.item.homebranch %] >+ [% IF cr.course_item.homebranch_storage %] > ([% Branches.GetName( cr.course_item.homebranch_storage ) | html %]) > [% END %] > [% ELSE %] >@@ -228,7 +232,7 @@ > [% IF cr.course_item.holdingbranch_enabled %] > [% IF cr.course_item.enabled == 'yes' %] > <strong>[% Branches.GetName( cr.item.holdingbranch ) | html %]</strong> >- [% IF cr.item.holdingbranch %] >+ [% IF cr.course_item.holdingbranch_storage %] > ([% Branches.GetName( cr.course_item.holdingbranch_storage ) | html %]) > [% END %] > [% ELSE %] >-- >2.39.5
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 39078
:
177704
|
177946
|
178301
| 178451