Bugzilla – Attachment 162708 Details for
Bug 35067
Allow authorised value parent category so categories can be linked and shown together
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35067: Fix for AV categories with no parent, and special AVs
Bug-35067-Fix-for-AV-categories-with-no-parent-and.patch (text/plain), 4.62 KB, created by
Aleisha Amohia
on 2024-03-04 00:24:35 UTC
(
hide
)
Description:
Bug 35067: Fix for AV categories with no parent, and special AVs
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-03-04 00:24:35 UTC
Size:
4.62 KB
patch
obsolete
>From e906beb45391cc79edd694c721b1f6067ce66288 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Sun, 3 Mar 2024 21:15:44 +0000 >Subject: [PATCH] Bug 35067: Fix for AV categories with no parent, and special > AVs > >Test that item type, classification sources, and standard authorised values like YES_NO still work as normal. >--- > Koha/UI/Form/Builder/Biblio.pm | 3 +++ > .../intranet-tmpl/prog/en/modules/admin/authorised_values.tt | 1 + > .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 4 ++-- > 3 files changed, 6 insertions(+), 2 deletions(-) > >diff --git a/Koha/UI/Form/Builder/Biblio.pm b/Koha/UI/Form/Builder/Biblio.pm >index e1cd810ad3a..d69c5d084c7 100644 >--- a/Koha/UI/Form/Builder/Biblio.pm >+++ b/Koha/UI/Form/Builder/Biblio.pm >@@ -316,6 +316,7 @@ sub build_authorized_values_list { > } > elsif ( $category eq "itemtypes" ) { > push @authorised_values, ""; >+ $authorised_category{""} = $category; > > my $itemtype; > my $itemtypes = Koha::ItemTypes->search_with_localization; >@@ -328,6 +329,7 @@ sub build_authorized_values_list { > } > elsif ( $category eq "cn_source" ) { > push @authorised_values, ""; >+ $authorised_category{""} = $category; > > my $class_sources = GetClassSources(); > >@@ -360,6 +362,7 @@ sub build_authorized_values_list { > ); > > push @authorised_values, ""; >+ $authorised_category{""} = $category; > > while ( my ( $value, $lib, $this_category ) = $authorised_values_sth->fetchrow_array ) { > push @authorised_values, $value; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >index e31befcfea0..642796c4e79 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >@@ -137,6 +137,7 @@ > <li> > <label for="parent">Parent category:</label> > <select name="parent" id="parent_auth_value_categories"> >+ <option value="" selected> </option> > [% FOR c IN category_names %] > <option value="[% c.category_name | html %]">[% c.category_name | html %]</option> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 1c38d98bd82..94336180fb5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -1214,7 +1214,7 @@ $(document).ready(function(){ > > [% SET matched = 0 %] > [% FOREACH aval IN mv.values %] >- [% IF mv.avcs.$aval == mv.category %] >+ [% IF ( mv.category AND mv.avcs.$aval == mv.category ) OR ( mv.avc AND mv.avcs.$aval == mv.avc.category_name ) %] > [% IF aval == mv.default %] > [% SET matched = 1 %] > <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> >@@ -1229,7 +1229,7 @@ $(document).ready(function(){ > </optgroup> > <optgroup label="[% mv.avc.parent | html %]"> > [% FOREACH aval IN mv.values %] >- [% IF mv.avcs.$aval != mv.category %] >+ [% IF ( mv.category AND mv.avcs.$aval != mv.category ) OR ( mv.avc AND mv.avcs.$aval != mv.avc.category_name ) %] > [% IF aval == mv.default %] > [% SET matched = 1 %] > <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> >-- >2.30.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 35067
:
162312
|
162326
|
162327
|
162328
|
162329
|
162355
|
162356
|
162357
|
162358
|
162702
|
162703
|
162704
|
162705
|
162706
| 162708