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

(-)a/C4/AuthoritiesMarc.pm (+7 lines)
Lines 1177-1182 sub BuildSummary { Link Here
1177
            my $direction = $linkage =~ m#/r$# ? 'rtl' : 'ltr';
1177
            my $direction = $linkage =~ m#/r$# ? 'rtl' : 'ltr';
1178
            push @otherscript, { term => $field->as_string($subfields_to_report), category => $category, type => $type, direction => $direction, linkage => $linkage };
1178
            push @otherscript, { term => $field->as_string($subfields_to_report), category => $category, type => $type, direction => $direction, linkage => $linkage };
1179
        }
1179
        }
1180
1181
        # determine if established heading
1182
        my $f008  = $record->field('008');
1183
        my $pos09 = $f008 ? substr( $f008->data, 9, 1 ) : "";
1184
        if ( $pos09 eq 'a' or $pos09 eq 'f' or $pos09 eq '|' ) {
1185
            $summary{established} = 1;
1186
        }
1180
    }
1187
    }
1181
    $summary{mainentry}     = $authorized[0]->{heading};
1188
    $summary{mainentry}     = $authorized[0]->{heading};
1182
    $summary{mainmainentry} = $authorized[0]->{hemain};
1189
    $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 (-2 / +3 lines)
Lines 40-45 $module->mock('GetAuthority', sub { Link Here
40
    } elsif ($authid eq '2') {
40
    } elsif ($authid eq '2') {
41
        $record->add_fields(
41
        $record->add_fields(
42
            [ '001', '2' ],
42
            [ '001', '2' ],
43
            [ '008', '|| aca||aabn           | a|a     d' ],
43
            [ '151', ' ', ' ', a => 'New York (State)' ],
44
            [ '151', ' ', ' ', a => 'New York (State)' ],
44
            [ '551', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ]
45
            [ '551', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ]
45
            );
46
            );
Lines 154-160 my $expected_marc21_summary = { Link Here
154
    'seefrom'   => [],
155
    'seefrom'   => [],
155
    'label'     => 'Geographic Name',
156
    'label'     => 'Geographic Name',
156
    'type'      => 'Geographic Name',
157
    'type'      => 'Geographic Name',
157
    'equalterm' => []
158
    'equalterm' => [],
159
    'established' => '1',
158
};
160
};
159
161
160
is_deeply(
162
is_deeply(
161
- 

Return to bug 36616