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

(-)a/C4/AuthoritiesMarc.pm (-32 / +26 lines)
Lines 959-964 sub BuildSummary { Link Here
959
        'i' => 'subfi',
959
        'i' => 'subfi',
960
        't' => 'parent'
960
        't' => 'parent'
961
    );
961
    );
962
    my %unimarc_relation_from_code = (
963
        g => 'broader',
964
        h => 'narrower',
965
        a => 'seealso',
966
    );
962
    my %thesaurus;
967
    my %thesaurus;
963
    $thesaurus{'1'}="Peuples";
968
    $thesaurus{'1'}="Peuples";
964
    $thesaurus{'2'}="Anthroponymes";
969
    $thesaurus{'2'}="Anthroponymes";
Lines 1023-1061 sub BuildSummary { Link Here
1023
            my $thesaurus = $field->subfield('2') ? "thes. : ".$thesaurus{"$field->subfield('2')"}." : " : '';
1028
            my $thesaurus = $field->subfield('2') ? "thes. : ".$thesaurus{"$field->subfield('2')"}." : " : '';
1024
            push @seefrom, { heading => $thesaurus . $field->as_string('abcdefghijlmnopqrstuvwxyz'), type => 'seefrom', field => $field->tag() };
1029
            push @seefrom, { heading => $thesaurus . $field->as_string('abcdefghijlmnopqrstuvwxyz'), type => 'seefrom', field => $field->tag() };
1025
        }
1030
        }
1026
# see :
1031
        
1027
        foreach my $field ($record->field('5..')) {
1032
        # see :
1028
            if (($field->subfield('5')) && ($field->subfield('a')) && ($field->subfield('5') eq 'g')) {
1033
        @seealso = map {
1029
                push @seealso, {
1034
            my $type = $unimarc_relation_from_code{$_->subfield('5') || 'a'};
1030
                    heading => $field->as_string('abcdefgjxyz'),
1035
            my $heading = $_->as_string('abcdefgjxyz');
1031
                    type => 'broader',
1036
            {
1032
                    field => $field->tag(),
1037
                field   => $_->tag,
1033
                    search => $field->as_string('abcdefgjxyz'),
1038
                type    => $type,
1034
                    authid => $field->subfield('9')
1039
                heading => $heading,
1035
                };
1040
                search  => $heading,
1036
            } elsif (($field->subfield('5')) && ($field->as_string) && ($field->subfield('5') eq 'h')){
1041
                authid  => $_->subfield('9'),
1037
                push @seealso, {
1038
                    heading => $field->as_string('abcdefgjxyz'),
1039
                    type => 'narrower',
1040
                    field => $field->tag(),
1041
                    search => $field->as_string('abcdefgjxyz'),
1042
                    authid => $field->subfield('9')
1043
                };
1044
            } elsif ($field->subfield('a')) {
1045
                push @seealso, {
1046
                    heading => $field->as_string('abcdefgxyz'),
1047
                    type => 'seealso',
1048
                    field => $field->tag(),
1049
                    search => $field->as_string('abcdefgjxyz'),
1050
                    authid => $field->subfield('9')
1051
                };
1052
            }
1042
            }
1053
        }
1043
        } $record->field('5..');
1054
# // form
1044
1055
        foreach my $field ($record->field('7..')) {
1045
        # Other forms
1056
            my $lang = substr($field->subfield('8'),3,3);
1046
        @otherscript = map { {
1057
            push @otherscript, { lang => $lang, term => $field->subfield('a'), direction => 'ltr', field => $field->tag() };
1047
            lang      => $_->subfield('8') || '',
1058
        }
1048
            term      => $_->subfield('a'),
1049
            direction => 'ltr',
1050
            field     => $_->tag,
1051
        } } $record->field('7..');
1052
1059
    } else {
1053
    } else {
1060
# construct MARC21 summary
1054
# construct MARC21 summary
1061
# FIXME - looping over 1XX is questionable
1055
# FIXME - looping over 1XX is questionable
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (+10 lines)
Lines 2396-2401 ul.ui-tabs-nav li { Link Here
2396
#authfinderops {
2396
#authfinderops {
2397
    float: right;
2397
    float: right;
2398
}
2398
}
2399
div.authorizedheading {
2400
  font-weight: bold;
2401
}
2402
.authres_notes, .authres_seealso, .authres_otherscript {
2403
  padding-top: 3px;
2404
}
2405
.authres_notes {
2406
  font-style: italic;
2407
}
2408
2399
2409
2400
.contents {
2410
.contents {
2401
    width: 75%;
2411
    width: 75%;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc (-11 / +41 lines)
Lines 2-16 Link Here
2
    [% IF marcflavour == 'UNIMARC' %]
2
    [% IF marcflavour == 'UNIMARC' %]
3
        [% SWITCH type %]
3
        [% SWITCH type %]
4
        [% CASE 'broader' %]
4
        [% CASE 'broader' %]
5
            <span class="BT">[% heading | html %]</span> --
5
            <span class="BT">BT: [% heading | html %]</span>
6
        [% CASE 'narrower' %]
6
        [% CASE 'narrower' %]
7
            <span class="NT">[% heading | html %]</span> --
7
            <span class="NT">NT: [% heading | html %]</span>
8
        [% CASE 'narrower' %]
9
            <span class="NT">[% heading | html %]</span> --
10
        [% CASE 'seefrom' %]
8
        [% CASE 'seefrom' %]
11
            <span class="UF">[% heading | html %]</span> --
9
            <span class="UF">UF: [% heading | html %]</span>
12
        [% CASE 'seealso' %]
10
        [% CASE 'seealso' %]
13
            <span class="RT">[% heading | html %]</span> --
11
            <span class="RT">RT: [% heading | html %]</span>
14
        [% END %]
12
        [% END %]
15
    [% ELSE %]
13
    [% ELSE %]
16
        [% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
14
        [% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
Lines 33-48 Link Here
33
[% BLOCK authresult %]
31
[% BLOCK authresult %]
34
    [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
32
    [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
35
    [% UNLESS ( summary.summaryonly ) %]
33
    [% UNLESS ( summary.summaryonly ) %]
34
        <div class="authorizedheading">
36
        [% FOREACH authorize IN summary.authorized %]
35
        [% FOREACH authorize IN summary.authorized %]
37
            <span class="authorizedheading">[% authorize.heading | html %]</span>
36
          <span class="authorizedheading">[% authorize.heading | html %]</span>
38
        [% END %]
37
        [% END %]
38
        </div>
39
        [% IF ( marcflavour == 'UNIMARC' ) %]
39
        [% IF ( marcflavour == 'UNIMARC' ) %]
40
            [% FOREACH note IN summary.notes %]
40
          [% IF summary.notes %]
41
                <span class="note">[% note | html %]</span>
41
           <div class="authres_notes">
42
           [% FOREACH note IN summary.notes %]
43
             [% note.note | html %]</span>
44
           [% END %]
45
           </div>
46
          [% END %]
47
          [% IF summary.seealso %]
48
            <div class="authres_seealso">
49
            [% FOREACH see IN summary.seealso %]
50
              [% PROCESS showreference heading=see.heading label="" type=see.type search='' %]
51
              [% IF ! loop.last %] ; [% END %]
42
            [% END %]
52
            [% END %]
43
            [% FOREACH seefro IN summary.seefrom %]
53
            </div>
44
                [% PROCESS showreference heading=seefro.heading label="" type=seefro.type search='' %]
54
          [% END %]
55
          [% IF summary.otherscript %]
56
            <div class="authres_otherscript">
57
            [% FOREACH other IN summary.otherscript %]
58
              [% PROCESS language lang=other.lang | trim %]:                                                
59
              [% other.term %]
60
              [% IF ! loop.last %] ; [% END %]
45
            [% END %]
61
            [% END %]
62
            </div>
63
          [% END %]
64
46
        [% ELSE %]
65
        [% ELSE %]
47
            [% IF ( summary.seefrom ) %]
66
            [% IF ( summary.seefrom ) %]
48
                [% FOREACH seefro IN summary.seefrom %]
67
                [% FOREACH seefro IN summary.seefrom %]
Lines 61-63 Link Here
61
        [% END %]
80
        [% END %]
62
    [% END %]
81
    [% END %]
63
[% END %]
82
[% END %]
83
[% BLOCK language %]
84
  [% SWITCH lang %]
85
   [% CASE ['en', 'eng'] %]English
86
   [% CASE ['fr', 'fre'] %]French
87
   [% CASE ['it', 'ita'] %]Italian
88
   [% CASE ['de', 'ger', 'deu'] %]German
89
   [% CASE ['es', 'spa'] %]Spanish
90
   [% CASE %][% lang %]
91
  [% END %]
92
[% END %]
93
(-)a/koha-tmpl/opac-tmpl/prog/en/css/opac.css (-1 / +9 lines)
Lines 2682-2691 ul.ui-tabs-nav li { Link Here
2682
.authstanzaheading {
2682
.authstanzaheading {
2683
    font-weight: bold;
2683
    font-weight: bold;
2684
}
2684
}
2685
2685
div.authorizedheading {
2686
    font-weight: bold;
2687
}
2686
.authstanza li {
2688
.authstanza li {
2687
    margin-left: 0.5em;
2689
    margin-left: 0.5em;
2688
}
2690
}
2691
.authres_notes, .authres_seealso, .authres_otherscript {
2692
  padding-top: 5px;
2693
}
2694
.authres_notes {
2695
  font-style: italic;
2696
}
2689
2697
2690
#didyoumean {
2698
#didyoumean {
2691
    background-color: #EEE;
2699
    background-color: #EEE;
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc (-12 / +30 lines)
Lines 2-16 Link Here
2
    [% IF marcflavour == 'UNIMARC' %]
2
    [% IF marcflavour == 'UNIMARC' %]
3
        [% SWITCH type %]
3
        [% SWITCH type %]
4
        [% CASE 'broader' %]
4
        [% CASE 'broader' %]
5
            <span class="BT">[% heading | html %]</span> --
5
            <span class="BT">BT: [% heading | html %]</span>
6
        [% CASE 'narrower' %]
6
        [% CASE 'narrower' %]
7
            <span class="NT">[% heading | html %]</span> --
7
            <span class="NT">NT: [% heading | html %]</span>
8
        [% CASE 'narrower' %]
9
            <span class="NT">[% heading | html %]</span> --
10
        [% CASE 'seefrom' %]
8
        [% CASE 'seefrom' %]
11
            <span class="UF">[% heading | html %]</span> --
9
            <span class="UF">UF: [% heading | html %]</span>
12
        [% CASE 'seealso' %]
10
        [% CASE 'seealso' %]
13
            <span class="RT">[% heading | html %]</span> --
11
            <span class="RT">RT: [% heading | html %]</span>
14
        [% END %]
12
        [% END %]
15
    [% ELSE %]
13
    [% ELSE %]
16
        [% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
14
        [% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
Lines 33-47 Link Here
33
[% BLOCK authresult %]
31
[% BLOCK authresult %]
34
    [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
32
    [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
35
    [% UNLESS ( summary.summaryonly ) %]
33
    [% UNLESS ( summary.summaryonly ) %]
36
        [% FOREACH authorize IN summary.authorized %]
34
        <div class="authorizedheading">
35
          [% FOREACH authorize IN summary.authorized %]
37
            <span class="authorizedheading">[% authorize.heading | html %]</span>
36
            <span class="authorizedheading">[% authorize.heading | html %]</span>
38
        [% END %]
37
          [% END %]
38
        </div>
39
        [% IF ( marcflavour == 'UNIMARC' ) %]
39
        [% IF ( marcflavour == 'UNIMARC' ) %]
40
            [% FOREACH note IN summary.notes %]
40
            [% IF summary.notes %]
41
                <span class="note">[% note | html %]</span>
41
             <div class="authres_notes">
42
             [% FOREACH note IN summary.notes %]
43
               [% note.note | html %]</span>
44
             [% END %]
45
             </div>
46
            [% END %]
47
            [% IF summary.seealso %]
48
              <div class="authres_seealso">
49
              [% FOREACH see IN summary.seealso %]
50
                 [% PROCESS showreference heading=see.heading label="" type=see.type search='' %]
51
                 [% IF ! loop.last %] ; [% END %]
52
              [% END %]
53
              </div>
42
            [% END %]
54
            [% END %]
43
            [% FOREACH seefro IN summary.seefrom %]
55
            [% IF summary.otherscript %]
44
                [% PROCESS showreference heading=seefro.heading label="" type=seefro.type search='' %]
56
              <div class="authres_otherscript">
57
              [% FOREACH other IN summary.otherscript %]
58
                [% PROCESS language lang=other.lang | trim %]:                                                
59
                [% other.term %]
60
                [% IF ! loop.last %] ; [% END %]
61
              [% END %]
62
              </div>
45
            [% END %]
63
            [% END %]
46
        [% ELSE %]
64
        [% ELSE %]
47
            [% IF ( summary.seefrom ) %]
65
            [% IF ( summary.seefrom ) %]
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/opac-authorities.inc (+10 lines)
Lines 54-56 Link Here
54
    [% ELSE %][% heading %]
54
    [% ELSE %][% heading %]
55
    [% END %]
55
    [% END %]
56
[% END %]
56
[% END %]
57
[% BLOCK language %]
58
  [% SWITCH lang %]
59
   [% CASE ['en', 'eng'] %]English
60
   [% CASE ['fr', 'fre'] %]French
61
   [% CASE ['it', 'ita'] %]Italian
62
   [% CASE ['de', 'ger', 'deu'] %]German
63
   [% CASE ['es', 'spa'] %]Spanish
64
   [% CASE %][% lang %]
65
  [% END %]
66
[% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-detail.tt (-5 / +9 lines)
Lines 42-48 $(document).ready(function() { Link Here
42
</div>
42
</div>
43
[% END %]
43
[% END %]
44
44
45
<h1>[% summary.mainentry %][% IF authtypetext %]([% authtypetext %])[% END %]</h1>
45
<h1>[% summary.mainentry %][% IF authtypetext %] ([% authtypetext %])[% END %]</h1>
46
<div class="usedin">Used in <a href="opac-search.pl?type=opac&amp;q=[% authid %]&amp;idx=an,phr">[% count %] records</a></div>
46
<div class="usedin">Used in <a href="opac-search.pl?type=opac&amp;q=[% authid %]&amp;idx=an,phr">[% count %] records</a></div>
47
<div class="authstanza">
47
<div class="authstanza">
48
[% FOREACH authorize IN summary.authorized %]
48
[% FOREACH authorize IN summary.authorized %]
Lines 76-88 $(document).ready(function() { Link Here
76
    </div>
76
    </div>
77
[% END %]
77
[% END %]
78
[% IF marcflavour == 'UNIMARC' && summary.otherscript %]
78
[% IF marcflavour == 'UNIMARC' && summary.otherscript %]
79
    <div class="authstanza">
79
  <div class="authstanza">
80
    <div class="authstanzaheading">Other forms:</div>
81
    <ul>
80
    [% FOREACH otherscrip IN summary.otherscript %]
82
    [% FOREACH otherscrip IN summary.otherscript %]
81
        <div class="heading otherscript auth[% otherscrip.field %]"><span class="label">See also[% PROCESS language lang=otherscript.lang | trim %] term:</span>
83
      <li>
84
        [% PROCESS language lang=otherscrip.lang | trim %]:
82
        <span class="otherscript">[% otherscrip.term %]</span>
85
        <span class="otherscript">[% otherscrip.term %]</span>
83
        </div>
86
      </li>
84
    [% END %]
87
    [% END %]
85
    </div>
88
    </ul>
89
  </div>
86
[% END %]
90
[% END %]
87
<div id="authdescriptions" class="toptabs">
91
<div id="authdescriptions" class="toptabs">
88
<ul>
92
<ul>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt (-1 / +1 lines)
Lines 1-3 Link Here
1
[% PROCESS 'opac-authorities.inc' %]
1
[% PROCESS 'authorities-search-results.inc' %]
2
[% PROCESS 'authorities-search-results.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; [% IF ( total ) %]Authority search result[% ELSE %]No results found[% END %]
3
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; [% IF ( total ) %]Authority search result[% ELSE %]No results found[% END %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
4
- 

Return to bug 8870