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

(-)a/C4/AuthoritiesMarc.pm (+7 lines)
Lines 1223-1228 sub BuildSummary { Link Here
1223
                direction => $direction, linkage => $linkage
1223
                direction => $direction, linkage => $linkage
1224
                };
1224
                };
1225
        }
1225
        }
1226
1227
        # determine if established heading
1228
        my $f008  = $record->field('008');
1229
        my $pos09 = $f008 ? substr( $f008->data, 9, 1 ) : "";
1230
        if ( $pos09 eq 'a' or $pos09 eq 'f' or $pos09 eq '|' ) {
1231
            $summary{established} = 1;
1232
        }
1226
    }
1233
    }
1227
    $summary{mainentry}     = $authorized[0]->{heading};
1234
    $summary{mainentry}     = $authorized[0]->{heading};
1228
    $summary{mainmainentry} = $authorized[0]->{hemain};
1235
    $summary{mainmainentry} = $authorized[0]->{hemain};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt (-1 / +5 lines)
Lines 125-131 Link Here
125
                                    <a href="javascript:doauth('[% line.authid | uri %]', '[% index | uri %]', '[% loop.count | uri %]')" title="[% authorized.heading | html %]">[% loop.count | html %]</a>
125
                                    <a href="javascript:doauth('[% line.authid | uri %]', '[% index | uri %]', '[% loop.count | uri %]')" title="[% authorized.heading | html %]">[% loop.count | html %]</a>
126
                                [% END %]
126
                                [% END %]
127
                            [% ELSE %]
127
                            [% ELSE %]
128
                                <a class="btn btn-xs btn-default" href="javascript:doauth('[% line.authid | html %]', '[% index | html %]', '')"><i class="fa fa-plus"></i> Choose</a>
128
                                [% IF Koha.Preference('LinkEstablishedHeadings') AND !resul.summary.established %]
129
                                    <a class="btn btn-xs btn-default disabled" href="javascript:doauth('[% line.authid | html %]', '[% index | html %]', '')"><i class="fa fa-plus"></i> Choose</a>
130
                                [% ELSE %]
131
                                    <a class="btn btn-xs btn-default" href="javascript:doauth('[% line.authid | html %]', '[% index | html %]', '')"><i class="fa fa-plus"></i> Choose</a>
132
                                [% END %]
129
                            [% END %]
133
                            [% END %]
130
                        </td>
134
                        </td>
131
                        <td
135
                        <td
(-)a/t/db_dependent/AuthoritiesMarc.t (-4 / +5 lines)
Lines 52-57 $module->mock( Link Here
52
        } elsif ( $authid eq '2' ) {
52
        } elsif ( $authid eq '2' ) {
53
            $record->add_fields(
53
            $record->add_fields(
54
                [ '001', '2' ],
54
                [ '001', '2' ],
55
                [ '008', '|| aca||aabn           | a|a     d' ],
55
                [ '151', ' ', ' ', a => 'New York (State)' ],
56
                [ '151', ' ', ' ', a => 'New York (State)' ],
56
                [ '551', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
57
                [ '551', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
57
                [ '751', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
58
                [ '751', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
Lines 196-204 my $expected_marc21_summary = { Link Here
196
            'heading' => 'General subdivision'
197
            'heading' => 'General subdivision'
197
        }
198
        }
198
    ],
199
    ],
199
    'seefrom' => [],
200
    'seefrom'     => [],
200
    'label'   => 'Geographic Name',
201
    'label'       => 'Geographic Name',
201
    'type'    => 'Geographic Name',
202
    'type'        => 'Geographic Name',
203
    'established' => '1',
202
};
204
};
203
205
204
is_deeply(
206
is_deeply(
205
- 

Return to bug 36616