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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt (-6 / +34 lines)
Lines 8-14 Link Here
8
<script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar.js"></script>
8
<script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar.js"></script>
9
<script type="text/javascript">
9
<script type="text/javascript">
10
//<![CDATA[
10
//<![CDATA[
11
function Dopop(link) {
12
    newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes');
13
}
14
11
$(document).ready(function() {
15
$(document).ready(function() {
16
    $("#add_bibs_to_list").change(function(){
17
        if($("#add_bibs_to_list").find("option:selected").attr("class") == "shelf"){
18
            var shelfnumber = $("#add_bibs_to_list").find("option:selected").attr("value");
19
            var bibs = new Array();
20
            [% FOREACH message IN messages %]
21
                [% IF message.code == 'biblio_modified' %]
22
                    bibs.push("biblionumber="+[% message.biblionumber %]);
23
                [% END %]
24
            [% END %]
25
            var bibstring = bibs.join("&");
26
            Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&'+bibstring);
27
            return false;
28
        }
29
    });
12
  $("#selectall").click(function(e){
30
  $("#selectall").click(function(e){
13
    e.preventDefault();
31
    e.preventDefault();
14
    $(".records").checkCheckboxes();
32
    $(".records").checkCheckboxes();
Lines 291-304 $(document).ready(function() { Link Here
291
    [% END %]
309
    [% END %]
292
  [% ELSIF view == 'report' %]
310
  [% ELSIF view == 'report' %]
293
    [% IF report.total_records == report.total_success %]
311
    [% IF report.total_records == report.total_success %]
294
        <div class="dialog message">
312
        <div class="dialog message">All records have successfully been modified!</div>
295
            All records have successfully been modified! <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
296
        </div>
297
    [% ELSE %]
313
    [% ELSE %]
298
        <div class="dialog message">
314
        <div class="dialog message">[% report.total_success %] / [% report.total_records %] records have successfully been modified. Some errors occurred.</div>
299
            [% report.total_success %] / [% report.total_records %] records have successfully been modified. Some errors occurred. <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
300
        </div>
301
    [% END %]
315
    [% END %]
316
    <fieldset class="rows"><legend>Next</legend>
317
        <ol>
318
            <li><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification" class="btn btn-default btn-sm">New batch record modification</a>&nbsp;-- OR --</li>
319
            <li>
320
                <label for="add_bibs_to_list">Add modified records to the following list: </label>
321
                <select name="add_bibs_to_list" id="add_bibs_to_list">
322
                    <option value="">Select a list</option>
323
                    [% FOREACH list IN lists %]
324
                        <option class="shelf" value="[% list.shelfnumber %]">[% list.shelfname %]</option>
325
                    [% END %]
326
                </select>
327
            </li>
328
        </ol>
329
    </fieldset>
302
  [% ELSIF view == 'errors' %]
330
  [% ELSIF view == 'errors' %]
303
    [% FOR error IN errors %]
331
    [% FOR error IN errors %]
304
      [% IF error == 'no_template_defined' %]
332
      [% IF error == 'no_template_defined' %]
(-)a/tools/batch_record_modification.pl (-4 / +4 lines)
Lines 51-56 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ Link Here
51
51
52
my $sessionID = $input->cookie("CGISESSID");
52
my $sessionID = $input->cookie("CGISESSID");
53
53
54
my @lists = Koha::Virtualshelves->search({});
55
54
my $runinbackground = $input->param('runinbackground');
56
my $runinbackground = $input->param('runinbackground');
55
my $completedJobID = $input->param('completedJobID');
57
my $completedJobID = $input->param('completedJobID');
56
if ( $completedJobID ) {
58
if ( $completedJobID ) {
Lines 61-75 if ( $completedJobID ) { Link Here
61
        report => $report,
63
        report => $report,
62
        messages => $messages,
64
        messages => $messages,
63
        view => 'report',
65
        view => 'report',
66
        lists => \@lists,
64
    );
67
    );
65
    output_html_with_http_headers $input, $cookie, $template->output;
68
    output_html_with_http_headers $input, $cookie, $template->output;
66
    $job->clear();
69
    $job->clear();
67
    exit;
70
    exit;
68
}
71
}
69
72
70
my @lists = Koha::Virtualshelves->search({});
71
$template->param( lists => \@lists );
72
73
my @templates = GetModificationTemplates( $mmtid );
73
my @templates = GetModificationTemplates( $mmtid );
74
unless ( @templates ) {
74
unless ( @templates ) {
75
    $op = 'error';
75
    $op = 'error';
Lines 266-271 if ( $op eq 'form' ) { Link Here
266
}
266
}
267
267
268
$template->param(
268
$template->param(
269
    lists => \@lists,
269
    messages => \@messages,
270
    messages => \@messages,
270
    recordtype => $recordtype,
271
    recordtype => $recordtype,
271
    MarcModificationTemplatesLoop => \@templates,
272
    MarcModificationTemplatesLoop => \@templates,
272
- 

Return to bug 18127