$summary{type} = $authref->{authtypetext};
$summary{summary} = $authref->{summary};
}
- my $marc21subfields = 'abcdfghjklmnopqrstuvxyz';
+ my $marc21subfields = 'abcdfghjklmnopqrstuvxyz68';
my %marc21controlrefs = ( 'a' => 'earlier',
'b' => 'later',
'd' => 'acronym',
# see :
foreach my $field ($record->field('5..')) {
if (($field->subfield('5')) && ($field->subfield('a')) && ($field->subfield('5') eq 'g')) {
- push @seealso, { $field->as_string('abcdefgjxyz'), type => 'broader', field => $field->tag() };
+ push @seealso, {
+ heading => $field->as_string('abcdefgjxyz'),
+ type => 'broader',
+ field => $field->tag(),
+ search => $field->as_string('abcdefgjxyz'),
+ authid => $field->subfield('9')
+ };
} elsif (($field->subfield('5')) && ($field->as_string) && ($field->subfield('5') eq 'h')){
- push @seealso, { heading => $field->as_string('abcdefgjxyz'), type => 'narrower', field => $field->tag() };
+ push @seealso, {
+ heading => $field->as_string('abcdefgjxyz'),
+ type => 'narrower',
+ field => $field->tag(),
+ search => $field->as_string('abcdefgjxyz'),
+ authid => $field->subfield('9')
+ };
} elsif ($field->subfield('a')) {
- push @seealso, { heading => $field->as_string('abcdefgxyz'), type => 'seealso', field => $field->tag() };
+ push @seealso, {
+ heading => $field->as_string('abcdefgxyz'),
+ type => 'seealso',
+ field => $field->tag(),
+ search => $field->as_string('abcdefgjxyz'),
+ authid => $field->subfield('9')
+ };
}
}
# // form
}
foreach my $field ($record->field('4..')) { #See From
my $type = 'seefrom';
- $type = $marc21controlrefs{substr $field->subfield('w'), 0, 1} if ($field->subfield('w'));
+ $type = ($marc21controlrefs{substr $field->subfield('w'), 0, 1} || '') if ($field->subfield('w'));
if ($type eq 'notapplicable') {
$type = substr $field->subfield('w'), 2, 1;
$type = 'earlier' if $type && $type ne 'n';
}
if ($type eq 'subfi') {
- push @seefrom, { heading => $field->as_string($marc21subfields), type => $field->subfield('i'), field => $field->tag() };
+ push @seefrom, { heading => $field->as_string($marc21subfields), type => ($field->subfield('i') || ''), field => $field->tag() };
} else {
push @seefrom, { heading => $field->as_string($marc21subfields), type => $type, field => $field->tag() };
}
}
foreach my $field ($record->field('5..')) { #See Also
my $type = 'seealso';
- $type = $marc21controlrefs{substr $field->subfield('w'), 0, 1} if ($field->subfield('w'));
+ $type = ($marc21controlrefs{substr $field->subfield('w'), 0, 1} || '') if ($field->subfield('w'));
if ($type eq 'notapplicable') {
$type = substr $field->subfield('w'), 2, 1;
$type = 'earlier' if $type && $type ne 'n';
}
if ($type eq 'subfi') {
- push @seealso, { heading => $field->as_string($marc21subfields), type => $field->subfield('i'), field => $field->tag() };
+ push @seealso, {
+ heading => $field->as_string($marc21subfields),
+ type => $field->subfield('i'),
+ field => $field->tag(),
+ search => $field->as_string($marc21subfields) || '',
+ authid => $field->subfield('9') || ''
+ };
} else {
- push @seealso, { heading => $field->as_string($marc21subfields), type => $type, field => $field->tag() };
+ push @seealso, {
+ heading => $field->as_string($marc21subfields),
+ type => $type,
+ field => $field->tag(),
+ search => $field->as_string($marc21subfields) || '',
+ authid => $field->subfield('9') || ''
+ };
}
}
foreach my $field ($record->field('6..')) {
[% IF marcflavour == 'UNIMARC' %]
[% SWITCH type %]
[% CASE 'broader' %]
- <span class="BT">[% heading %]</span> --
+ <span class="BT">[% heading | html %]</span> --
[% CASE 'narrower' %]
- <span class="NT">[% heading %]</span> --
+ <span class="NT">[% heading | html %]</span> --
[% CASE 'narrower' %]
- <span class="NT">[% heading %]</span> --
+ <span class="NT">[% heading | html %]</span> --
[% CASE 'seefrom' %]
- <span class="UF">[% heading %]</span> --
+ <span class="UF">[% heading | html %]</span> --
[% CASE 'seealso' %]
- <span class="RT">[% heading %]</span> --
+ <span class="RT">[% heading | html %]</span> --
[% END %]
[% ELSE %]
- [% IF ( label ) %]<span class="label">[% label %]</span>[% END %]
- <span class="heading">[% heading %]</span>
+ [% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
+ <span class="heading">
+ [% IF ( linkpath && search ) %]<a href="[% link | url %][% search | url %]">[% heading | html %]</a>
+ [% ELSE %][% heading | html %][% END %]
+ </span>
[% UNLESS ( type=='seefrom' || type=='seealso' ) %]<span class="type">[% SWITCH type %]
[% CASE 'earlier' %](Earlier heading)
[% CASE 'later' %](Later heading)
[% CASE 'musical' %](Musical composition)
[% CASE 'broader' %](Broader heading)
[% CASE 'narrower' %](Narrower heading)
- [% CASE %]([% type %])
+ [% CASE 'parent' %](Immediate parent body)
+ [% CASE %]([% type | html %])
[% END %]</span>[% END %]
[% END %]
[% END %]
[% BLOCK authresult %]
- [% IF ( summary.summary ) %][% summary.summary %]:[% END %]
+ [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
[% UNLESS ( summary.summaryonly ) %]
[% FOREACH authorize IN summary.authorized %]
- <span class="authorizedheading">[% authorize.heading %]</span>
+ <span class="authorizedheading">[% authorize.heading | html %]</span>
[% END %]
[% IF ( marcflavour == 'UNIMARC' ) %]
[% FOREACH note IN summary.notes %]
- <span class="note">[% note %]</span>
+ <span class="note">[% note | html %]</span>
[% END %]
[% FOREACH seefro IN summary.seefrom %]
- [% PROCESS showreference heading=seefro.heading label="" type=seefro.type %]
+ [% PROCESS showreference heading=seefro.heading label="" type=seefro.type search='' %]
[% END %]
[% ELSE %]
[% IF ( summary.seefrom ) %]
[% FOREACH seefro IN summary.seefrom %]
<div class="seefrom authref">
- [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type %]
+ [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type search='' %]
</div>
[% END %]
[% END %]
[% IF ( summary.seealso ) %]
[% FOREACH seeals IN summary.seealso %]
<div class="seealso authref">
- [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type %]
+ [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type linkpath=link search=seeals.search %]
</div>
[% END %]
[% END %]
[% ELSE %]
<tr>
[% END %]
- <td>[% PROCESS authresult summary=resul.summary %]</td>
+ <td>[% PROCESS authresult summary=resul.summary link="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&marclist=any&operator=contains&orderby=HeadingAsc&value=" %]</td>
<td><a href="detail.pl?authid=[% resul.authid %]">Details</a></td>
[% UNLESS ( resul.isEDITORS ) %]
<td>
[% IF marcflavour == 'UNIMARC' %]
[% SWITCH type %]
[% CASE 'broader' %]
- <span class="BT">[% heading %]</span> --
+ <span class="BT">[% heading | html %]</span> --
[% CASE 'narrower' %]
- <span class="NT">[% heading %]</span> --
+ <span class="NT">[% heading | html %]</span> --
[% CASE 'narrower' %]
- <span class="NT">[% heading %]</span> --
+ <span class="NT">[% heading | html %]</span> --
[% CASE 'seefrom' %]
- <span class="UF">[% heading %]</span> --
+ <span class="UF">[% heading | html %]</span> --
[% CASE 'seealso' %]
- <span class="RT">[% heading %]</span> --
+ <span class="RT">[% heading | html %]</span> --
[% END %]
[% ELSE %]
- [% IF ( label ) %]<span class="label">[% label %]</span>[% END %]
- <span class="heading">[% heading %]</span>
+ [% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
+ <span class="heading">
+ [% IF ( linkpath && search ) %]<a href="[% link | url %][% search | url %]">[% heading | html %]</a>
+ [% ELSE %][% heading | html %][% END %]
+ </span>
[% UNLESS ( type=='seefrom' || type=='seealso' ) %]<span class="type">[% SWITCH type %]
[% CASE 'earlier' %](Earlier heading)
[% CASE 'later' %](Later heading)
[% CASE 'musical' %](Musical composition)
[% CASE 'broader' %](Broader heading)
[% CASE 'narrower' %](Narrower heading)
- [% CASE %]([% type %])
+ [% CASE 'parent' %](Immediate parent body)
+ [% CASE %]([% type | html %])
[% END %]</span>[% END %]
[% END %]
[% END %]
[% BLOCK authresult %]
- [% IF ( summary.summary ) %][% summary.summary %]:[% END %]
+ [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
[% UNLESS ( summary.summaryonly ) %]
[% FOREACH authorize IN summary.authorized %]
- <span class="authorizedheading">[% authorize.heading %]</span>
+ <span class="authorizedheading">[% authorize.heading | html %]</span>
[% END %]
[% IF ( marcflavour == 'UNIMARC' ) %]
[% FOREACH note IN summary.notes %]
- <span class="note">[% note %]</span>
+ <span class="note">[% note | html %]</span>
[% END %]
[% FOREACH seefro IN summary.seefrom %]
- [% PROCESS showreference heading=seefro.heading label="" type=seefro.type %]
+ [% PROCESS showreference heading=seefro.heading label="" type=seefro.type search='' %]
[% END %]
[% ELSE %]
[% IF ( summary.seefrom ) %]
[% FOREACH seefro IN summary.seefrom %]
<div class="seefrom authref">
- [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type %]
+ [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type search='' %]
</div>
[% END %]
[% END %]
[% IF ( summary.seealso ) %]
[% FOREACH seeals IN summary.seealso %]
<div class="seealso authref">
- [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type %]
+ [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type linkpath=link search=seeals.search %]
</div>
[% END %]
[% END %]
[% ELSE %]
<tr>
[% END %]
- <td>[% PROCESS authresult summary=resul.summary %]</td>
+ <td>[% PROCESS authresult summary=resul.summary link="/cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operatorc=contains&marclistc=mainentry&and_orc=and&orderby=HeadingAsc&valuec=" %]</td>
<td>[% resul.authtype %]</td>
[% UNLESS ( resul.isEDITORS ) %]
<td>