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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt (-2 / +10 lines)
Lines 200-206 Link Here
200
            <p>[% deleted_items | html %] item(s) deleted.</p>
200
            <p>[% deleted_items | html %] item(s) deleted.</p>
201
            [% IF delete_records %] <p>[% deleted_records | html %] record(s) deleted.</p> [% END %]
201
            [% IF delete_records %] <p>[% deleted_records | html %] record(s) deleted.</p> [% END %]
202
            [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%]
202
            [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%]
203
                <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a>
203
                [% IF biblio_deleted %]
204
                    <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Return to the cataloging module</a>
205
                [% ELSE %]
206
                    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a>
207
                [% END %]
204
            [% ELSIF src %]
208
            [% ELSIF src %]
205
                <a href="[% src | url %]">Return to where you were</a>
209
                <a href="[% src | url %]">Return to where you were</a>
206
            [% ELSE %]
210
            [% ELSE %]
Lines 235-241 Link Here
235
239
236
    <p>
240
    <p>
237
        [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%]
241
        [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%]
238
           <a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | html %]"><i class="fa fa-check-square-o"></i> Return to the record</a>
242
            [% IF biblio_deleted %]
243
                <a class="btn btn-default" href="/cgi-bin/koha/cataloguing/addbooks.pl"><i class="fa fa-check-square-o"></i> Return to the cataloging module</a>
244
            [% ELSE %]
245
               <a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]"><i class="fa fa-check-square-o"></i> Return to the record</a>
246
            [% END %]
239
        [% ELSIF src %]
247
        [% ELSIF src %]
240
           <a class="btn btn-default" href="[% src | url %]"><i class="fa fa-check-square-o"></i> Return to where you were</a>
248
           <a class="btn btn-default" href="[% src | url %]"><i class="fa fa-check-square-o"></i> Return to where you were</a>
241
        [% ELSE %]
249
        [% ELSE %]
(-)a/tools/batchMod.pl (-7 / +12 lines)
Lines 200-213 if ($op eq "action") { Link Here
200
				};
200
				};
201
			}
201
			}
202
202
203
			# If there are no items left, delete the biblio
203
                # If there are no items left, delete the biblio
204
			if ( $del_records ) {
204
                if ($del_records) {
205
                            my $itemscount = Koha::Biblios->find( $itemdata->{'biblionumber'} )->items->count;
205
                    my $itemscount = Koha::Biblios->find( $itemdata->{'biblionumber'} )->items->count;
206
                            if ( $itemscount == 0 ) {
206
                    if ( $itemscount == 0 ) {
207
			        my $error = DelBiblio($itemdata->{'biblionumber'});
207
                        my $error = DelBiblio( $itemdata->{'biblionumber'} );
208
			        $deleted_records++ unless ( $error );
208
                        unless ($error) {
209
                            $deleted_records++;
210
                            if ( $src eq 'CATALOGUING' ) {
211
                                # We are coming catalogue/detail.pl, there were items from a single bib record
212
                                $template->param( biblio_deleted => 1 );
209
                            }
213
                            }
210
                        }
214
                        }
215
                    }
216
                }
211
		} else {
217
		} else {
212
            if ($values_to_modify || $values_to_blank) {
218
            if ($values_to_modify || $values_to_blank) {
213
                my $localmarcitem = Item2Marc($itemdata);
219
                my $localmarcitem = Item2Marc($itemdata);
214
- 

Return to bug 23987