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

(-)a/C4/Breeding.pm (+39 lines)
Lines 222-227 sub Z3950Search { Link Here
222
        $oConnection[$_]->destroy();
222
        $oConnection[$_]->destroy();
223
    }
223
    }
224
224
225
    @servers = ();
226
    foreach my $id (@id) {
227
        push @servers, {id => $id};
228
    }
229
230
    my $pref_addnumber = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
231
    $pref_addnumber =~ s/\s+//g;
232
    if ($pref_addnumber){
233
        $template->param(
234
            additionalFields => '1',
235
        );
236
    }
237
225
    $template->param(
238
    $template->param(
226
        breeding_loop => \@breeding_loop,
239
        breeding_loop => \@breeding_loop,
227
        servers => \@servers,
240
        servers => \@servers,
Lines 340-345 sub _add_rowdata { Link Here
340
    }
353
    }
341
    $row->{date}//= $row->{date2};
354
    $row->{date}//= $row->{date2};
342
    $row->{isbn}=_isbn_replace($row->{isbn});
355
    $row->{isbn}=_isbn_replace($row->{isbn});
356
357
    my $pref_addnumber = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
358
    $pref_addnumber =~ s/\s+//g;
359
    my @addnumber_array = split /;/, $pref_addnumber;
360
    my @addnumberfields;
361
    foreach (@addnumber_array) {
362
        my $length = length($_);
363
        my $adTag = substr($_, 0, 3);
364
        my $row_field = 'field_'.$adTag;
365
        if ($record->field($adTag)) {
366
           my $field = $record->field($adTag);
367
           my $fieldContent='';
368
           if ($length > 3){
369
               my $adSubfield;
370
               for (my $i=0; $i<$length-3; $i++){
371
                  $adSubfield = substr($_, 3+$i, 1);
372
                  $fieldContent = $fieldContent.$field->subfield($adSubfield).' ';
373
               }
374
               push(@addnumberfields, $_);
375
               $row->{$_} = $fieldContent;
376
           }
377
        }
378
    }
379
380
    $row->{'addnumberfields'} = \@addnumberfields;
381
343
    return $row;
382
    return $row;
344
}
383
}
345
384
(-)a/installer/data/mysql/atomicupdate/bug_12747-additional_fields_in_Z3950_search_result.sql (+1 lines)
Line 0 Link Here
1
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('AdditionalFieldsInZ3950ResultSearch', '', 'NULL', 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free');
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 6-11 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
6
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
6
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
7
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
7
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
8
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
8
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
9
('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'),
10
('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'),
9
('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'),
11
('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'),
10
('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option.  Example: eng|fre|ita','Textarea'),
12
('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option.  Example: eng|fre|ita','Textarea'),
11
('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'),
13
('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt (+13 lines)
Lines 168-173 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
168
        <th>Author</th>
168
        <th>Author</th>
169
        <th>ISBN</th>
169
        <th>ISBN</th>
170
        <th>LCCN</th>
170
        <th>LCCN</th>
171
        [% IF additionalFields %]
172
        <th>Additional fields</th>
173
        [% END %]
171
        <th>Preview</th>
174
        <th>Preview</th>
172
		<th>&nbsp;</th>
175
		<th>&nbsp;</th>
173
    </tr></thead>
176
    </tr></thead>
Lines 180-185 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
180
            <td>[% breeding_loo.author %]</td>
183
            <td>[% breeding_loo.author %]</td>
181
            <td>[% breeding_loo.isbn %]</td>
184
            <td>[% breeding_loo.isbn %]</td>
182
            <td>[% breeding_loo.lccn %]</td>
185
            <td>[% breeding_loo.lccn %]</td>
186
            [% IF additionalFields %]
187
            <td>
188
               <dl>
189
                  [% FOREACH addnumberfield IN breeding_loo.addnumberfields %]
190
                  <dt>[% addnumberfield %]:</dt>
191
                  <dd>[% breeding_loo.$addnumberfield %]</dd>
192
                  [% END %]
193
               </dl>
194
            </td>
195
            [% END %]
183
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="Card" rel="gb_page_center[600,500]">Card</a></td>
196
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="Card" rel="gb_page_center[600,500]">Card</a></td>
184
			<td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode %]&amp;breedingid=[% breeding_loo.breedingid %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Order</a></td>
197
			<td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode %]&amp;breedingid=[% breeding_loo.breedingid %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Order</a></td>
185
198
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (+4 lines)
Lines 215-217 Cataloging: Link Here
215
                  yes: "do"
215
                  yes: "do"
216
                  no: "don't"
216
                  no: "don't"
217
            - 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.  Note that this preference has no effect if UseQueryParser is on.
217
            - 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.  Note that this preference has no effect if UseQueryParser is on.
218
        -
219
            - Determines the MARC field/subfields
220
            - pref: AdditionalFieldsInZ3950ResultSearch
221
            - "are displayed in 'Additional fields' column in the result of a search Z3950 (use semicolon as delimiter ex: <code>082ab</code>;<code>090ab</code>)"
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt (-1 / +13 lines)
Lines 185-190 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
185
        <th>Edition</th>
185
        <th>Edition</th>
186
        <th>ISBN</th>
186
        <th>ISBN</th>
187
        <th>LCCN</th>
187
        <th>LCCN</th>
188
        [% IF additionalFields %]
189
        <th>Additional fields</th>
190
        [% END %]
188
        <th>MARC</th>
191
        <th>MARC</th>
189
        <th>Card</th>
192
        <th>Card</th>
190
		<th>&nbsp;</th>
193
		<th>&nbsp;</th>
Lines 200-205 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
200
            <td>[% breeding_loo.edition %]</td>
203
            <td>[% breeding_loo.edition %]</td>
201
            <td>[% breeding_loo.isbn %]</td>
204
            <td>[% breeding_loo.isbn %]</td>
202
            <td>[% breeding_loo.lccn %]</td>
205
            <td>[% breeding_loo.lccn %]</td>
206
            [% IF additionalFields %]
207
            <td>
208
               <dl>
209
                  [% FOREACH addnumberfield IN breeding_loo.addnumberfields %]
210
                  <dt>[% addnumberfield %]:</dt>
211
                  <dd>[% breeding_loo.$addnumberfield %]</dd>
212
                  [% END %]
213
               </dl>
214
            </td>
215
            [% END %]
203
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">MARC</a></td>
216
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">MARC</a></td>
204
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
217
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
205
            <td><a href="#" onclick="Import([% breeding_loo.breedingid %],[% breeding_loo.biblionumber %]); return false">Import</a></td> 
218
            <td><a href="#" onclick="Import([% breeding_loo.breedingid %],[% breeding_loo.biblionumber %]); return false">Import</a></td> 
206
- 

Return to bug 12747