<li><label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" /></li>
</ol>
</fieldset>
+ <fieldset class="rows" id="shelves">
+ <legend>Or select a list of records</legend>
+ <ol>
+ <li>
+ <label for="shelf_number">Use records from the following list: </label>
+ <select name="shelf_number" id="shelf_number">
+ <option value="">Select a list</option>
+ [% FOREACH list IN lists %]
+ <option value="[% list.shelfnumber %]">[% list.shelfname %]</option>
+ [% END %]
+ </option>
+ </select>
+ </li>
+ </ol>
+ </fieldset>
<fieldset class="rows">
<legend>Or enter a list of record numbers</legend>
<ol>
<script>
var MSG_CANNOT_BE_DELETED = _("This record cannot be deleted, at least one item is currently checked out.");
$(document).ready(function() {
+ $("input[type='radio']").click(function(){
+ if ($(this).attr('id') == 'authority_type') {
+ $("#shelves").hide();
+ } else if ($(this).attr('id') == 'biblio_type') {
+ $("#shelves").show();
+ }
+ });
$("#selectall").click(function(e){
e.preventDefault();
$(".records").checkCheckboxes(":input[type='checkbox']:not(:disabled)");
<li><label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" /></li>
</ol>
</fieldset>
+ <fieldset class="rows" id="shelves">
+ <legend>Or select a list of records</legend>
+ <ol>
+ <li>
+ <label for="shelf_number">Use records from the following list: </label>
+ <select name="shelf_number" id="shelf_number">
+ <option value="">Select a list</option>
+ [% FOREACH list IN lists %]
+ <option value="[% list.shelfnumber %]">[% list.shelfname %]</option>
+ [% END %]
+ </option>
+ </select>
+ </li>
+ </ol>
+ </fieldset>
<fieldset class="rows">
<legend>Or enter a list of record numbers</legend>
<ol>
[% Asset.js("js/background-job-progressbar.js") | $raw %]
<script>
$(document).ready(function() {
+ $("input[type='radio']").click(function(){
+ if ($(this).attr('id') == 'authority_type') {
+ $("#shelves").hide();
+ } else if ($(this).attr('id') == 'biblio_type') {
+ $("#shelves").show();
+ }
+ });
$("#selectall").click(function(e){
e.preventDefault();
$(".records").checkCheckboxes();
use C4::Output;
use C4::AuthoritiesMarc;
use C4::Biblio;
+use Koha::Virtualshelves;
use Koha::Authorities;
use Koha::Biblios;
flagsrequired => { tools => 'records_batchdel' },
});
+my @lists = Koha::Virtualshelves->search({});
+$template->param( lists => \@lists );
+
my @records;
my @messages;
if ( $op eq 'form' ) {
$content =~ s/[\r\n]*$//;
push @record_ids, $content if $content;
}
+ } elsif ( my $shelf_number = $input->param('shelf_number') ) {
+ my $shelf = Koha::Virtualshelves->find($shelf_number);
+ my $contents = $shelf->get_contents;
+ while ( my $content = $contents->next ) {
+ my $biblionumber = $content->biblionumber;
+ push @record_ids, $biblionumber;
+ }
} else {
# The user enters manually the list of id
push @record_ids, split( /\s\n/, $input->param('recordnumber_list') );
use Koha::Biblios;
use Koha::MetadataRecord::Authority;
+use Koha::Virtualshelves;
my $input = new CGI;
our $dbh = C4::Context->dbh;
exit;
}
+my @lists = Koha::Virtualshelves->search({});
+$template->param( lists => \@lists );
+
my @templates = GetModificationTemplates( $mmtid );
unless ( @templates ) {
$op = 'error';
$content =~ s/[\r\n]*$//;
push @record_ids, $content if $content;
}
+ } elsif ( my $shelf_number = $input->param('shelf_number') ) {
+ my $shelf = Koha::Virtualshelves->find($shelf_number);
+ my $contents = $shelf->get_contents;
+ while ( my $content = $contents->next ) {
+ my $biblionumber = $content->biblionumber;
+ push @record_ids, $biblionumber;
+ }
} else {
# The user enters manually the list of id
push @record_ids, split( /\s\n/, $input->param('recordnumber_list') );