From ad3114aecfae149787d69412373c90979573194a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 2 Mar 2021 17:44:35 +0000 Subject: [PATCH] Bug 27737: Tag editor for authority lookup broken in authority editor This patch changes the markup structure for the authorities editor so that it better matches that of the basic bibliographic record editor. This allows the authority-linking JavaScript to correctly target fields on both pages. To test, apply the patch and go to Authorities in the staff client. - Create or edit an authority record. - Switch to tab 5 and if necessary click one of the tag names (e.g. "SEE ALSO FROM TRACING--PERSONAL NAME") to expand the subfields. - Click the "..." plugin link next to subfield a ("Personal name" in this example). - In the popup window, search for an authority record. - Click "Choose" next to one of the results. - The popup window should close and the authority editor should contain data from the record you chose, including a value in $9 and $a. - Test with various records to confirm that data in other fields is copied correctly, for instanct $d, dates associated with a name, $t title of a work. - Test other JavaScript-driven interactions in the editor: - Duplicate repeatable tag - Remove repeatable tag - Empty tag - Reorder sortable tags (e.g. multiple 500 tags) - Reorder sortable subfields - Duplicate repeatable subfield - Remove repeatable subfield - Empty repeatable subfield Signed-off-by: Katrin Fischer https://bugs.koha-community.org/show_bug.cgi?id=22737 --- koha-tmpl/intranet-tmpl/prog/css/addbiblio.css | 58 ++------------ .../prog/en/modules/authorities/authorities.tt | 93 +++++++++++++--------- 2 files changed, 64 insertions(+), 87 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css b/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css index 4592e25a20..ddbefa898d 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css +++ b/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css @@ -159,21 +159,21 @@ a.tagnum { float: left; } -#cat_addbiblio .subfieldcode { +.subfieldcode { float: none; } -#cat_addbiblio .labelsubfield { +.labelsubfield { font-size: 90%; float: none; } -#cat_addbiblio .subfield { +.subfield { float: none; padding: .25em .5em; } -#cat_addbiblio .subfield label { +.subfield label { color: #00698a; } @@ -182,21 +182,21 @@ a.tagnum { width:30em; } -#cat_addbiblio .input_marceditor { +.input_marceditor { float: none; width: 100%; } -#cat_addbiblio .subfield_line { +.subfield_line { display: flex; } -#cat_addbiblio .field_marceditor { +.field_marceditor { flex-grow: 1; padding: .25em .5em; } -#cat_addbiblio .subfield_loop_mandatory { +.subfield_loop_mandatory { padding: .25em .5em; } @@ -400,45 +400,3 @@ tbody tr.active td { z-index: 2000; } -#authoritiestabs .marc_field { - display: inline-block; - padding: .3em; - border-radius: 3px; -} - -#authoritiestabs .marc_subfield { - font-weight: bold; - color: #666; -} - -#authoritiestabs .marc_subfield_desc { - color: #00698a; - font-style: italic; -} - -#authoritiestabs .auth_subfield { - display: flex; -} - -#authoritiestabs .tag { - padding: .4em 0; -} - -#authoritiestabs .tag_desc { - color: #026; -} - -#authoritiestabs .tag_num { - color: #080; -} - -#authoritiestabs .tag_title { - font-size: 100%; - font-weight: bold; - padding: 0; -} - -#authoritiestabs .ui-tabs-nav.ui-widget-header { - border-bottom: 1px solid #b9d8d9; - border-radius: 0; -} 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 6e55762e06..fe9f5de0e6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -185,7 +185,7 @@ function confirmnotdup(redirect){
-
+
[% IF ( authid ) %]

Modify authority #[% authid | html %] [% authtypetext | html %]

@@ -253,15 +253,23 @@ function confirmnotdup(redirect){ [% END %] [% previous = innerloo.tag %] -
    + [% IF ( innerloo.repeatable ) %] +
      + [% ELSE %] +
        + [% END %] + [% END %] + [% IF ( innerloo.repeatable ) %] +
      • + [% ELSE %] +
      • [% END %] -
      • [% UNLESS hide_marc %] [% IF advancedMARCEditor %] [% innerloo.tag | html %] [% ELSE %] - [% innerloo.tag | html %] + [% innerloo.tag | html %] [% END %] [% IF ( innerloo.fixedfield ) %] Delete this Tag - + -
        +
    [% FOREACH subfield_loo IN innerloo.subfield_loop %]
  • - [% UNLESS advancedMARCEditor %] - [% IF ( subfield_loo.fixedfield ) %]
  • [% END %] -- 2.11.0