Bugzilla – Attachment 120209 Details for
Bug 26368
Add support for OCLC Encoding level values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26368: Add OCLC options to marc21_leader.tt
Bug-26368-Add-OCLC-options-to-marc21leadertt.patch (text/plain), 7.03 KB, created by
Nick Clemens (kidclamp)
on 2021-04-27 11:07:22 UTC
(
hide
)
Description:
Bug 26368: Add OCLC options to marc21_leader.tt
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-04-27 11:07:22 UTC
Size:
7.03 KB
patch
obsolete
>From 5ab6baf311d2b8c748b09e191eb1439d0b5eb659 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 3 Sep 2020 12:52:28 +0000 >Subject: [PATCH] Bug 26368: Add OCLC options to marc21_leader.tt > >See documentation at: >https://www.oclc.org/bibformats/en/fixedfield/elvl.html > >To test: > 1 - Apply patch, updatedatabase > 2 - Edit a record in the basic editor > 3 - Edit the leader using the plugin > 4 - Note the options for '17 - Encoding level' > 5 - Find the system preference 'UseOCLCEncodingLevels' > 6 - Edit the record again > 7 - Note new options I,J,K,M > 8 - Set the value of encodign level to one of the new options and save > 9 - Edit again >10 - Confirm the value is displayed correctly selected >11 - Repeat tests using advanced cataloging editor >--- > .../bug_26368_add_OCLC_encoding_syspref.perl | 8 ++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../prog/en/includes/cateditor-widgets-marc21.inc | 6 ++++++ > .../en/modules/admin/preferences/cataloguing.pref | 6 ++++++ > .../cataloguing/value_builder/marc21_leader.tt | 23 ++++++++++++++++++++++ > 5 files changed, 44 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_26368_add_OCLC_encoding_syspref.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_26368_add_OCLC_encoding_syspref.perl b/installer/data/mysql/atomicupdate/bug_26368_add_OCLC_encoding_syspref.perl >new file mode 100644 >index 0000000000..73314698dd >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_26368_add_OCLC_encoding_syspref.perl >@@ -0,0 +1,8 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) >+ VALUES ('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo') >+ }); >+ NewVersion( $DBversion, 26368, "Add OCLC Encoding Levels system preference"); >+} >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index f163912142..bf51997172 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -720,6 +720,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('useDischarge','0','','Allows librarians to discharge borrowers and borrowers to request a discharge','YesNo'), > ('UseEmailReceipts','0','','Send email receipts for payments and write-offs','YesNo'), > ('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'), >+('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'), > ('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'), > ('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'), > ('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'), >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 701da251c4..ec1620cdca 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 >@@ -49,6 +49,12 @@ > <option value="5">5 - Partial (preliminary) level</option> > <option value="7">7 - Minimal level</option> > <option value="8">8 - Prepublication level</option> >+ [% IF Koha.Preference('UseOCLCEncodingLevels') %] >+ <option value="I">I- Full-level input by OCLC participants</option> >+ <option value="J">J- Deleted record</option> >+ <option value="K">K- Less-than-full input by OCLC participants</option> >+ <option value="M">M- Added from a batch process</option> >+ [% END %] > <option value="u">u - Unknown</option> > <option value="z">z - Not applicable</option> > </select> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >index 5ffd9a22f3..242d54cad2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >@@ -158,6 +158,12 @@ Cataloging: > - and record's last modifier name in MARC subfield > - pref: MarcFieldForModifierName > - ". <br/><strong>NOTE:</strong> Use a dollar sign between field and subfield like 123$a." >+ - >+ - Display OCLC defined values for MARC encoding level in leader value builder? >+ - pref: UseOCLCEncodingLevels >+ choices: >+ 1: Yes. >+ 0: No. > Display: > - > - 'Separate main entry and subdivisions with ' >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt >index f6b39fb00f..eb35de84ae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt >@@ -1,4 +1,5 @@ > [% SET footerjs = 1 %] >+[% USE Koha %] > [% INCLUDE 'doc-head-open.inc' %] > <title>000 - Leader builder › Cataloging › Koha</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -236,6 +237,28 @@ > [% ELSE %] > <option value="8">8- Prepublication level</option> > [% END %] >+ [% IF Koha.Preference('UseOCLCEncodingLevels') %] >+ [% IF ( f17I ) %] >+ <option value="I" selected="selected">I- Full-level input by OCLC participants</option> >+ [% ELSE %] >+ <option value="I">I- Full-level input by OCLC participants</option> >+ [% END %] >+ [% IF ( f17J ) %] >+ <option value="J" selected="selected">J- Deleted record</option> >+ [% ELSE %] >+ <option value="J">J- Deleted record</option> >+ [% END %] >+ [% IF ( f17K ) %] >+ <option value="K" selected="selected">K- Less-than-full input by OCLC participants</option> >+ [% ELSE %] >+ <option value="K">K- Less-than-full input by OCLC participants</option> >+ [% END %] >+ [% IF ( f17K ) %] >+ <option value="M" selected="selected">M- Added from a batch process</option> >+ [% ELSE %] >+ <option value="M">M- Added from a batch process</option> >+ [% END %] >+ [% END %] > [% IF ( f17u ) %] > <option value="u" selected="selected">u - Unknown</option> > [% ELSE %] >-- >2.11.0
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 26368
:
109622
|
120209
|
140826
|
140837
|
141197
|
141198
|
141199