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

(-)a/C4/Heading/UNIMARC.pm (-4 / +9 lines)
Lines 52-59 FIXME - this should be moved to a configuration file. Link Here
52
my %subdivisions = (
52
my %subdivisions = (
53
    'j' => 'formsubdiv',
53
    'j' => 'formsubdiv',
54
    'x' => 'generalsubdiv',
54
    'x' => 'generalsubdiv',
55
    'y' => 'chronologicalsubdiv',
55
    'y' => 'geographicsubdiv',
56
    'z' => 'geographicsubdiv',
56
    'z' => 'chronologicalsubdiv',
57
);
57
);
58
58
59
my $bib_heading_fields;
59
my $bib_heading_fields;
Lines 160-173 sub _get_search_heading { Link Here
160
        my $code    = $subfields[$i]->[0];
160
        my $code    = $subfields[$i]->[0];
161
        my $code_re = quotemeta $code;
161
        my $code_re = quotemeta $code;
162
        my $value   = $subfields[$i]->[1];
162
        my $value   = $subfields[$i]->[1];
163
        $value =~ s/[-,.:=;!%\/]*$//;
163
        $value =~ s/[\s]*[-,.:=;!%\/][\s]*$//;
164
        next unless $subfields =~ qr/$code_re/;
164
        next unless $subfields =~ qr/$code_re/;
165
        if ($first) {
165
        if ($first) {
166
            $first   = 0;
166
            $first   = 0;
167
            $heading = $value;
167
            $heading = $value;
168
        }
168
        }
169
        else {
169
        else {
170
            $heading .= " $value";
170
            if ( exists $subdivisions{$code} ) {
171
                $heading .= " $subdivisions{$code} $value";
172
            }
173
            else {
174
                $heading .= " $value";
175
            }
171
        }
176
        }
172
    }
177
    }
173
178
(-)a/etc/zebradb/marc_defs/unimarc/authorities/authority-koha-indexdefs.xml (-1 / +6 lines)
Lines 7-12 authority-zebra-indexdefs.xsl` Link Here
7
-->
7
-->
8
<kohaidx:index_defs xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs">
8
<kohaidx:index_defs xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs">
9
  <kohaidx:id>marc:controlfield[@tag='001']</kohaidx:id>
9
  <kohaidx:id>marc:controlfield[@tag='001']</kohaidx:id>
10
  <!-- variables -->
11
  <kohaidx:var name="form_subdivision_subfield">j</kohaidx:var>
12
  <kohaidx:var name="general_subdivision_subfield">x</kohaidx:var>
13
  <kohaidx:var name="geographic_subdivision_subfield">y</kohaidx:var>
14
  <kohaidx:var name="chronological_subdivision_subfield">z</kohaidx:var>
15
10
  <!-- Original record ID -->
16
  <!-- Original record ID -->
11
  <kohaidx:index_control_field tag="001">
17
  <kohaidx:index_control_field tag="001">
12
    <kohaidx:target_index>Local-Number:w</kohaidx:target_index>
18
    <kohaidx:target_index>Local-Number:w</kohaidx:target_index>
13
- 

Return to bug 18017