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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt (-10 / +54 lines)
Lines 17-39 Link Here
17
17
18
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; [% IF ( done_searched ) %]<a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Search results[% ELSE %]Serials [% END %] </div>
18
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; [% IF ( done_searched ) %]<a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Search results[% ELSE %]Serials [% END %] </div>
19
19
20
[% url_params = [] %]
21
[% FOREACH param IN CGI.params.pairs %]
22
    [% escaped_value = BLOCK %][% param.value | uri %][% END %]
23
    [% url_params.push(param.key _ '=' _ escaped_value) %]
24
[% END %]
25
[% SET referrer = '/cgi-bin/koha/serials/serials-search.pl?' %]
26
[% referrer = BLOCK %][% referrer | url %][% url_params.join("&amp;") |uri %][% END %]
27
[% SET edit_action_link = '/cgi-bin/koha/serials/subscription-batchedit.pl?referrer=' _ referrer %]
20
28
21
[% BLOCK subscriptions_table %]
29
[% BLOCK subscriptions_table %]
22
  <form method="post">
30
  <form method="post">
23
31
24
    [% url_params = [] %]
32
    [% IF closed %]
25
    [% FOREACH param IN CGI.params.pairs %]
33
        [% SET tab = 'closed' %]
26
        [% escaped_value = BLOCK %][% param.value | uri %][% END %]
34
    [% ELSE %]
27
        [% url_params.push(param.key _ '=' _ escaped_value) %]
35
        [% SET tab = 'opened' %]
28
    [% END %]
36
    [% END %]
29
    <input type="hidden" name="referrer" value="/cgi-bin/koha/serials/serials-search.pl?[% url_params.join('&') %]"/>
30
31
    <div class="actions">
37
    <div class="actions">
32
        <a class="select-all" href="#"><i class="fa fa-check"></i> Select all</a>
38
        <a class="select-all" href="#" data-tab="[% tab %]"><i class="fa fa-check"></i> Select all</a>
33
        |
34
        <a class="clear-all" href="#"><i class="fa fa-remove"></i> Clear all</a>
35
        |
39
        |
36
        <button class="btn btn-default btn-xs" type="submit" formaction="/cgi-bin/koha/serials/subscription-batchedit.pl"><i class="fa fa-pencil"></i> Edit</button>
40
        <a class="clear-all" href="#" data-tab="[% tab %]"><i class="fa fa-remove"></i> Clear all</a>
41
        <span class="itemselection_actions">
42
            | Actions:
43
            <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected serials</a>
44
        </span>
37
    </div>
45
    </div>
38
    <table>
46
    <table>
39
      <thead>
47
      <thead>
Lines 392-397 Link Here
392
    </script>
400
    </script>
393
    [% Asset.js("js/serials-toolbar.js") %]
401
    [% Asset.js("js/serials-toolbar.js") %]
394
    <script type="text/javascript">
402
    <script type="text/javascript">
403
404
            function itemSelectionBuildModifyLink(div) {
405
                var subscription_ids = new Array();
406
                $("input[name='subscriptionid'][type='checkbox']:checked", div).each(function() {
407
                    subscription_ids.push($(this).val());
408
                });
409
                if (subscription_ids.length > 0) {
410
                    var url = "[% edit_action_link %]";
411
                    url += '&subscriptionid=' + subscription_ids.join('&subscriptionid=');
412
                    $('a.itemselection_action_modify').attr('href', url);
413
                } else {
414
                    return false;
415
                }
416
                return true;
417
            }
418
419
            function itemSelectionBuildActionLinks(tab) {
420
                var div = $("#" + tab);
421
                var modify_link_ok = itemSelectionBuildModifyLink(div);
422
                if (modify_link_ok) {
423
                    $('.itemselection_actions', div).show();
424
                } else {
425
                    $('.itemselection_actions', div).hide();
426
                }
427
            }
428
395
        $(document).ready(function() {
429
        $(document).ready(function() {
396
            var osrlt = $("#opened table").dataTable($.extend(true, {}, dataTablesDefaults, {
430
            var osrlt = $("#opened table").dataTable($.extend(true, {}, dataTablesDefaults, {
397
                "sPaginationType": "four_button",
431
                "sPaginationType": "four_button",
Lines 423-429 Link Here
423
                e.preventDefault();
457
                e.preventDefault();
424
                var checkboxes = $(this).parents('form').find('input[type="checkbox"]');
458
                var checkboxes = $(this).parents('form').find('input[type="checkbox"]');
425
                checkboxes.prop('checked', $(this).hasClass('select-all'));
459
                checkboxes.prop('checked', $(this).hasClass('select-all'));
460
                var tab = $(this).data("tab");
461
                itemSelectionBuildActionLinks(tab);
462
            });
463
464
            itemSelectionBuildActionLinks("opened");
465
            itemSelectionBuildActionLinks("closed");
466
            $("input[name='subscriptionid'][type='checkbox']").change(function() {
467
                var div = $(this).parents('form').parent().attr("id");
468
                itemSelectionBuildActionLinks(div);
426
            });
469
            });
470
427
        });
471
        });
428
    </script>
472
    </script>
429
[% END %]
473
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt (-5 / +17 lines)
Lines 32-41 Link Here
32
                                <tr>
32
                                <tr>
33
                                    <th>ISSN</th>
33
                                    <th>ISSN</th>
34
                                    <th>Title</th>
34
                                    <th>Title</th>
35
                                    <th>Notes</th>
35
                                    <th>Vendor</th>
36
                                    <th>Library</th>
37
                                    <th>Location</th>
36
                                    <th>Location</th>
37
                                    <th>Library</th>
38
                                    <th>Public notes</th>
39
                                    <th>Nonpublic notes</th>
38
                                    <th>Call number</th>
40
                                    <th>Call number</th>
41
                                    <th>Create item when receiving</th>
39
                                    <th>Expiration date</th>
42
                                    <th>Expiration date</th>
40
                                </tr>
43
                                </tr>
41
                            </thead>
44
                            </thead>
Lines 44-53 Link Here
44
                                    <tr>
47
                                    <tr>
45
                                        <td>[% subscription.biblio.biblioitem.issn %]</td>
48
                                        <td>[% subscription.biblio.biblioitem.issn %]</td>
46
                                        <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]">[% subscription.biblio.title %] (#[% subscription.subscriptionid %])</a></td>
49
                                        <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]">[% subscription.biblio.title %] (#[% subscription.subscriptionid %])</a></td>
47
                                        <td>[% subscription.notes %] [% IF subscription.internalnotes %]([% subscription.internalnotes %])[% END %]</td>
50
                                        <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% subscription.vendor.id %]">[% subscription.vendor.name |html %]</a></td>
48
                                        <td>[% Branches.GetName(subscription.branchcode) %]</td>
49
                                        <td>[% AuthorisedValues.GetByCode('LOC', subscription.location) %]</td>
51
                                        <td>[% AuthorisedValues.GetByCode('LOC', subscription.location) %]</td>
52
                                        <td>[% Branches.GetName(subscription.branchcode) %]</td>
53
                                        <td>[% subscription.notes %]</td>
54
                                        <td>[% subscription.internalnotes %]</td>
50
                                        <td>[% subscription.callnumber %]</td>
55
                                        <td>[% subscription.callnumber %]</td>
56
                                        <td>
57
                                            [% IF subscription.serialsadditems %]
58
                                                <span>Yes</span>
59
                                            [% ELSE %]
60
                                                <span>No</span>
61
                                            [% END %]
62
                                        </td>
51
                                        <td>[% subscription.enddate | $KohaDates %]</td>
63
                                        <td>[% subscription.enddate | $KohaDates %]</td>
52
                                    </tr>
64
                                    </tr>
53
                                [% END %]
65
                                [% END %]
Lines 141-146 Link Here
141
153
142
                        <fieldset class="action">
154
                        <fieldset class="action">
143
                            <button type="submit" name="batchedit" value="1">Start batch edit</button>
155
                            <button type="submit" name="batchedit" value="1">Start batch edit</button>
156
                            <a class="cancel" href="[% referrer %]">Cancel</a>
144
                        </fieldset>
157
                        </fieldset>
145
                    </form>
158
                    </form>
146
                </div>
159
                </div>
147
- 

Return to bug 18426