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

(-)a/C4/AuthoritiesMarc.pm (-10 / +35 lines)
Lines 952-958 sub BuildSummary { Link Here
952
        $summary{type} = $authref->{authtypetext};
952
        $summary{type} = $authref->{authtypetext};
953
        $summary{summary} = $authref->{summary};
953
        $summary{summary} = $authref->{summary};
954
    }
954
    }
955
    my $marc21subfields = 'abcdfghjklmnopqrstuvxyz';
955
    my $marc21subfields = 'abcdfghjklmnopqrstuvxyz68';
956
    my %marc21controlrefs = ( 'a' => 'earlier',
956
    my %marc21controlrefs = ( 'a' => 'earlier',
957
        'b' => 'later',
957
        'b' => 'later',
958
        'd' => 'acronym',
958
        'd' => 'acronym',
Lines 1031-1041 sub BuildSummary { Link Here
1031
# see :
1031
# see :
1032
            foreach my $field ($record->field('5..')) {
1032
            foreach my $field ($record->field('5..')) {
1033
                if (($field->subfield('5')) && ($field->subfield('a')) && ($field->subfield('5') eq 'g')) {
1033
                if (($field->subfield('5')) && ($field->subfield('a')) && ($field->subfield('5') eq 'g')) {
1034
                    push @seealso, { $field->as_string('abcdefgjxyz'), type => 'broader' };
1034
                    push @seealso, {
1035
                        heading => $field->as_string('abcdefgjxyz'),
1036
                        type => 'broader',
1037
                        search => $field->as_string('abcdefgjxyz'),
1038
                        authid => $field->subfield('9')
1039
                    };
1035
                } elsif (($field->subfield('5')) && ($field->as_string) && ($field->subfield('5') eq 'h')){
1040
                } elsif (($field->subfield('5')) && ($field->as_string) && ($field->subfield('5') eq 'h')){
1036
                    push @seealso, { heading => $field->as_string('abcdefgjxyz'), type => 'narrower' };
1041
                    push @seealso, {
1042
                        heading => $field->as_string('abcdefgjxyz'),
1043
                        type => 'narrower',
1044
                        search => $field->as_string('abcdefgjxyz'),
1045
                        authid => $field->subfield('9')
1046
                    };
1037
                } elsif ($field->subfield('a')) {
1047
                } elsif ($field->subfield('a')) {
1038
                    push @seealso, { heading => $field->as_string('abcdefgxyz'), type => 'seealso' };
1048
                    push @seealso, {
1049
                        heading => $field->as_string('abcdefgxyz'),
1050
                        type => 'seealso',
1051
                        search => $field->as_string('abcdefgjxyz'),
1052
                        authid => $field->subfield('9')
1053
                    };
1039
                }
1054
                }
1040
            }
1055
            }
1041
# // form
1056
# // form
Lines 1083-1102 sub BuildSummary { Link Here
1083
            } #See From
1098
            } #See From
1084
            foreach my $field ($record->field('4..')) {
1099
            foreach my $field ($record->field('4..')) {
1085
                my $type = 'seefrom';
1100
                my $type = 'seefrom';
1086
                $type = $marc21controlrefs{substr $field->subfield('w'), '0'} if ($field->subfield('w'));
1101
                $type = ($marc21controlrefs{substr $field->subfield('w'), '0'} || '') if ($field->subfield('w'));
1087
                if ($type eq 'subfi') {
1102
                if ($type eq 'subfi') {
1088
                    push @seefrom, { heading => $field->as_string($marc21subfields), type => $field->subfield('i') };
1103
                    push @seefrom, { heading => $field->as_string($marc21subfields), type => $field->subfield('i') || '' };
1089
                } else {
1104
                } else {
1090
                    push @seefrom, { heading => $field->as_string($marc21subfields), type => $type };
1105
                    push @seefrom, { heading => $field->as_string($marc21subfields), type => $type || '' };
1091
                }
1106
                }
1092
            } #See Also
1107
            } #See Also
1093
            foreach my $field ($record->field('5..')) {
1108
            foreach my $field ($record->field('5..')) {
1094
                my $type = 'seealso';
1109
                my $type = 'seealso';
1095
                $type = $marc21controlrefs{substr $field->subfield('w'), '0'} if ($field->subfield('w'));
1110
                $type = ($marc21controlrefs{substr $field->subfield('w'), '0'} || '') if ($field->subfield('w'));
1096
                if ($type eq 'subfi') {
1111
                if ($type eq 'subfi') {
1097
                    push @seealso, { heading => $field->as_string($marc21subfields), type => $field->subfield('i') };
1112
                    push @seealso, {
1113
                        heading => $field->as_string($marc21subfields),
1114
                        type => $field->subfield('i') || '',
1115
                        search => $field->as_string($marc21subfields) || '',
1116
                        authid => $field->subfield('9') || ''
1117
                    };
1098
                } else {
1118
                } else {
1099
                    push @seealso, { heading => $field->as_string($marc21subfields), type => $type };
1119
                    push @seealso, {
1120
                        heading => $field->as_string($marc21subfields),
1121
                        type => $type || '',
1122
                        search => $field->as_string($marc21subfields) || '',
1123
                        authid => $field->subfield('9') || ''
1124
                    };
1100
                }
1125
                }
1101
            }
1126
            }
1102
            foreach my $field ($record->field('6..')) {
1127
            foreach my $field ($record->field('6..')) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc (-14 / +18 lines)
Lines 2-20 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 %]</span> --
5
            <span class="BT">[% heading | html %]</span> --
6
        [% CASE 'narrower' %]
6
        [% CASE 'narrower' %]
7
            <span class="NT">[% heading %]</span> --
7
            <span class="NT">[% heading | html %]</span> --
8
        [% CASE 'narrower' %]
8
        [% CASE 'narrower' %]
9
            <span class="NT">[% heading %]</span> --
9
            <span class="NT">[% heading | html %]</span> --
10
        [% CASE 'seefrom' %]
10
        [% CASE 'seefrom' %]
11
            <span class="UF">[% heading %]</span> --
11
            <span class="UF">[% heading | html %]</span> --
12
        [% CASE 'seealso' %]
12
        [% CASE 'seealso' %]
13
            <span class="RT">[% heading %]</span> --
13
            <span class="RT">[% heading | html %]</span> --
14
        [% END %]
14
        [% END %]
15
    [% ELSE %]
15
    [% ELSE %]
16
        [% IF ( label ) %]<span class="label">[% label %]</span>[% END %]
16
        [% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
17
        <span class="heading">[% heading %]</span>
17
        <span class="heading">
18
        [% IF ( linkpath && search ) %]<a href="[% link | url %][% search | url %]">[% heading | html %]</a>
19
        [% ELSE %][% heading | html %][% END %]
20
        </span>
18
        [% UNLESS ( type=='seefrom' || type=='seealso' ) %]<span class="type">[% SWITCH type %]
21
        [% UNLESS ( type=='seefrom' || type=='seealso' ) %]<span class="type">[% SWITCH type %]
19
        [% CASE 'earlier' %](Earlier heading)
22
        [% CASE 'earlier' %](Earlier heading)
20
        [% CASE 'later' %](Later heading)
23
        [% CASE 'later' %](Later heading)
Lines 22-56 Link Here
22
        [% CASE 'musical' %](Musical composition)
25
        [% CASE 'musical' %](Musical composition)
23
        [% CASE 'broader' %](Broader heading)
26
        [% CASE 'broader' %](Broader heading)
24
        [% CASE 'narrower' %](Narrower heading)
27
        [% CASE 'narrower' %](Narrower heading)
25
        [% CASE %]([% type %])
28
        [% CASE 'parent' %](Immediate parent body)
29
        [% CASE %]([% type | html %])
26
        [% END %]</span>[% END %]
30
        [% END %]</span>[% END %]
27
    [% END %]
31
    [% END %]
28
[% END %]
32
[% END %]
29
[% BLOCK authresult %]
33
[% BLOCK authresult %]
30
    [% IF ( summary.summary ) %][% summary.summary %]:[% END %]
34
    [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
31
    [% UNLESS ( summary.summaryonly ) %]
35
    [% UNLESS ( summary.summaryonly ) %]
32
        [% FOREACH authorize IN summary.authorized %]
36
        [% FOREACH authorize IN summary.authorized %]
33
            <span class="authorizedheading">[% authorize %]</span>
37
            <span class="authorizedheading">[% authorize | html %]</span>
34
        [% END %]
38
        [% END %]
35
        [% IF ( marcflavour == 'UNIMARC' ) %]
39
        [% IF ( marcflavour == 'UNIMARC' ) %]
36
            [% FOREACH note IN summary.notes %]
40
            [% FOREACH note IN summary.notes %]
37
                <span class="note">[% note %]</span>
41
                <span class="note">[% note | html %]</span>
38
            [% END %]
42
            [% END %]
39
            [% FOREACH seefro IN summary.seefrom %]
43
            [% FOREACH seefro IN summary.seefrom %]
40
                [% PROCESS showreference heading=seefro.heading label="" type=seefro.type %]
44
                [% PROCESS showreference heading=seefro.heading label="" type=seefro.type search='' %]
41
            [% END %]
45
            [% END %]
42
        [% ELSE %]
46
        [% ELSE %]
43
            [% IF ( summary.seefrom ) %]
47
            [% IF ( summary.seefrom ) %]
44
                [% FOREACH seefro IN summary.seefrom %]
48
                [% FOREACH seefro IN summary.seefrom %]
45
                    <div class="seefrom authref">
49
                    <div class="seefrom authref">
46
                    [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type %]
50
                    [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type search='' %]
47
                    </div>
51
                    </div>
48
                [% END %]
52
                [% END %]
49
            [% END %]
53
            [% END %]
50
            [% IF ( summary.seealso ) %]
54
            [% IF ( summary.seealso ) %]
51
                [% FOREACH seeals IN summary.seealso %]
55
                [% FOREACH seeals IN summary.seealso %]
52
                    <div class="seealso authref">
56
                    <div class="seealso authref">
53
                    [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type %]
57
                    [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type linkpath=link search=seeals.search %]
54
                    </div>
58
                    </div>
55
                [% END %]
59
                [% END %]
56
            [% END %]
60
            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt (-1 / +1 lines)
Lines 64-70 function searchauthority() { Link Here
64
    [% ELSE %]
64
    [% ELSE %]
65
    <tr>
65
    <tr>
66
    [% END %]
66
    [% END %]
67
      <td>[% PROCESS authresult summary=resul.summary %]</td>
67
      <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>
68
      <td><a href="detail.pl?authid=[% resul.authid %]">Details</a></td>
68
      <td><a href="detail.pl?authid=[% resul.authid %]">Details</a></td>
69
  [% UNLESS ( resul.isEDITORS ) %]
69
  [% UNLESS ( resul.isEDITORS ) %]
70
      <td>
70
      <td>
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc (-14 / +18 lines)
Lines 2-20 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 %]</span> --
5
            <span class="BT">[% heading | html %]</span> --
6
        [% CASE 'narrower' %]
6
        [% CASE 'narrower' %]
7
            <span class="NT">[% heading %]</span> --
7
            <span class="NT">[% heading | html %]</span> --
8
        [% CASE 'narrower' %]
8
        [% CASE 'narrower' %]
9
            <span class="NT">[% heading %]</span> --
9
            <span class="NT">[% heading | html %]</span> --
10
        [% CASE 'seefrom' %]
10
        [% CASE 'seefrom' %]
11
            <span class="UF">[% heading %]</span> --
11
            <span class="UF">[% heading | html %]</span> --
12
        [% CASE 'seealso' %]
12
        [% CASE 'seealso' %]
13
            <span class="RT">[% heading %]</span> --
13
            <span class="RT">[% heading | html %]</span> --
14
        [% END %]
14
        [% END %]
15
    [% ELSE %]
15
    [% ELSE %]
16
        [% IF ( label ) %]<span class="label">[% label %]</span>[% END %]
16
        [% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
17
        <span class="heading">[% heading %]</span>
17
        <span class="heading">
18
        [% IF ( linkpath && search ) %]<a href="[% link | url %][% search | url %]">[% heading | html %]</a>
19
        [% ELSE %][% heading | html %][% END %]
20
        </span>
18
        [% UNLESS ( type=='seefrom' || type=='seealso' ) %]<span class="type">[% SWITCH type %]
21
        [% UNLESS ( type=='seefrom' || type=='seealso' ) %]<span class="type">[% SWITCH type %]
19
        [% CASE 'earlier' %](Earlier heading)
22
        [% CASE 'earlier' %](Earlier heading)
20
        [% CASE 'later' %](Later heading)
23
        [% CASE 'later' %](Later heading)
Lines 22-56 Link Here
22
        [% CASE 'musical' %](Musical composition)
25
        [% CASE 'musical' %](Musical composition)
23
        [% CASE 'broader' %](Broader heading)
26
        [% CASE 'broader' %](Broader heading)
24
        [% CASE 'narrower' %](Narrower heading)
27
        [% CASE 'narrower' %](Narrower heading)
25
        [% CASE %]([% type %])
28
        [% CASE 'parent' %](Immediate parent body)
29
        [% CASE %]([% type | html %])
26
        [% END %]</span>[% END %]
30
        [% END %]</span>[% END %]
27
    [% END %]
31
    [% END %]
28
[% END %]
32
[% END %]
29
[% BLOCK authresult %]
33
[% BLOCK authresult %]
30
    [% IF ( summary.summary ) %][% summary.summary %]:[% END %]
34
    [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
31
    [% UNLESS ( summary.summaryonly ) %]
35
    [% UNLESS ( summary.summaryonly ) %]
32
        [% FOREACH authorize IN summary.authorized %]
36
        [% FOREACH authorize IN summary.authorized %]
33
            <span class="authorizedheading">[% authorize %]</span>
37
            <span class="authorizedheading">[% authorize | html %]</span>
34
        [% END %]
38
        [% END %]
35
        [% IF ( marcflavour == 'UNIMARC' ) %]
39
        [% IF ( marcflavour == 'UNIMARC' ) %]
36
            [% FOREACH note IN summary.notes %]
40
            [% FOREACH note IN summary.notes %]
37
                <span class="note">[% note %]</span>
41
                <span class="note">[% note | html %]</span>
38
            [% END %]
42
            [% END %]
39
            [% FOREACH seefro IN summary.seefrom %]
43
            [% FOREACH seefro IN summary.seefrom %]
40
                [% PROCESS showreference heading=seefro.heading label="" type=seefro.type %]
44
                [% PROCESS showreference heading=seefro.heading label="" type=seefro.type search='' %]
41
            [% END %]
45
            [% END %]
42
        [% ELSE %]
46
        [% ELSE %]
43
            [% IF ( summary.seefrom ) %]
47
            [% IF ( summary.seefrom ) %]
44
                [% FOREACH seefro IN summary.seefrom %]
48
                [% FOREACH seefro IN summary.seefrom %]
45
                    <div class="seefrom authref">
49
                    <div class="seefrom authref">
46
                    [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type %]
50
                    [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type search='' %]
47
                    </div>
51
                    </div>
48
                [% END %]
52
                [% END %]
49
            [% END %]
53
            [% END %]
50
            [% IF ( summary.seealso ) %]
54
            [% IF ( summary.seealso ) %]
51
                [% FOREACH seeals IN summary.seealso %]
55
                [% FOREACH seeals IN summary.seealso %]
52
                    <div class="seealso authref">
56
                    <div class="seealso authref">
53
                    [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type %]
57
                    [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type linkpath=link search=seeals.search %]
54
                    </div>
58
                    </div>
55
                [% END %]
59
                [% END %]
56
            [% END %]
60
            [% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt (-1 / +1 lines)
Lines 57-63 Link Here
57
            [% ELSE %]
57
            [% ELSE %]
58
                <tr>
58
                <tr>
59
            [% END %]
59
            [% END %]
60
                    <td>[% PROCESS authresult summary=resul.summary %]</td>
60
                    <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>
61
                    <td>[% resul.authtype %]</td>
61
                    <td>[% resul.authtype %]</td>
62
					[% UNLESS ( resul.isEDITORS ) %]
62
					[% UNLESS ( resul.isEDITORS ) %]
63
						<td>
63
						<td>
(-)a/opac/opac-authorities-home.pl (-3 / +2 lines)
Lines 58-67 foreach my $thisauthtype ( Link Here
58
}
58
}
59
59
60
if ( $op eq "do_search" ) {
60
if ( $op eq "do_search" ) {
61
    my @marclist = ($query->param('marclista'),$query->param('marclistb'),$query->param('marclistc'));
61
    my @marclist = ($query->param('marclista') || '',$query->param('marclistb') || '',$query->param('marclistc') || 'mainentry');
62
    my @and_or = ($query->param('and_ora'),$query->param('and_orb'),$query->param('and_orc'));
62
    my @and_or = ($query->param('and_ora'),$query->param('and_orb'),$query->param('and_orc'));
63
    my @excluding = ($query->param('excludinga'),$query->param('excludingb'),$query->param('excludingc'),);
63
    my @excluding = ($query->param('excludinga'),$query->param('excludingb'),$query->param('excludingc'),);
64
    my @operator = ($query->param('operatora'),$query->param('operatorb'),$query->param('operatorc'));
64
    my @operator = ($query->param('operatora') || '',$query->param('operatorb') || '',$query->param('operatorc'));
65
    my $orderby = $query->param('orderby');
65
    my $orderby = $query->param('orderby');
66
    my @value = ($query->param('valuea') || "",$query->param('valueb') || "",$query->param('valuec') || "",);
66
    my @value = ($query->param('valuea') || "",$query->param('valueb') || "",$query->param('valuec') || "",);
67
67
68
- 

Return to bug 3462