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

(-)a/C4/Breeding.pm (-6 / +13 lines)
Lines 364-378 sub _add_rowdata { Link Here
364
    $row->{date}//= $row->{date2};
364
    $row->{date}//= $row->{date2};
365
    $row->{isbn}=_isbn_replace($row->{isbn});
365
    $row->{isbn}=_isbn_replace($row->{isbn});
366
366
367
    $row = _add_custom_field_rowdata($row, $record);
367
    $row = _add_custom_field_rowdata(
368
368
            $row, 
369
            $record,  
370
            C4::Context->preference('AdditionalFieldsInZ3950ResultSearch'))
371
        if C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
369
    return $row;
372
    return $row;
370
}
373
}
371
374
372
sub _add_custom_field_rowdata
375
sub _add_custom_field_rowdata
373
{
376
{
374
    my ( $row, $record ) = @_;
377
    my ( $row, $record, $pref_newtags ) = @_;
375
    my $pref_newtags = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
376
    my $pref_flavour = C4::Context->preference('MarcFlavour');
378
    my $pref_flavour = C4::Context->preference('MarcFlavour');
377
379
378
    $pref_newtags =~ s/^\s+|\s+$//g;
380
    $pref_newtags =~ s/^\s+|\s+$//g;
Lines 618-625 sub Z3950SearchAuth { Link Here
618
                            my $heading;
620
                            my $heading;
619
                            my $heading_authtype_code;
621
                            my $heading_authtype_code;
620
                            $heading_authtype_code = GuessAuthTypeCode($marcrecord);
622
                            $heading_authtype_code = GuessAuthTypeCode($marcrecord);
621
                            next if ( not defined $heading_authtype_code ) ;
622
623
                            $heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marcrecord });
623
                            $heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marcrecord });
624
624
625
                            my $breedingid = ImportBreedingAuth( $marcrecord, $serverhost[$k], $encoding[$k], $heading );
625
                            my $breedingid = ImportBreedingAuth( $marcrecord, $serverhost[$k], $encoding[$k], $heading );
Lines 629-634 sub Z3950SearchAuth { Link Here
629
                            $row_data{heading}      = $heading;
629
                            $row_data{heading}      = $heading;
630
                            $row_data{authid}       = $authid;
630
                            $row_data{authid}       = $authid;
631
                            $row_data{heading_code}      = $heading_authtype_code;
631
                            $row_data{heading_code}      = $heading_authtype_code;
632
                            my $pref_newtags =
633
                                C4::Context->preference('AdditionalFieldsInZ3950ResultAuthSearch');
634
                            if ($pref_newtags) {
635
                                my $row = {};
636
                                $row = _add_custom_field_rowdata($row, $marcrecord, $pref_newtags);
637
                                $row_data{row} = $row;
638
                            }
632
                            push( @breeding_loop, \%row_data );
639
                            push( @breeding_loop, \%row_data );
633
                        }
640
                        }
634
                        else {
641
                        else {
(-)a/installer/data/mysql/atomicupdate/bug_28166-add_AdditionalFieldsInZ3950ResultAuthSearch_syspref.sql (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('AdditionalFieldsInZ3950ResultAuthSearch', '', 'NULL', 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of an auth search Z3950', 'Free')" );
4
5
    # Always end with this (adjust the bug info)
6
    NewVersion( $DBversion, XXXXX, "Description");
7
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-41 / +37 lines)
Lines 9-47 Cataloging: Link Here
9
        -
9
        -
10
            - pref: advancedMARCeditor
10
            - pref: advancedMARCeditor
11
              choices:
11
              choices:
12
                  1: "Don't display"
12
                  yes: "Don't display"
13
                  0: Display
13
                  no: Display
14
            - descriptions of fields and subfields in the MARC editor.
14
            - descriptions of fields and subfields in the MARC editor.
15
        -
15
        -
16
            - pref: EasyAnalyticalRecords
16
            - pref: EasyAnalyticalRecords
17
              choices:
17
              choices:
18
                  1: Display
18
                  yes: Display
19
                  0: "Don't display"
19
                  no: "Don't display"
20
            - "easy ways to create analytical record relationships."
20
            - "easy ways to create analytical record relationships."
21
        -
21
        -
22
            - pref: EnableAdvancedCatalogingEditor
22
            - pref: EnableAdvancedCatalogingEditor
23
              default: 0
23
              default: 0
24
              choices:
24
              choices:
25
                  1: Enable
25
                  yes: Enable
26
                  0: "Don't enable"
26
                  no: "Don't enable"
27
            - the advanced cataloging editor.
27
            - the advanced cataloging editor.
28
            - "<br/> <strong>NOTE:</strong>"
28
            - "<br/> <strong>NOTE:</strong>"
29
            - Currently does not include support for UNIMARC or NORMARC fixed fields.
29
            - Currently does not include support for UNIMARC or NORMARC fixed fields.
30
        -
31
            - "When saving in a MARC/MARCXML file in the advanced cataloging editor or exporting from the detail page in the staff interface, use the"
32
            - pref: DefaultSaveRecordFileID
33
              default: biblionumber
34
              choices:
35
                  controlnumber: "control number"
36
                  biblionumber: "bibliographic record number"
37
            - "in the file name."
38
    Spine labels:
30
    Spine labels:
39
        -
31
        -
40
            - When using the quick spine label printer,
32
            - When using the quick spine label printer,
41
            - pref: SpineLabelAutoPrint
33
            - pref: SpineLabelAutoPrint
42
              choices:
34
              choices:
43
                  1: do
35
                  yes: do
44
                  0: "don't"
36
                  no: "don't"
45
            - automatically pop up a print dialog.
37
            - automatically pop up a print dialog.
46
        -
38
        -
47
            - "Include the following fields on a quick-printed spine label:"
39
            - "Include the following fields on a quick-printed spine label:"
Lines 51-58 Cataloging: Link Here
51
        -
43
        -
52
            - pref: SpineLabelShowPrintOnBibDetails
44
            - pref: SpineLabelShowPrintOnBibDetails
53
              choices:
45
              choices:
54
                  1: Display
46
                  yes: Display
55
                  0:  "Don't display"
47
                  no:  "Don't display"
56
            - buttons on the bibliographic details page to print item spine labels.
48
            - buttons on the bibliographic details page to print item spine labels.
57
        -
49
        -
58
    Record structure:
50
    Record structure:
Lines 63-69 Cataloging: Link Here
63
        -
55
        -
64
            - "Fill in the default country code for field 008 Range 15-17 of MARC21 - Place of publication, production, or execution. (See <a href='http://www.loc.gov/marc/countries/countries_code.html'>MARC Code List for Countries</a>):"
56
            - "Fill in the default country code for field 008 Range 15-17 of MARC21 - Place of publication, production, or execution. (See <a href='http://www.loc.gov/marc/countries/countries_code.html'>MARC Code List for Countries</a>):"
65
            - pref: DefaultCountryField008
57
            - pref: DefaultCountryField008
66
            - " Empty defaults to ||| - No attempt to code."
58
            - " Empty defaults to xxu for United States."
67
        -
59
        -
68
            - Interpret and store MARC records in the
60
            - Interpret and store MARC records in the
69
            - pref: marcflavour
61
            - pref: marcflavour
Lines 76-83 Cataloging: Link Here
76
            - Use the item type of the
68
            - Use the item type of the
77
            - pref: item-level_itypes
69
            - pref: item-level_itypes
78
              choices:
70
              choices:
79
                  1: specific item
71
                  yes: specific item
80
                  0: bibliographic record
72
                  no: bibliographic record
81
            - as the authoritative item type (for determining circulation and fines rules, for displaying an item type icon on either opac detail or results page, etc).
73
            - as the authoritative item type (for determining circulation and fines rules, for displaying an item type icon on either opac detail or results page, etc).
82
        -
74
        -
83
            - Map the MARC subfields
75
            - Map the MARC subfields
Lines 102-109 Cataloging: Link Here
102
        -
94
        -
103
            - pref: z3950NormalizeAuthor
95
            - pref: z3950NormalizeAuthor
104
              choices:
96
              choices:
105
                  1: Copy
97
                  yes: Copy
106
                  0: "Don't copy"
98
                  no: "Don't copy"
107
            - authors from the UNIMARC
99
            - authors from the UNIMARC
108
            - pref: z3950AuthorAuthFields
100
            - pref: z3950AuthorAuthFields
109
              class: multi
101
              class: multi
Lines 121-128 Cataloging: Link Here
121
            - When a new item is added,
113
            - When a new item is added,
122
            - pref: PrefillItem
114
            - pref: PrefillItem
123
              choices:
115
              choices:
124
                  1: the new item is prefilled with last created item values.
116
                  yes: the new item is prefilled with last created item values.
125
                  0: the new item is not prefilled with last created item values.
117
                  no: the new item is not prefilled with last created item values.
126
        -
118
        -
127
            - "Define a list of subfields to use when prefilling items (separated by space):"
119
            - "Define a list of subfields to use when prefilling items (separated by space):"
128
            - pref: SubfieldsToUseWhenPrefill
120
            - pref: SubfieldsToUseWhenPrefill
Lines 171-178 Cataloging: Link Here
171
        -
163
        -
172
            - pref: UseControlNumber
164
            - pref: UseControlNumber
173
              choices:
165
              choices:
174
                  1: Use
166
                  yes: Use
175
                  0: "Don't use"
167
                  no: "Don't use"
176
            - record control number ($w subfields) and control number (001) for linking of bibliographic records.
168
            - record control number ($w subfields) and control number (001) for linking of bibliographic records.
177
        -
169
        -
178
            - Use
170
            - Use
Lines 185-192 Cataloging: Link Here
185
        -
177
        -
186
            - pref: hide_marc
178
            - pref: hide_marc
187
              choices:
179
              choices:
188
                  1: "Don't display"
180
                  yes: "Don't display"
189
                  0: Display
181
                  no: Display
190
            - MARC tag numbers, subfield codes and indicators in MARC views.
182
            - MARC tag numbers, subfield codes and indicators in MARC views.
191
        -
183
        -
192
            - pref: LabelMARCView
184
            - pref: LabelMARCView
Lines 211-218 Cataloging: Link Here
211
        -
203
        -
212
            - pref: OpacSuppression
204
            - pref: OpacSuppression
213
              choices:
205
              choices:
214
                  1: Hide
206
                  yes: Hide
215
                  0: "Don't hide"
207
                  no: "Don't hide"
216
            - bibliographic records marked as suppressed from OPAC search results.
208
            - bibliographic records marked as suppressed from OPAC search results.
217
            - <br />Restrict the suppression to IP addresses outside of the IP range
209
            - <br />Restrict the suppression to IP addresses outside of the IP range
218
            - pref: OpacSuppressionByIPRange
210
            - pref: OpacSuppressionByIPRange
Lines 221-228 Cataloging: Link Here
221
            - <br />Redirect the opac detail page for suppressed records to
213
            - <br />Redirect the opac detail page for suppressed records to
222
            - pref: OpacSuppressionRedirect
214
            - pref: OpacSuppressionRedirect
223
              choices:
215
              choices:
224
                  1: "an explanatory page ('This record is blocked')."
216
                  yes: "an explanatory page ('This record is blocked')."
225
                  0: "the 404 error page ('Not found')."
217
                  no: "the 404 error page ('Not found')."
226
            - "<br />Display the following message on the redirect page for suppressed bibliographic records:"
218
            - "<br />Display the following message on the redirect page for suppressed bibliographic records:"
227
            - pref: OpacSuppressionMessage
219
            - pref: OpacSuppressionMessage
228
              type: textarea
220
              type: textarea
Lines 230-237 Cataloging: Link Here
230
        -
222
        -
231
            - pref: SeparateHoldings
223
            - pref: SeparateHoldings
232
              choices:
224
              choices:
233
                  1: Separate
225
                  yes: Separate
234
                  0: "Don't separate"
226
                  no: "Don't separate"
235
            - "items display into two tabs, where the first tab contains items whose"
227
            - "items display into two tabs, where the first tab contains items whose"
236
            - pref: SeparateHoldingsBranch
228
            - pref: SeparateHoldingsBranch
237
              choices:
229
              choices:
Lines 248-255 Cataloging: Link Here
248
        -
240
        -
249
            - pref: AcquisitionDetails
241
            - pref: AcquisitionDetails
250
              choices:
242
              choices:
251
                  1: Display
243
                  yes: Display
252
                  0: "Don't display"
244
                  no: "Don't display"
253
            - acquisition details on the bibliographic record detail page.
245
            - acquisition details on the bibliographic record detail page.
254
        -
246
        -
255
            - "Show the following fields for deleted records after a merge:"
247
            - "Show the following fields for deleted records after a merge:"
Lines 265-283 Cataloging: Link Here
265
            - When matching on ISBN with the record import tool,
257
            - When matching on ISBN with the record import tool,
266
            - pref: AggressiveMatchOnISBN
258
            - pref: AggressiveMatchOnISBN
267
              choices:
259
              choices:
268
                  1: "do"
260
                  yes: "do"
269
                  0: "don't"
261
                  no: "don't"
270
            - attempt to match aggressively by trying all variations of the ISBNs in the imported record as a phrase in the ISBN fields of already cataloged records.
262
            - attempt to match aggressively by trying all variations of the ISBNs in the imported record as a phrase in the ISBN fields of already cataloged records.
271
        -
263
        -
272
            - Display the MARC field/subfields
264
            - Display the MARC field/subfields
273
            - pref: AdditionalFieldsInZ3950ResultSearch
265
            - pref: AdditionalFieldsInZ3950ResultSearch
274
            - " in the 'Additional fields' column of Z39.50 search results (use comma as delimiter e.g.: \"<code>001, 082$ab, 090$ab</code>\")"
266
            - " in the 'Additional fields' column of Z39.50 search results (use comma as delimiter e.g.: \"<code>001, 082$ab, 090$ab</code>\")"
267
        -
268
            - Display the MARC field/subfields in Auth Search
269
            - pref: AdditionalFieldsInZ3950ResultAuthSearch
270
            - " in the 'Additional fields' column of Z39.50 auth search results (use comma as delimiter e.g.: \"<code>100, 400</code>\")"
275
        -
271
        -
276
            - When matching on ISSN with the record import tool,
272
            - When matching on ISSN with the record import tool,
277
            - pref: AggressiveMatchOnISSN
273
            - pref: AggressiveMatchOnISSN
278
              choices:
274
              choices:
279
                  1: "do"
275
                  yes: "do"
280
                  0: "don't"
276
                  no: "don't"
281
            - attempt to match aggressively by trying all variations of the ISSNs in the imported record as a phrase in the ISSN fields of already cataloged records.
277
            - attempt to match aggressively by trying all variations of the ISSNs in the imported record as a phrase in the ISSN fields of already cataloged records.
282
278
283
    Exporting:
279
    Exporting:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt (-2 / +16 lines)
Lines 80-86 Link Here
80
        <th>Server</th>
80
        <th>Server</th>
81
        <th>Heading</th>
81
        <th>Heading</th>
82
        <th>Authority Type</th>
82
        <th>Authority Type</th>
83
        <th class="noExport">Actions</th>
83
        [% IF Koha.Preference('AdditionalFieldsInZ3950ResultAuthSearch') != '' %]
84
            <th>Additional fields</th>
85
        [% END %]
86
        <th>Actions</th>
84
    </tr></thead>
87
    </tr></thead>
85
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
88
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
86
        [% IF ( breeding_loo.breedingid ) %]
89
        [% IF ( breeding_loo.breedingid ) %]
Lines 88-93 Link Here
88
            <td>[% breeding_loo.server | html %]</td>
91
            <td>[% breeding_loo.server | html %]</td>
89
            <td>[% breeding_loo.heading | html %]</td>
92
            <td>[% breeding_loo.heading | html %]</td>
90
            <td>[% breeding_loo.heading_code | html %]</td>
93
            <td>[% breeding_loo.heading_code | html %]</td>
94
            [% IF Koha.Preference('AdditionalFieldsInZ3950ResultAuthSearch') != '' %]
95
                <td>
96
                   <dl>
97
                      [% FOREACH addnumberfield IN breeding_loo.row.addnumberfields %]
98
                        [% FOREACH string IN breeding_loo.row.$addnumberfield %]
99
                            <dt>[% addnumberfield | html %]:</dt>
100
                            <dd>[% string | html %]</dd>
101
                        [% END %]
102
                      [% END %]
103
                   </dl>
104
                </td>
105
            [% END %]
91
            <td class="actions">
106
            <td class="actions">
92
                <div class="btn-group dropup">
107
                <div class="btn-group dropup">
93
                    <a class="btn btn-default btn-xs z3950actions" href="#">MARC</a><button class="btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
108
                    <a class="btn btn-default btn-xs z3950actions" href="#">MARC</a><button class="btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
94
- 

Return to bug 28166