Bugzilla – Attachment 81923 Details for
Bug 21740
Fixed-length fields show _ instead of @ when editing subfields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks
Bug-21740-Show--when-editing-fixed-length-fields-o.patch (text/plain), 3.65 KB, created by
ByWater Sandboxes
on 2018-11-02 21:05:46 UTC
(
hide
)
Description:
Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2018-11-02 21:05:46 UTC
Size:
3.65 KB
patch
obsolete
>From 7b7818d11b4f4fb40ef17e29f70673d8fa46396c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 31 Oct 2018 11:50:59 -0300 >Subject: [PATCH] Bug 21740: Show @ when editing fixed-length fields on > bibliographic frameworks > >This is a consistency issue: we store '@' as the subfield for >fixed-lenght fields, yet on editing '_' is displayed (on the form and >the tab). This was probably done to avoid URI encoding problems in the >past. > >This patch restores the '@' everywhere. > >To test: >- Open the MARC structure for any bibliographic MARC framework >- Choose Actions > Subfields on any fixed-length field >=> ERROR: Notice the tab has an underscore (_) and the subfield code is '_' as well. >- Cancel >=> SUCCESS: '@' is displayed on the list >- Apply this patch >- Restart all the things: > $ restart_all >- Choose Actions > Subfields on any fixed-length field >=> SUCCESS: '@' is displayed in the tab title, and on the 'Subfield >code' form field. >- Save some changes >=> SUCCESS: Things work correctly. >- Sign off :-D > >Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> > >Signed-off-by: Devinim <kohadevinim@devinim.com.tr> >--- > admin/marc_subfields_structure.pl | 3 +-- > .../intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt | 4 ++-- > 2 files changed, 3 insertions(+), 4 deletions(-) > >diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl >index eeef468398..e017e10aa3 100755 >--- a/admin/marc_subfields_structure.pl >+++ b/admin/marc_subfields_structure.pl >@@ -172,7 +172,7 @@ if ( $op eq 'add_form' ) { > $row_data{maxlength} = $data->{maxlength}; > $row_data{tab} = $data->{tab}; > $row_data{tagsubfield} = $data->{tagsubfield}; >- $row_data{subfieldcode} = $data->{'tagsubfield'} eq '@' ? '_' : $data->{'tagsubfield'}; >+ $row_data{subfieldcode} = $data->{'tagsubfield'}; > $row_data{urisubfieldcode} = $row_data{subfieldcode} eq '%' ? 'pct' : $row_data{subfieldcode}; > $row_data{liblibrarian} = $data->{'liblibrarian'}; > $row_data{libopac} = $data->{'libopac'}; >@@ -263,7 +263,6 @@ elsif ( $op eq 'add_validate' ) { > my $tagfield = $input->param('tagfield'); > my $tagsubfield = $tagsubfield[$i]; > $tagsubfield = "@" unless $tagsubfield ne ''; >- $tagsubfield = "@" if $tagsubfield eq '_'; > my $liblibrarian = $liblibrarian[$i]; > my $libopac = $libopac[$i]; > my $repeatable = $input->param("repeatable$i") ? 1 : 0; >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 4192ace0e2..f4d0fefcec 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 >@@ -48,9 +48,9 @@ > <ul> > [% FOREACH loo IN loop %] > [% IF ( loo.new_subfield ) %] >- <li><a href="#sub[% loo.urisubfieldcode | uri %]field" title="[% loo.liblibrarian | html_entity %]">New</a></li> >+ <li><a href="#sub[% loo.urisubfieldcode | html_entity %]field" title="[% loo.liblibrarian | html_entity %]">New</a></li> > [% ELSE %] >- <li><a href="#sub[% loo.urisubfieldcode | uri %]field" title="[% loo.liblibrarian | html_entity %]"> >+ <li><a href="#sub[% loo.urisubfieldcode | html_entity %]field" title="[% loo.liblibrarian | html_entity %]"> > [% loo.subfieldcode | html %] > </a></li> > [% END %] >-- >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 21740
:
81733
|
81920
|
81923
|
81925
|
81979
|
82232
|
82233