'i' => 'subfi',
't' => 'parent'
);
+ my %unimarc_relation_from_code = (
+ g => 'broader',
+ h => 'narrower',
+ a => 'seealso',
+ );
my %thesaurus;
$thesaurus{'1'}="Peuples";
$thesaurus{'2'}="Anthroponymes";
my $thesaurus = $field->subfield('2') ? "thes. : ".$thesaurus{"$field->subfield('2')"}." : " : '';
push @seefrom, { heading => $thesaurus . $field->as_string('abcdefghijlmnopqrstuvwxyz'), type => 'seefrom', field => $field->tag() };
}
-# see :
- foreach my $field ($record->field('5..')) {
- if (($field->subfield('5')) && ($field->subfield('a')) && ($field->subfield('5') eq 'g')) {
- 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(),
- 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(),
- search => $field->as_string('abcdefgjxyz'),
- authid => $field->subfield('9')
- };
+
+ # see :
+ @seealso = map {
+ my $type = $unimarc_relation_from_code{$_->subfield('5') || 'a'};
+ my $heading = $_->as_string('abcdefgjxyz');
+ {
+ field => $_->tag,
+ type => $type,
+ heading => $heading,
+ search => $heading,
+ authid => $_->subfield('9'),
}
- }
-# // form
- foreach my $field ($record->field('7..')) {
- my $lang = substr($field->subfield('8'),3,3);
- push @otherscript, { lang => $lang, term => $field->subfield('a'), direction => 'ltr', field => $field->tag() };
- }
+ } $record->field('5..');
+
+ # Other forms
+ @otherscript = map { {
+ lang => $_->subfield('8') || '',
+ term => $_->subfield('a'),
+ direction => 'ltr',
+ field => $_->tag,
+ } } $record->field('7..');
+
} else {
# construct MARC21 summary
# FIXME - looping over 1XX is questionable
#authfinderops {
float: right;
}
+div.authorizedheading {
+ font-weight: bold;
+}
+.authres_notes, .authres_seealso, .authres_otherscript {
+ padding-top: 3px;
+}
+.authres_notes {
+ font-style: italic;
+}
+
.contents {
width: 75%;
[% IF marcflavour == 'UNIMARC' %]
[% SWITCH type %]
[% CASE 'broader' %]
- <span class="BT">[% heading | html %]</span> --
+ <span class="BT">BT: [% heading | html %]</span>
[% CASE 'narrower' %]
- <span class="NT">[% heading | html %]</span> --
- [% CASE 'narrower' %]
- <span class="NT">[% heading | html %]</span> --
+ <span class="NT">NT: [% heading | html %]</span>
[% CASE 'seefrom' %]
- <span class="UF">[% heading | html %]</span> --
+ <span class="UF">UF: [% heading | html %]</span>
[% CASE 'seealso' %]
- <span class="RT">[% heading | html %]</span> --
+ <span class="RT">RT: [% heading | html %]</span>
[% END %]
[% ELSE %]
[% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
[% BLOCK authresult %]
[% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
[% UNLESS ( summary.summaryonly ) %]
+ <div class="authorizedheading">
[% FOREACH authorize IN summary.authorized %]
- <span class="authorizedheading">[% authorize.heading | html %]</span>
+ <span class="authorizedheading">[% authorize.heading | html %]</span>
[% END %]
+ </div>
[% IF ( marcflavour == 'UNIMARC' ) %]
- [% FOREACH note IN summary.notes %]
- <span class="note">[% note | html %]</span>
+ [% IF summary.notes %]
+ <div class="authres_notes">
+ [% FOREACH note IN summary.notes %]
+ [% note.note | html %]</span>
+ [% END %]
+ </div>
+ [% END %]
+ [% IF summary.seealso %]
+ <div class="authres_seealso">
+ [% FOREACH see IN summary.seealso %]
+ [% PROCESS showreference heading=see.heading label="" type=see.type search='' %]
+ [% IF ! loop.last %] ; [% END %]
[% END %]
- [% FOREACH seefro IN summary.seefrom %]
- [% PROCESS showreference heading=seefro.heading label="" type=seefro.type search='' %]
+ </div>
+ [% END %]
+ [% IF summary.otherscript %]
+ <div class="authres_otherscript">
+ [% FOREACH other IN summary.otherscript %]
+ [% PROCESS language lang=other.lang | trim %]:
+ [% other.term %]
+ [% IF ! loop.last %] ; [% END %]
[% END %]
+ </div>
+ [% END %]
+
[% ELSE %]
[% IF ( summary.seefrom ) %]
[% FOREACH seefro IN summary.seefrom %]
[% END %]
[% END %]
[% END %]
+[% BLOCK language %]
+ [% SWITCH lang %]
+ [% CASE ['en', 'eng'] %]English
+ [% CASE ['fr', 'fre'] %]French
+ [% CASE ['it', 'ita'] %]Italian
+ [% CASE ['de', 'ger', 'deu'] %]German
+ [% CASE ['es', 'spa'] %]Spanish
+ [% CASE %][% lang %]
+ [% END %]
+[% END %]
.authstanzaheading {
font-weight: bold;
}
-
+div.authorizedheading {
+ font-weight: bold;
+}
.authstanza li {
margin-left: 0.5em;
}
+.authres_notes, .authres_seealso, .authres_otherscript {
+ padding-top: 5px;
+}
+.authres_notes {
+ font-style: italic;
+}
#didyoumean {
background-color: #EEE;
[% IF marcflavour == 'UNIMARC' %]
[% SWITCH type %]
[% CASE 'broader' %]
- <span class="BT">[% heading | html %]</span> --
+ <span class="BT">BT: [% heading | html %]</span>
[% CASE 'narrower' %]
- <span class="NT">[% heading | html %]</span> --
- [% CASE 'narrower' %]
- <span class="NT">[% heading | html %]</span> --
+ <span class="NT">NT: [% heading | html %]</span>
[% CASE 'seefrom' %]
- <span class="UF">[% heading | html %]</span> --
+ <span class="UF">UF: [% heading | html %]</span>
[% CASE 'seealso' %]
- <span class="RT">[% heading | html %]</span> --
+ <span class="RT">RT: [% heading | html %]</span>
[% END %]
[% ELSE %]
[% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
[% BLOCK authresult %]
[% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
[% UNLESS ( summary.summaryonly ) %]
- [% FOREACH authorize IN summary.authorized %]
+ <div class="authorizedheading">
+ [% FOREACH authorize IN summary.authorized %]
<span class="authorizedheading">[% authorize.heading | html %]</span>
- [% END %]
+ [% END %]
+ </div>
[% IF ( marcflavour == 'UNIMARC' ) %]
- [% FOREACH note IN summary.notes %]
- <span class="note">[% note | html %]</span>
+ [% IF summary.notes %]
+ <div class="authres_notes">
+ [% FOREACH note IN summary.notes %]
+ [% note.note | html %]</span>
+ [% END %]
+ </div>
+ [% END %]
+ [% IF summary.seealso %]
+ <div class="authres_seealso">
+ [% FOREACH see IN summary.seealso %]
+ [% PROCESS showreference heading=see.heading label="" type=see.type search='' %]
+ [% IF ! loop.last %] ; [% END %]
+ [% END %]
+ </div>
[% END %]
- [% FOREACH seefro IN summary.seefrom %]
- [% PROCESS showreference heading=seefro.heading label="" type=seefro.type search='' %]
+ [% IF summary.otherscript %]
+ <div class="authres_otherscript">
+ [% FOREACH other IN summary.otherscript %]
+ [% PROCESS language lang=other.lang | trim %]:
+ [% other.term %]
+ [% IF ! loop.last %] ; [% END %]
+ [% END %]
+ </div>
[% END %]
[% ELSE %]
[% IF ( summary.seefrom ) %]
[% ELSE %][% heading %]
[% END %]
[% END %]
+[% BLOCK language %]
+ [% SWITCH lang %]
+ [% CASE ['en', 'eng'] %]English
+ [% CASE ['fr', 'fre'] %]French
+ [% CASE ['it', 'ita'] %]Italian
+ [% CASE ['de', 'ger', 'deu'] %]German
+ [% CASE ['es', 'spa'] %]Spanish
+ [% CASE %][% lang %]
+ [% END %]
+[% END %]
</div>
[% END %]
-<h1>[% summary.mainentry %][% IF authtypetext %]([% authtypetext %])[% END %]</h1>
+<h1>[% summary.mainentry %][% IF authtypetext %] ([% authtypetext %])[% END %]</h1>
<div class="usedin">Used in <a href="opac-search.pl?type=opac&q=[% authid %]&idx=an,phr">[% count %] records</a></div>
<div class="authstanza">
[% FOREACH authorize IN summary.authorized %]
</div>
[% END %]
[% IF marcflavour == 'UNIMARC' && summary.otherscript %]
- <div class="authstanza">
+ <div class="authstanza">
+ <div class="authstanzaheading">Other forms:</div>
+ <ul>
[% FOREACH otherscrip IN summary.otherscript %]
- <div class="heading otherscript auth[% otherscrip.field %]"><span class="label">See also[% PROCESS language lang=otherscript.lang | trim %] term:</span>
+ <li>
+ [% PROCESS language lang=otherscrip.lang | trim %]:
<span class="otherscript">[% otherscrip.term %]</span>
- </div>
+ </li>
[% END %]
- </div>
+ </ul>
+ </div>
[% END %]
<div id="authdescriptions" class="toptabs">
<ul>
+[% PROCESS 'opac-authorities.inc' %]
[% PROCESS 'authorities-search-results.inc' %]
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF ( total ) %]Authority search result[% ELSE %]No results found[% END %]
[% INCLUDE 'doc-head-close.inc' %]