@@ -, +, @@ --- .../en/modules/tools/batch_delete_records.tt | 16 +++++++++++++++- tools/batch_delete_records.pl | 8 +++++--- 2 files changed, 20 insertions(+), 4 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt @@ -140,6 +140,7 @@ | Clear all | Select without items | Select without holds + | Select without subscriptions
@@ -151,17 +152,19 @@ + [% FOR biblio IN records %] - + + [% END %] @@ -281,6 +284,17 @@ }); }); + $("#selectwithoutsubscriptions").click(function(e){ + e.preventDefault(); + $(".records input[type='checkbox']:not(:disabled)").each(function(){ + if( $(this).data("subscriptions") == 0 ){ + $(this).prop("checked", true ); + } else { + $(this).prop("checked", false ); + } + }); + }); + $("#clearlinkedtobiblio").click(function(e){ e.preventDefault(); $(".records input[type='checkbox']:not(:disabled)").each(function(){ --- a/tools/batch_delete_records.pl +++ a/tools/batch_delete_records.pl @@ -23,10 +23,11 @@ use Modern::Perl; use CGI; use List::MoreUtils qw( uniq ); -use C4::Auth; -use C4::Output; +use C4::Auth qw( get_template_and_user ); +use C4::Output qw( output_html_with_http_headers ); +use C4::Biblio qw( GetMarcBiblio ); +use C4::Serials qw( CountSubscriptionFromBiblionumber); use C4::AuthoritiesMarc; -use C4::Biblio; use Koha::Virtualshelves; use Koha::Authorities; @@ -102,6 +103,7 @@ if ( $op eq 'form' ) { $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')]; $biblio->{holds_count} = $holds_count; $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id ); + $biblio->{subscriptions_count} = CountSubscriptionFromBiblionumber( $record_id ); push @records, $biblio; } else { # Retrieve authority information --
Items Holds CheckoutsSubscriptions
[% INCLUDE 'biblio-title.inc' link = 1 %] [% biblio.itemnumbers.size | html %] [% biblio.holds_count | html %] [% biblio.issues_count | html %][% biblio.subscriptions_count | html %]