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

(-)a/C4/Breeding.pm (+39 lines)
Lines 220-225 sub Z3950Search { Link Here
220
        $oConnection[$_]->destroy();
220
        $oConnection[$_]->destroy();
221
    }
221
    }
222
222
223
    @servers = ();
224
    foreach my $id (@id) {
225
        push @servers, {id => $id};
226
    }
227
228
    my $pref_addnumber = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
229
    $pref_addnumber =~ s/\s+//g;
230
    if ($pref_addnumber){
231
        $template->param(
232
            additionalFields => '1',
233
        );
234
    }
235
223
    $template->param(
236
    $template->param(
224
        breeding_loop => \@breeding_loop,
237
        breeding_loop => \@breeding_loop,
225
        servers => \@servers,
238
        servers => \@servers,
Lines 338-343 sub _add_rowdata { Link Here
338
    }
351
    }
339
    $row->{date}//= $row->{date2};
352
    $row->{date}//= $row->{date2};
340
    $row->{isbn}=_isbn_replace($row->{isbn});
353
    $row->{isbn}=_isbn_replace($row->{isbn});
354
355
    my $pref_addnumber = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
356
    $pref_addnumber =~ s/\s+//g;
357
    my @addnumber_array = split /;/, $pref_addnumber;
358
    my @addnumberfields;
359
    foreach (@addnumber_array) {
360
        my $length = length($_);
361
        my $adTag = substr($_, 0, 3);
362
        my $row_field = 'field_'.$adTag;
363
        if ($record->field($adTag)) {
364
           my $field = $record->field($adTag);
365
           my $fieldContent='';
366
           if ($length > 3){
367
               my $adSubfield;
368
               for (my $i=0; $i<$length-3; $i++){
369
                  $adSubfield = substr($_, 3+$i, 1);
370
                  $fieldContent = $fieldContent.$field->subfield($adSubfield).' ';
371
               }
372
               push(@addnumberfields, $_);
373
               $row->{$_} = $fieldContent;
374
           }
375
        }
376
    }
377
378
    $row->{'addnumberfields'} = \@addnumberfields;
379
341
    return $row;
380
    return $row;
342
}
381
}
343
382
(-)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 (-1 / +3 lines)
Lines 6-12 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
('AddressFormat','us','us|de|fr','Choose format to display postal addresses', 'Choice'),
9
('AddressFormat','us','','Choose format to display postal addresses', 'Choice'),
10
('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'),
11
('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'),
10
('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'),
12
('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'),
11
('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option.  Example: eng|fre|ita','Textarea'),
13
('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option.  Example: eng|fre|ita','Textarea'),
12
('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'),
14
('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 131-136 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
131
        <th>Author</th>
131
        <th>Author</th>
132
        <th>ISBN</th>
132
        <th>ISBN</th>
133
        <th>LCCN</th>
133
        <th>LCCN</th>
134
        [% IF additionalFields %]
135
        <th>Additional fields</th>
136
        [% END %]
134
        <th>Preview</th>
137
        <th>Preview</th>
135
		<th>&nbsp;</th>
138
		<th>&nbsp;</th>
136
    </tr></thead>
139
    </tr></thead>
Lines 143-148 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
143
            <td>[% breeding_loo.author %]</td>
146
            <td>[% breeding_loo.author %]</td>
144
            <td>[% breeding_loo.isbn %]</td>
147
            <td>[% breeding_loo.isbn %]</td>
145
            <td>[% breeding_loo.lccn %]</td>
148
            <td>[% breeding_loo.lccn %]</td>
149
            [% IF additionalFields %]
150
            <td>
151
               <dl>
152
                  [% FOREACH addnumberfield IN breeding_loo.addnumberfields %]
153
                  <dt>[% addnumberfield %]:</dt>
154
                  <dd>[% breeding_loo.$addnumberfield %]</dd>
155
                  [% END %]
156
               </dl>
157
            </td>
158
            [% END %]
146
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="Card" class="previewData">Card</a></td>
159
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="Card" class="previewData">Card</a></td>
147
            <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&amp;breedingid=[% breeding_loo.breedingid %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Order</a></td>
160
            <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&amp;breedingid=[% breeding_loo.breedingid %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Order</a></td>
148
161
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (+4 lines)
Lines 225-230 Cataloging: Link Here
225
                  no: "don't"
225
                  no: "don't"
226
            - 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.
226
            - 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.
227
        -
227
        -
228
            - Determines the MARC field/subfields
229
            - pref: AdditionalFieldsInZ3950ResultSearch
230
            - "are displayed in 'Additional fields' column in the result of a search Z3950 (use semicolon as delimiter ex: <code>082ab</code>;<code>090ab</code>)"
231
        -
228
            - When matching on ISSN with the record import tool,
232
            - When matching on ISSN with the record import tool,
229
            - pref: AggressiveMatchOnISSN
233
            - pref: AggressiveMatchOnISSN
230
              choices:
234
              choices:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt (-1 / +13 lines)
Lines 144-149 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
144
        <th>Edition</th>
144
        <th>Edition</th>
145
        <th>ISBN</th>
145
        <th>ISBN</th>
146
        <th>LCCN</th>
146
        <th>LCCN</th>
147
        [% IF additionalFields %]
148
        <th>Additional fields</th>
149
        [% END %]
147
        <th>MARC</th>
150
        <th>MARC</th>
148
        <th>Card</th>
151
        <th>Card</th>
149
		<th>&nbsp;</th>
152
		<th>&nbsp;</th>
Lines 159-164 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
159
            <td>[% breeding_loo.edition %]</td>
162
            <td>[% breeding_loo.edition %]</td>
160
            <td>[% breeding_loo.isbn %]</td>
163
            <td>[% breeding_loo.isbn %]</td>
161
            <td>[% breeding_loo.lccn %]</td>
164
            <td>[% breeding_loo.lccn %]</td>
165
            [% IF additionalFields %]
166
            <td>
167
               <dl>
168
                  [% FOREACH addnumberfield IN breeding_loo.addnumberfields %]
169
                  <dt>[% addnumberfield %]:</dt>
170
                  <dd>[% breeding_loo.$addnumberfield %]</dd>
171
                  [% END %]
172
               </dl>
173
            </td>
174
            [% END %]
162
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">MARC</a></td>
175
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">MARC</a></td>
163
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Card</a></td>
176
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Card</a></td>
164
            <td><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode | uri %]">Import</a></td>
177
            <td><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode | uri %]">Import</a></td>
165
- 

Return to bug 12747