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

(-)a/C4/AuthoritiesMarc.pm (-6 / +31 lines)
Lines 948-954 sub BuildSummary { Link Here
948
        $summary{type} = $authref->{authtypetext};
948
        $summary{type} = $authref->{authtypetext};
949
        $summary{summary} = $authref->{summary};
949
        $summary{summary} = $authref->{summary};
950
    }
950
    }
951
    my $marc21subfields = 'abcdfghjklmnopqrstuvxyz';
951
    my $marc21subfields = 'abcdfghjklmnopqrstuvxyz68';
952
    my %marc21controlrefs = ( 'a' => 'earlier',
952
    my %marc21controlrefs = ( 'a' => 'earlier',
953
        'b' => 'later',
953
        'b' => 'later',
954
        'd' => 'acronym',
954
        'd' => 'acronym',
Lines 1027-1037 sub BuildSummary { Link Here
1027
# see :
1027
# see :
1028
            foreach my $field ($record->field('5..')) {
1028
            foreach my $field ($record->field('5..')) {
1029
                if (($field->subfield('5')) && ($field->subfield('a')) && ($field->subfield('5') eq 'g')) {
1029
                if (($field->subfield('5')) && ($field->subfield('a')) && ($field->subfield('5') eq 'g')) {
1030
                    push @seealso, { $field->as_string('abcdefgjxyz'), type => 'broader' };
1030
                    push @seealso, {
1031
                        heading => $field->as_string('abcdefgjxyz'),
1032
                        type => 'broader',
1033
                        search => $field->as_string('abcdefgjxyz'),
1034
                        authid => $field->subfield('9')
1035
                    };
1031
                } elsif (($field->subfield('5')) && ($field->as_string) && ($field->subfield('5') eq 'h')){
1036
                } elsif (($field->subfield('5')) && ($field->as_string) && ($field->subfield('5') eq 'h')){
1032
                    push @seealso, { heading => $field->as_string('abcdefgjxyz'), type => 'narrower' };
1037
                    push @seealso, {
1038
                        heading => $field->as_string('abcdefgjxyz'),
1039
                        type => 'narrower',
1040
                        search => $field->as_string('abcdefgjxyz'),
1041
                        authid => $field->subfield('9')
1042
                    };
1033
                } elsif ($field->subfield('a')) {
1043
                } elsif ($field->subfield('a')) {
1034
                    push @seealso, { heading => $field->as_string('abcdefgxyz'), type => 'seealso' };
1044
                    push @seealso, {
1045
                        heading => $field->as_string('abcdefgxyz'),
1046
                        type => 'seealso',
1047
                        search => $field->as_string('abcdefgjxyz'),
1048
                        authid => $field->subfield('9')
1049
                    };
1035
                }
1050
                }
1036
            }
1051
            }
1037
# // form
1052
# // form
Lines 1090-1098 sub BuildSummary { Link Here
1090
                my $type = 'seealso';
1105
                my $type = 'seealso';
1091
                $type = $marc21controlrefs{substr $field->subfield('w'), '0'} if ($field->subfield('w'));
1106
                $type = $marc21controlrefs{substr $field->subfield('w'), '0'} if ($field->subfield('w'));
1092
                if ($type eq 'subfi') {
1107
                if ($type eq 'subfi') {
1093
                    push @seealso, { heading => $field->as_string($marc21subfields), type => $field->subfield('i') };
1108
                    push @seealso, {
1109
                        heading => $field->as_string($marc21subfields),
1110
                        type => $field->subfield('i'),
1111
                        search => $field->as_string($marc21subfields),
1112
                        authid => $field->subfield('9')
1113
                    };
1094
                } else {
1114
                } else {
1095
                    push @seealso, { heading => $field->as_string($marc21subfields), type => $type };
1115
                    push @seealso, {
1116
                        heading => $field->as_string($marc21subfields),
1117
                        type => $type,
1118
                        search => $field->as_string($marc21subfields),
1119
                        authid => $field->subfield('9')
1120
                    };
1096
                }
1121
                }
1097
            }
1122
            }
1098
            foreach my $field ($record->field('6..')) {
1123
            foreach my $field ($record->field('6..')) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc (-2 / +5 lines)
Lines 14-20 Link Here
14
        [% END %]
14
        [% END %]
15
    [% ELSE %]
15
    [% ELSE %]
16
        [% IF ( label ) %]<span class="label">[% label %]</span>[% END %]
16
        [% IF ( label ) %]<span class="label">[% label %]</span>[% END %]
17
        <span class="heading">[% heading %]</span>
17
        <span class="heading">
18
        [% IF ( linkpath && search ) %]<a href="[% link %][% search %]">[% heading %]</a>
19
        [% ELSE %][% heading %][% 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 50-56 Link Here
50
            [% IF ( summary.seealso ) %]
53
            [% IF ( summary.seealso ) %]
51
                [% FOREACH seeals IN summary.seealso %]
54
                [% FOREACH seeals IN summary.seealso %]
52
                    <div class="seealso authref">
55
                    <div class="seealso authref">
53
                    [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type %]
56
                    [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type linkpath=link search=seeals.search %]
54
                    </div>
57
                    </div>
55
                [% END %]
58
                [% END %]
56
            [% END %]
59
            [% 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 (-3 / +6 lines)
Lines 14-20 Link Here
14
        [% END %]
14
        [% END %]
15
    [% ELSE %]
15
    [% ELSE %]
16
        [% IF ( label ) %]<span class="label">[% label %]</span>[% END %]
16
        [% IF ( label ) %]<span class="label">[% label %]</span>[% END %]
17
        <span class="heading">[% heading %]</span>
17
        <span class="heading">
18
        [% IF ( linkpath && search ) %]<a href="[% link | url %][% search | url %]">[% heading %]</a>
19
        [% ELSE %][% heading %][% 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 43-56 Link Here
43
            [% IF ( summary.seefrom ) %]
46
            [% IF ( summary.seefrom ) %]
44
                [% FOREACH seefro IN summary.seefrom %]
47
                [% FOREACH seefro IN summary.seefrom %]
45
                    <div class="seefrom authref">
48
                    <div class="seefrom authref">
46
                    [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type %]
49
                    [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type search='' %]
47
                    </div>
50
                    </div>
48
                [% END %]
51
                [% END %]
49
            [% END %]
52
            [% END %]
50
            [% IF ( summary.seealso ) %]
53
            [% IF ( summary.seealso ) %]
51
                [% FOREACH seeals IN summary.seealso %]
54
                [% FOREACH seeals IN summary.seealso %]
52
                    <div class="seealso authref">
55
                    <div class="seealso authref">
53
                    [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type %]
56
                    [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type linkpath=link search=seeals.search %]
54
                    </div>
57
                    </div>
55
                [% END %]
58
                [% END %]
56
            [% END %]
59
            [% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt (-2 / +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&operator=contains&marclist=any&and_ora=and&orderby=HeadingAsc&value=" %]</td>
61
                    <td>[% authtypetext %]</td>
61
                    <td>[% authtypetext %]</td>
62
					[% UNLESS ( resul.isEDITORS ) %]
62
					[% UNLESS ( resul.isEDITORS ) %]
63
						<td>
63
						<td>
64
- 

Return to bug 3462