Bugzilla – Attachment 119092 Details for
Bug 27739
Advanced editor should use DefaultCountryField008 system preference rather than hardcoding xxu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27739: Advanced editor should use DefaultCountryField008 preference
Bug-27739-Advanced-editor-should-use-DefaultCountr.patch (text/plain), 3.13 KB, created by
Phil Ringnalda
on 2021-04-02 02:32:04 UTC
(
hide
)
Description:
Bug 27739: Advanced editor should use DefaultCountryField008 preference
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2021-04-02 02:32:04 UTC
Size:
3.13 KB
patch
obsolete
>From a7ff6e640b9480f350f4d07f69edc38fa3ccb40a Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Thu, 1 Apr 2021 11:36:43 -0700 >Subject: [PATCH] Bug 27739: Advanced editor should use DefaultCountryField008 > preference > >Uses the system preference DefaultCountryField008, falling back to ||| (no >attempt to code) if it is not set, for 008/15-17 place of publication in >the advanced cataloging editor.. > >Test plan: >1) Apply patch and restart all the things, something's over-cached here >2) Administration - Toggle the preference EnableAdvancedCatalogingEditor > to "Enable", verify the preference DefaultCountryField008 is empty >3) Cataloging - Advanced editor >4) In field 008, verify that the three characters after the two sets of > four blank spaces are ||| >5) Administration - Set DefaultCountryField008 to fr >6) Cataloging - Advanced editor >7) In field 008, verify that the three characters after the two sets of > four blank spaces are "fr " (including the space, so following > characters haven't shifted left, and the last character is still d) >--- > cataloguing/editor.pl | 1 + > .../intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > >diff --git a/cataloguing/editor.pl b/cataloguing/editor.pl >index b52c8505de..cfef40490a 100755 >--- a/cataloguing/editor.pl >+++ b/cataloguing/editor.pl >@@ -69,6 +69,7 @@ $template->{VARS}->{editable_batches} = [ $schema->resultset('ImportBatch')->sea > > # Needed information for cataloging plugins > $template->{VARS}->{DefaultLanguageField008} = pack( 'A3', C4::Context->preference('DefaultLanguageField008') || 'eng' ); >+$template->{VARS}->{DefaultCountryField008} = pack( 'A3', C4::Context->preference('DefaultCountryField008') || '|||' ); > > my $authtags = Koha::MarcSubfieldStructures->search({ authtypecode => { '!=' => '' }, 'frameworkcode' => '' }); > $template->{VARS}->{authtags} = $authtags; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc >index 8e428ee7eb..701da251c4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc >@@ -261,7 +261,7 @@ require( [ 'koha-backend', 'widget', 'text-marc' ], function( KohaBackend, Widge > Widget.Register( '008@', { > makeTemplate: function() { > var now = new Date(); >- return Widget.PadNum( now.getYear() % 100, 2 ) + Widget.PadNum( now.getMonth() + 1, 2 ) + Widget.PadNum( now.getDate(), 2 ) + "b xxu||||| |||| 00| 0 [% DefaultLanguageField008 | html %] d"; >+ return Widget.PadNum( now.getYear() % 100, 2 ) + Widget.PadNum( now.getMonth() + 1, 2 ) + Widget.PadNum( now.getDate(), 2 ) + "b [% DefaultCountryField008 | html %]||||| |||| 00| 0 [% DefaultLanguageField008 | html %] d"; > }, > init: function() { > var $result = $( '<span class="subfield-widget fixed-widget">' + _("Fixed data:") + '<span class="hint widget-loading">' + _("Loading...") + '</span></span>' ); >-- >2.26.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 27739
:
119092
|
119146
|
119681