Bugzilla – Attachment 55371 Details for
Bug 17216
Add a new table to store authorized value categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17216: Use Koha::AVC from mss.pl
Bug-17216-Use-KohaAVC-from-msspl.patch (text/plain), 2.46 KB, created by
Jonathan Druart
on 2016-09-08 17:43:49 UTC
(
hide
)
Description:
Bug 17216: Use Koha::AVC from mss.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-09-08 17:43:49 UTC
Size:
2.46 KB
patch
obsolete
>From 9c3d7fac94872b75909da8ac3b3e90ee97cbe63c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 29 Aug 2016 14:07:45 +0100 >Subject: [PATCH] Bug 17216: Use Koha::AVC from mss.pl > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > admin/marc_subfields_structure.pl | 11 +++-------- > .../prog/en/modules/admin/marc_subfields_structure.tt | 1 + > 2 files changed, 4 insertions(+), 8 deletions(-) > >diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl >index ea1373e..5b6927b 100755 >--- a/admin/marc_subfields_structure.pl >+++ b/admin/marc_subfields_structure.pl >@@ -24,6 +24,7 @@ use CGI qw ( -utf8 ); > use C4::Context; > > use Koha::Authority::Types; >+use Koha::AuthorisedValueCategories; > > use List::MoreUtils qw( uniq ); > >@@ -128,14 +129,8 @@ if ( $op eq 'add_form' ) { > $sth2->finish; > $sth2 = $dbh->prepare("select distinct category from authorised_values"); > $sth2->execute; >- my @authorised_values; >- push @authorised_values, ""; >- while ( ( my $category ) = $sth2->fetchrow_array ) { >- push @authorised_values, $category; >- } >- push( @authorised_values, "branches" ); >- push( @authorised_values, "itemtypes" ); >- push( @authorised_values, "cn_source" ); >+ my @av_cat = Koha::AuthorisedValueCategories->search; >+ my @authorised_values = map { $_->category_name } @av_cat; > > # build thesaurus categories list > my @authtypes = uniq( "", map { $_->authtypecode } Koha::Authority::Types->search ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >index 30b830e..2586941 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >@@ -163,6 +163,7 @@ > <li> > <label for="authorised_value[% loo.row %]">Authorized value:</label> > <select name="authorised_value" id="authorised_value[% loo.row %]" size="1"> >+ <option value=""></option> > [% FOREACH value IN loo.authorised_values %] > [% IF ( value == loo.authorised_value ) %] > <option value="[% value %]" selected="selected">[% value %]</option> >-- >2.8.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 17216
:
54979
|
54980
|
54981
|
54982
|
54983
|
54984
|
54985
|
54987
|
54988
|
54989
|
54990
|
54991
|
54992
|
54993
|
55003
|
55004
|
55005
|
55008
|
55009
|
55010
|
55011
|
55021
|
55022
|
55023
|
55024
|
55025
|
55026
|
55027
|
55028
|
55029
|
55030
|
55031
|
55032
|
55047
|
55207
|
55208
|
55209
|
55210
|
55211
|
55212
|
55213
|
55214
|
55215
|
55216
|
55217
|
55218
|
55365
|
55366
|
55367
|
55368
|
55369
|
55370
|
55371
|
55372
|
55373
|
55374
|
55375
|
55376
|
55692
|
55693
|
55835
|
55840
|
56202
|
56203
|
56204
|
56205
|
56206
|
56207
|
56208
|
56209
|
56210
|
56211
|
56212
|
56213
|
56214
|
56215
|
56216
|
56217
|
56619
|
57729