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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt (-1 / +5 lines)
Lines 151-157 $(document).ready(function() { Link Here
151
        <input id="dont_export_item" type="checkbox" name="dont_export_item" />
151
        <input id="dont_export_item" type="checkbox" name="dont_export_item" />
152
        </li>
152
        </li>
153
        <li>
153
        <li>
154
        <label for="strip_nonlocal_items">Remove non-local items:</label>
154
        <label for="strip_nonlocal_records">Remove records not owned by logged in library:</label>
155
        <input id="strip_nonlocal_records" type="checkbox" name="strip_nonlocal_records" />
156
        </li>
157
        <li>
158
        <label for="strip_nonlocal_items">Remove items not owned by logged in library:</label>
155
        <input id="strip_nonlocal_items" type="checkbox" name="strip_nonlocal_items" />
159
        <input id="strip_nonlocal_items" type="checkbox" name="strip_nonlocal_items" />
156
        </li>
160
        </li>
157
        <li>
161
        <li>
(-)a/tools/export.pl (-2 / +4 lines)
Lines 87-99 if ( $op eq "export" ) { Link Here
87
    my $export_remove_fields = $query->param("export_remove_fields") || q||;
87
    my $export_remove_fields = $query->param("export_remove_fields") || q||;
88
    my @biblionumbers      = $query->multi_param("biblionumbers");
88
    my @biblionumbers      = $query->multi_param("biblionumbers");
89
    my @itemnumbers        = $query->multi_param("itemnumbers");
89
    my @itemnumbers        = $query->multi_param("itemnumbers");
90
    my $strip_nonlocal_records =  $query->param('strip_nonlocal_records');
90
    my $strip_nonlocal_items =  $query->param('strip_nonlocal_items');
91
    my $strip_nonlocal_items =  $query->param('strip_nonlocal_items');
91
    my @sql_params;
92
    my @sql_params;
92
    my $sql_query;
93
    my $sql_query;
93
94
94
    my $libraries = $strip_nonlocal_items
95
    my $libraries = $strip_nonlocal_records
95
        ? [ Koha::Libraries->find(C4::Context->userenv->{branch})->unblessed ]
96
        ? [ Koha::Libraries->find(C4::Context->userenv->{branch})->unblessed ]
96
        : Koha::Libraries->search_filtered->unblessed;
97
        : Koha::Libraries->search_filtered->unblessed;
98
    my $only_export_items_for_branch = $strip_nonlocal_items ? Koha::Libraries->find(C4::Context->userenv->{branch})->branchcode : undef;
97
    my @branchcodes;
99
    my @branchcodes;
98
    for my $branchcode ( @branch ) {
100
    for my $branchcode ( @branch ) {
99
        if ( grep { $_->{branchcode} eq $branchcode } @$libraries ) {
101
        if ( grep { $_->{branchcode} eq $branchcode } @$libraries ) {
Lines 209-214 if ( $op eq "export" ) { Link Here
209
                dont_export_fields => $export_remove_fields,
211
                dont_export_fields => $export_remove_fields,
210
                csv_profile_id     => $csv_profile_id,
212
                csv_profile_id     => $csv_profile_id,
211
                export_items       => (not $dont_export_items),
213
                export_items       => (not $dont_export_items),
214
                only_export_items_for_branch => $only_export_items_for_branch,
212
            }
215
            }
213
        );
216
        );
214
    }
217
    }
215
- 

Return to bug 18201