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

(-)a/C4/Breeding.pm (-3 / +7 lines)
Lines 314-320 sub _handle_one_result { Link Here
314
        $row->{server}       = $servhref->{servername};
314
        $row->{server}       = $servhref->{servername};
315
        $row->{breedingid}   = $breedingid;
315
        $row->{breedingid}   = $breedingid;
316
        $row->{isbn}=_isbn_replace($row->{isbn});
316
        $row->{isbn}=_isbn_replace($row->{isbn});
317
        $row = _add_custom_field_rowdata($row, $marcrecord);
317
        my $pref_newtags = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
318
        $row = _add_custom_field_rowdata($row, $marcrecord, $pref_newtags);
318
    }
319
    }
319
    return ( $row, $error );
320
    return ( $row, $error );
320
}
321
}
Lines 345-352 sub _do_xslt_proc { Link Here
345
346
346
sub _add_custom_field_rowdata
347
sub _add_custom_field_rowdata
347
{
348
{
348
    my ( $row, $record ) = @_;
349
    my ( $row, $record, $pref_newtags ) = @_;
349
    my $pref_newtags = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
350
    my $pref_flavour = C4::Context->preference('MarcFlavour');
350
    my $pref_flavour = C4::Context->preference('MarcFlavour');
351
351
352
    $pref_newtags =~ s/^\s+|\s+$//g;
352
    $pref_newtags =~ s/^\s+|\s+$//g;
Lines 602-607 sub Z3950SearchAuth { Link Here
602
                            $row_data{heading}      = $heading;
602
                            $row_data{heading}      = $heading;
603
                            $row_data{authid}       = $authid;
603
                            $row_data{authid}       = $authid;
604
                            $row_data{heading_code} = $heading_authtype_code;
604
                            $row_data{heading_code} = $heading_authtype_code;
605
                            $row_data{row}          = _add_custom_field_rowdata(
606
                                { %row_data }, $marcrecord,
607
                                C4::Context->preference('AdditionalFieldsInZ3950ResultAuthSearch')
608
                            ) if C4::Context->preference('AdditionalFieldsInZ3950ResultAuthSearch');
605
                            push( @breeding_loop, \%row_data );
609
                            push( @breeding_loop, \%row_data );
606
                        }
610
                        }
607
                        else {
611
                        else {
(-)a/installer/data/mysql/atomicupdate/bug_28166.pl (+17 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "28166",
5
    description => "Add system preference for additional columns for Z39.50 authority search results",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
10
        $dbh->do(q{INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11
('AdditionalFieldsInZ3950ResultAuthSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of an authority Z39.50 search', 'Free')
12
});
13
        # Print useful stuff here
14
        # sysprefs
15
        say $out "Added new system preference 'AdditionalFieldsInZ3950ResultAuthSearch'";
16
    },
17
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 11-16 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
11
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
11
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
12
('ActionLogsTraceDepth', '0', '', 'Sets the maximum depth of the action logs stack trace', 'Integer'),
12
('ActionLogsTraceDepth', '0', '', 'Sets the maximum depth of the action logs stack trace', 'Integer'),
13
('AdditionalContentsEditor','tinymce','tinymce|codemirror','Choose tool for editing News.', 'Choice'),
13
('AdditionalContentsEditor','tinymce','tinymce|codemirror','Choose tool for editing News.', 'Choice'),
14
('AdditionalFieldsInZ3950ResultAuthSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of an authority Z39.50 search', 'Free'),
14
('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'),
15
('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'),
15
('AddressForFailedOverdueNotices', '', NULL, 'Destination email for failed overdue notices. If left empty then it will fallback to the first defined address in the following list: Library ReplyTo, Library Email, ReplytoDefault and KohaAdminEmailAddress', 'free'),
16
('AddressForFailedOverdueNotices', '', NULL, 'Destination email for failed overdue notices. If left empty then it will fallback to the first defined address in the following list: Library ReplyTo, Library Email, ReplytoDefault and KohaAdminEmailAddress', 'free'),
16
('AddressFormat','us','us|de|fr','Choose format to display postal addresses', 'Choice'),
17
('AddressFormat','us','us|de|fr','Choose format to display postal addresses', 'Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref (+4 lines)
Lines 75-80 Authorities: Link Here
75
              default: "Work cat."
75
              default: "Work cat."
76
              type: textarea
76
              type: textarea
77
              class: code
77
              class: code
78
        -
79
            - Display the MARC field/subfields
80
            - pref: AdditionalFieldsInZ3950ResultAuthSearch
81
            - " in the 'Additional fields' column of Z39.50 search results (use comma as delimiter e.g.: \"<code>001, 035$a</code>\")"
78
82
79
    Linker:
83
    Linker:
80
        -
84
        -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt (-1 / +16 lines)
Lines 1-5 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% IF ( opsearch ) %]
6
[% IF ( opsearch ) %]
Lines 81-86 Link Here
81
        <th>Server</th>
82
        <th>Server</th>
82
        <th>Heading</th>
83
        <th>Heading</th>
83
        <th>Authority type</th>
84
        <th>Authority type</th>
85
        [% IF Koha.Preference('AdditionalFieldsInZ3950ResultAuthSearch') %]
86
            <th>Additional fields</th>
87
        [% END %]
84
        <th class="noExport">Actions</th>
88
        <th class="noExport">Actions</th>
85
    </tr></thead>
89
    </tr></thead>
86
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
90
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
Lines 89-94 Link Here
89
            <td>[% breeding_loo.server | html %]</td>
93
            <td>[% breeding_loo.server | html %]</td>
90
            <td>[% breeding_loo.heading | html %]</td>
94
            <td>[% breeding_loo.heading | html %]</td>
91
            <td>[% breeding_loo.heading_code | html %]</td>
95
            <td>[% breeding_loo.heading_code | html %]</td>
96
            [% IF Koha.Preference('AdditionalFieldsInZ3950ResultAuthSearch') != '' %]
97
                <td>
98
                   <dl>
99
                      [% FOREACH addnumberfield IN breeding_loo.row.addnumberfields %]
100
                        [% FOREACH string IN breeding_loo.row.$addnumberfield %]
101
                            <dt>[% addnumberfield | html %]:</dt>
102
                            <dd>[% string | html %]</dd>
103
                        [% END %]
104
                      [% END %]
105
                   </dl>
106
                </td>
107
            [% END %]
92
            <td class="actions">
108
            <td class="actions">
93
                <div class="btn-group dropup">
109
                <div class="btn-group dropup">
94
                    <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>
110
                    <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>
95
- 

Return to bug 28166