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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt (-1 / +15 lines)
Lines 133-138 Link Here
133
          | <a id="clearall" href="#"><i class="fa fa-remove"></i> Clear all</a>
133
          | <a id="clearall" href="#"><i class="fa fa-remove"></i> Clear all</a>
134
          | <a id="selectwithoutitems" href="#">Select without items</a>
134
          | <a id="selectwithoutitems" href="#">Select without items</a>
135
          | <a id="selectnotreserved" href="#">Select without holds</a>
135
          | <a id="selectnotreserved" href="#">Select without holds</a>
136
          | <a id="selectwithoutsubscriptions" href="#">Select without subscriptions</a>
136
        </div>
137
        </div>
137
        <form action="/cgi-bin/koha/tools/batch_delete_records.pl" method="post" id="selectrecords">
138
        <form action="/cgi-bin/koha/tools/batch_delete_records.pl" method="post" id="selectrecords">
138
          <table id="biblios" class="records">
139
          <table id="biblios" class="records">
Lines 144-160 Link Here
144
                <th>Items</th>
145
                <th>Items</th>
145
                <th>Holds</th>
146
                <th>Holds</th>
146
                <th>Checkouts</th>
147
                <th>Checkouts</th>
148
                <th>Subscriptions</th>
147
              </tr>
149
              </tr>
148
            </thead>
150
            </thead>
149
            <tbody>
151
            <tbody>
150
              [% FOR biblio IN records %]
152
              [% FOR biblio IN records %]
151
                <tr>
153
                <tr>
152
                  <td><input type="checkbox" name="record_id" id="record_id_[% biblio.biblionumber | html %]" value="[% biblio.biblionumber | html %]" data-items="[% biblio.itemnumbers.size | html %]" data-issues="[% biblio.issues_count | html %]" data-reserves="[% biblio.holds_count | html %]" /></td>
154
                  <td><input type="checkbox" name="record_id" id="record_id_[% biblio.biblionumber | html %]" value="[% biblio.biblionumber | html %]" data-items="[% biblio.itemnumbers.size | html %]" data-issues="[% biblio.issues_count | html %]" data-reserves="[% biblio.holds_count | html %]" data-subscriptions="[% biblio.subscriptions_count | html %]" /></td>
153
                  <td><label for="record_id_[% biblio.biblionumber | html %]">[% biblio.biblionumber | html %]</label></td>
155
                  <td><label for="record_id_[% biblio.biblionumber | html %]">[% biblio.biblionumber | html %]</label></td>
154
                  <td>[% INCLUDE 'biblio-title.inc' link = 1 %]</td>
156
                  <td>[% INCLUDE 'biblio-title.inc' link = 1 %]</td>
155
                  <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.itemnumbers.size | html %]</a></td>
157
                  <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.itemnumbers.size | html %]</a></td>
156
                  <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.holds_count | html %]</a></td>
158
                  <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.holds_count | html %]</a></td>
157
                  <td><a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.issues_count | html %]</a></td>
159
                  <td><a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.issues_count | html %]</a></td>
160
                  <td><a href="/cgi-bin/koha/serials/serials-search.pl?searched=1&biblionumber=[% biblio.biblionumber | uri %]">[% biblio.subscriptions_count | html %]</a></td>
158
                </tr>
161
                </tr>
159
              [% END %]
162
              [% END %]
160
            </tbody>
163
            </tbody>
Lines 271-276 Link Here
271
                });
274
                });
272
            });
275
            });
273
276
277
            $("#selectwithoutsubscriptions").click(function(e){
278
                e.preventDefault();
279
                $(".records input[type='checkbox']:not(:disabled)").each(function(){
280
                    if( $(this).data("subscriptions") == 0 ){
281
                        $(this).prop("checked", true );
282
                    } else {
283
                        $(this).prop("checked", false );
284
                    }
285
                });
286
            });
287
274
            $("#clearlinkedtobiblio").click(function(e){
288
            $("#clearlinkedtobiblio").click(function(e){
275
                e.preventDefault();
289
                e.preventDefault();
276
                $(".records input[type='checkbox']:not(:disabled)").each(function(){
290
                $(".records input[type='checkbox']:not(:disabled)").each(function(){
(-)a/tools/batch_delete_records.pl (-1 / +2 lines)
Lines 28-33 use C4::Auth qw( get_template_and_user ); Link Here
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Auth qw( get_template_and_user );
29
use C4::Auth qw( get_template_and_user );
30
use C4::Biblio qw( GetMarcBiblio );
30
use C4::Biblio qw( GetMarcBiblio );
31
use C4::Serials qw( CountSubscriptionFromBiblionumber);
31
use C4::AuthoritiesMarc;
32
use C4::AuthoritiesMarc;
32
use Koha::Virtualshelves;
33
use Koha::Virtualshelves;
33
34
Lines 106-111 if ( $op eq 'form' ) { Link Here
106
            $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
107
            $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
107
            $biblio->{holds_count} = $holds_count;
108
            $biblio->{holds_count} = $holds_count;
108
            $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id );
109
            $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id );
110
            $biblio->{subscriptions_count} = CountSubscriptionFromBiblionumber( $record_id );
109
            push @records, $biblio;
111
            push @records, $biblio;
110
        } else {
112
        } else {
111
            # Retrieve authority information
113
            # Retrieve authority information
112
- 

Return to bug 9565