View | Details | Raw Unified | Return to bug 36616
Collapse All | Expand All

(-)a/C4/AuthoritiesMarc.pm (+7 lines)
Lines 1179-1184 sub BuildSummary { Link Here
1179
            my $direction = $linkage =~ m#/r$# ? 'rtl' : 'ltr';
1179
            my $direction = $linkage =~ m#/r$# ? 'rtl' : 'ltr';
1180
            push @otherscript, { term => $field->as_string($subfields_to_report), category => $category, type => $type, direction => $direction, linkage => $linkage };
1180
            push @otherscript, { term => $field->as_string($subfields_to_report), category => $category, type => $type, direction => $direction, linkage => $linkage };
1181
        }
1181
        }
1182
1183
        # determine if established heading
1184
        my $f008  = $record->field('008');
1185
        my $pos09 = $f008 ? substr( $f008->data, 9, 1 ) : "";
1186
        if ( $pos09 eq 'a' or $pos09 eq 'f' or $pos09 eq '|' ) {
1187
            $summary{established} = 1;
1188
        }
1182
    }
1189
    }
1183
    $summary{mainentry}     = $authorized[0]->{heading};
1190
    $summary{mainentry}     = $authorized[0]->{heading};
1184
    $summary{mainmainentry} = $authorized[0]->{hemain};
1191
    $summary{mainmainentry} = $authorized[0]->{hemain};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt (+4 lines)
Lines 99-105 Link Here
99
                                    <a href="javascript:doauth('[% resul.authid | uri %]', '[% index | uri %]', '[% loop.count | uri %]')" title="[% authorized.heading | html %]">[% loop.count | html %]</a>
99
                                    <a href="javascript:doauth('[% resul.authid | uri %]', '[% index | uri %]', '[% loop.count | uri %]')" title="[% authorized.heading | html %]">[% loop.count | html %]</a>
100
                                [% END %]
100
                                [% END %]
101
                          [% ELSE %]
101
                          [% ELSE %]
102
                            [% IF Koha.Preference('LinkEstablishedHeadings') AND !resul.summary.established %]
103
                                <a class="btn btn-xs btn-default disabled" href="javascript:doauth('[% resul.authid | html %]', '[% index | html %]', '')"><i class="fa fa-plus"></i> Choose</a>
104
                            [% ELSE %]
102
                                <a class="btn btn-xs btn-default" href="javascript:doauth('[% resul.authid | html %]', '[% index | html %]', '')"><i class="fa fa-plus"></i> Choose</a>
105
                                <a class="btn btn-xs btn-default" href="javascript:doauth('[% resul.authid | html %]', '[% index | html %]', '')"><i class="fa fa-plus"></i> Choose</a>
106
                            [% END %]
103
                          [% END %]
107
                          [% END %]
104
                        </td>
108
                        </td>
105
                        <td><a class="btn btn-xs btn-default" href="authorities.pl?authid=[% resul.authid | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit authority</a></td>
109
                        <td><a class="btn btn-xs btn-default" href="authorities.pl?authid=[% resul.authid | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit authority</a></td>
(-)a/t/db_dependent/AuthoritiesMarc.t (-4 / +5 lines)
Lines 42-47 $module->mock( Link Here
42
        } elsif ( $authid eq '2' ) {
42
        } elsif ( $authid eq '2' ) {
43
            $record->add_fields(
43
            $record->add_fields(
44
                [ '001', '2' ],
44
                [ '001', '2' ],
45
                [ '008', '|| aca||aabn           | a|a     d' ],
45
                [ '151', ' ', ' ', a => 'New York (State)' ],
46
                [ '151', ' ', ' ', a => 'New York (State)' ],
46
                [ '551', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
47
                [ '551', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
47
                [ '751', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
48
                [ '751', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
Lines 169-177 my $expected_marc21_summary = { Link Here
169
            'heading' => 'General subdivision'
170
            'heading' => 'General subdivision'
170
        }
171
        }
171
    ],
172
    ],
172
    'seefrom' => [],
173
    'seefrom'     => [],
173
    'label'   => 'Geographic Name',
174
    'label'       => 'Geographic Name',
174
    'type'    => 'Geographic Name',
175
    'type'        => 'Geographic Name',
176
    'established' => '1',
175
};
177
};
176
178
177
is_deeply(
179
is_deeply(
178
- 

Return to bug 36616