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

(-)a/C4/Breeding.pm (+35 lines)
Lines 293-298 sub Z3950Search { Link Here
293
    foreach my $id (@id) {
293
    foreach my $id (@id) {
294
        push @servers, {id => $id};
294
        push @servers, {id => $id};
295
    }
295
    }
296
297
    my $pref_addnumber = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
298
    $pref_addnumber =~ s/\s+//g;
299
    if ($pref_addnumber){
300
        $template->param(
301
            additionalFields => '1',
302
        );
303
    }
304
296
    $template->param(
305
    $template->param(
297
        breeding_loop => \@breeding_loop,
306
        breeding_loop => \@breeding_loop,
298
        servers => \@servers,
307
        servers => \@servers,
Lines 342-347 sub _add_rowdata { Link Here
342
    }
351
    }
343
    $row->{date}//= $row->{date2};
352
    $row->{date}//= $row->{date2};
344
    $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
345
    return $row;
380
    return $row;
346
}
381
}
347
382
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 5-10 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
5
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
5
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
6
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
6
('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
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
7
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
8
('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'),
8
('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'),
9
('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'),
10
('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'),
11
('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option.  Example: eng|fre|ita','Textarea'),
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 8603-8608 if ( CheckVersion($DBversion) ) { Link Here
8603
    SetVersion($DBversion);
8603
    SetVersion($DBversion);
8604
}
8604
}
8605
8605
8606
$DBversion = "XXX";
8607
if ( CheckVersion($DBversion) ) {
8608
    $dbh->do("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');");
8609
    print "Upgrade to $DBversion done (Bug 12474 - Add extra column in Z3950 search result)\n";
8610
    SetVersion($DBversion);
8611
}
8612
8606
=head1 FUNCTIONS
8613
=head1 FUNCTIONS
8607
8614
8608
=head2 TableExists($table)
8615
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt (+10 lines)
Lines 157-162 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
157
        <th>Author</th>
157
        <th>Author</th>
158
        <th>ISBN</th>
158
        <th>ISBN</th>
159
        <th>LCCN</th>
159
        <th>LCCN</th>
160
        [% IF additionalFields %]
161
        <th>Additional fields</th>
162
        [% END %]
160
        <th>Preview</th>
163
        <th>Preview</th>
161
		<th>&nbsp;</th>
164
		<th>&nbsp;</th>
162
    </tr></thead>
165
    </tr></thead>
Lines 169-174 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
169
            <td>[% breeding_loo.author %]</td>
172
            <td>[% breeding_loo.author %]</td>
170
            <td>[% breeding_loo.isbn %]</td>
173
            <td>[% breeding_loo.isbn %]</td>
171
            <td>[% breeding_loo.lccn %]</td>
174
            <td>[% breeding_loo.lccn %]</td>
175
            [% IF additionalFields %]
176
            <td class="single-line">
177
               [% FOREACH addnumberfield IN breeding_loo.addnumberfields %]
178
                  [% addnumberfield %]: [% breeding_loo.$addnumberfield %]<br/>
179
               [% END %]
180
            </td>
181
            [% END %]
172
            <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>
182
            <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>
173
			<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>
183
			<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>
174
184
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-1 / +4 lines)
Lines 57-62 Acquisitions: Link Here
57
              type: textarea
57
              type: textarea
58
            - "You can use the following fields: price, quantity, budget_code, discount, sort1, sort2"
58
            - "You can use the following fields: price, quantity, budget_code, discount, sort1, sort2"
59
            - "<br/>For example:<br/>price: 947$a|947$c<br/>quantity: 969$h<br/>budget_code: 922$a"
59
            - "<br/>For example:<br/>price: 947$a|947$c<br/>quantity: 969$h<br/>budget_code: 922$a"
60
        -
61
            - Determines the MARC field/subfields
62
            - pref: AdditionalFieldsInZ3950ResultSearch
63
            - "are displayed in 'Additional fields' column in the result of a search Z3950 (use semicolon as delimiter ex: <code>082ab</code>;<code>090ab</code>)"
60
    Printing:
64
    Printing:
61
        -
65
        -
62
            - Use the
66
            - Use the
63
- 

Return to bug 12747