Bugzilla – Attachment 108358 Details for
Bug 25728
Add the ability to create a new authorised value within the cataloguing module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25728: Create AV when cataloguing an authority record
Bug-25728-Create-AV-when-cataloguing-an-authority-.patch (text/plain), 3.75 KB, created by
Jonathan Druart
on 2020-08-16 11:42:58 UTC
(
hide
)
Description:
Bug 25728: Create AV when cataloguing an authority record
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-08-16 11:42:58 UTC
Size:
3.75 KB
patch
obsolete
>From 80fd97df4ace92839043405b5d7c9ed0f3335cd9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 9 Jun 2020 17:34:34 +0200 >Subject: [PATCH] Bug 25728: Create AV when cataloguing an authority record > >Test plan: >Same as the first patch but when cataloguing an authority record > >Sponsored-by: Orex Digital > >Signed-off-by: Hugo Agud <hagud@orex.es> >--- > authorities/authorities.pl | 6 ++++-- > .../prog/en/modules/authorities/authorities.tt | 14 +++++++------- > 2 files changed, 11 insertions(+), 9 deletions(-) > >diff --git a/authorities/authorities.pl b/authorities/authorities.pl >index e422cafb36..afd5749c9e 100755 >--- a/authorities/authorities.pl >+++ b/authorities/authorities.pl >@@ -73,7 +73,8 @@ sub build_authorized_values_list { > > > #---- branch >- if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) { >+ my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'}; >+ if ( $category eq "branches" ) { > my $sth = > $dbh->prepare( > "select branchcode,branchname from branches order by branchname"); >@@ -86,7 +87,7 @@ sub build_authorized_values_list { > $authorised_lib{$branchcode} = $branchname; > } > } >- elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) { >+ elsif ( $category eq "itemtypes" ) { > push @authorised_values, "" > unless ( $tagslib->{$tag}->{$subfield}->{mandatory} > && ( $value || $tagslib->{$tag}->{$subfield}->{defaultvalue} ) ); >@@ -121,6 +122,7 @@ sub build_authorized_values_list { > values => \@authorised_values, > labels => \%authorised_lib, > default => $value, >+ ( ( grep { $_ eq $category } ( qw(branches itemtypes cn_source) ) ) ? () : ( category => $category ) ), > }; > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index 3fcb56cb77..12a8d2a00e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -5,6 +5,10 @@ > <title>Koha › Authorities › [% IF ( authid ) %]Modify authority #[% authid | html %] ([% authtypetext | html %])[% ELSE %]Adding authority ([% authtypetext | html %])[% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] > [% Asset.js("lib/hc-sticky.js") | $raw %] >+ >+<script> >+ var CAN_user_parameters_manage_auth_values = "[% CAN_user_parameters_manage_auth_values | html %]"; >+</script> > [% Asset.js("js/cataloging.js") | $raw %] > > <script> >@@ -168,12 +172,6 @@ function confirmnotdup(redirect){ > [% Asset.css("css/addbiblio.css") | $raw %] > > [% INCLUDE 'select2.inc' %] >-<script> >- $(document).ready(function() { >- $('.subfield_line select').select2(); >- }); >-</script> >- > </head> > <body id="auth_authorities" class="auth"> > >@@ -375,7 +373,7 @@ function confirmnotdup(redirect){ > > [% SET mv = subfield_loo.marc_value %] > [% IF ( mv.type == 'select' ) %] >- <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]"> >+ <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]" data-category="[% mv.category | html %]"> > [% FOREACH aval IN mv.values %] > [% IF aval == mv.default %] > <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> >@@ -450,6 +448,8 @@ function confirmnotdup(redirect){ > > </form> > >+[% INCLUDE 'modals/cataloguing_create_av.inc' %] >+ > </div> > </div> > </div> >-- >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 25728
:
105837
|
105838
|
105839
|
105840
|
105841
|
105842
|
105852
|
106696
|
106697
|
106698
|
106699
|
106700
|
106701
|
106702
|
108356
|
108357
|
108358
|
108359
|
108360
|
108361
|
108362
|
108883
|
108884
|
108885
|
108886
|
108887
|
108888
|
108889
|
108890
|
108922
|
108923
|
108924
|
108925
|
108926
|
108927
|
108928
|
108929
|
108930
|
108931