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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt (-4 / +4 lines)
Lines 173-179 Link Here
173
[% END %]
173
[% END %]
174
174
175
[% MACRO jsinclude BLOCK %]
175
[% MACRO jsinclude BLOCK %]
176
    [% INCLUDE 'greybox.inc' %]
177
    [% INCLUDE 'datatables.inc' %]
176
    [% INCLUDE 'datatables.inc' %]
178
    [% Asset.js("js/tools-menu.js") | $raw %]
177
    [% Asset.js("js/tools-menu.js") | $raw %]
179
    <script>
178
    <script>
Lines 265-273 Link Here
265
                    alert(_("Please select at least one card to export."));
264
                    alert(_("Please select at least one card to export."));
266
                    return;     // no batch selected
265
                    return;     // no batch selected
267
                }
266
                }
268
                return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id | html %]&" + getstr, 400, 800);
267
                location.href = "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id | html %]&" + getstr;
269
            } else if (mode == 'batch') {
268
            } else if (mode == 'batch') {
270
                return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id | html %]", 400, 800);
269
                location.href = "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id | html %]";
271
            } else {
270
            } else {
272
                // some pass-through error trapping just in case...
271
                // some pass-through error trapping just in case...
273
            }
272
            }
Lines 310-315 Link Here
310
                $("#description").hide();
309
                $("#description").hide();
311
            [% END %]
310
            [% END %]
312
            $("#batcht").kohaTable({
311
            $("#batcht").kohaTable({
312
                dom: '<"dt-info"i><"top pager"<"table_entries"lp><"table_controls"f>>tr<"bottom pager"ip>',
313
                order: [[0, "asc"]],
313
                order: [[0, "asc"]],
314
                pagingType: "full",
314
                pagingType: "full",
315
                lengthMenu: [aLengthMenu, aLengthMenuLabel],
315
                lengthMenu: [aLengthMenu, aLengthMenuLabel],
Lines 351-357 Link Here
351
                e.preventDefault();
351
                e.preventDefault();
352
                var label_id = $(this).data("label-id");
352
                var label_id = $(this).data("label-id");
353
                var batch_id = $(this).data("batch-id");
353
                var batch_id = $(this).data("batch-id");
354
                GB_showCenter( _("Export single card"),'/cgi-bin/koha/patroncards/print.pl?batch_id=' + batch_id + '&label_id=' + label_id, 400, 800);
354
                location.href = "/cgi-bin/koha/patroncards/print.pl?batch_id=" + batch_id + "&label_id=" + label_id;
355
            });
355
            });
356
356
357
            $("#savedesc").click(function(event){
357
            $("#savedesc").click(function(event){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt (-3 / +3 lines)
Lines 249-255 Link Here
249
                alert(_("Please select at least one batch to export."));
249
                alert(_("Please select at least one batch to export."));
250
                return;     // no batch selected
250
                return;     // no batch selected
251
            }
251
            }
252
            return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?" + getstr, 400, 800);
252
            location.href = "/cgi-bin/koha/patroncards/print.pl?" + getstr;
253
        };
253
        };
254
254
255
        function XportPatronlist() {
255
        function XportPatronlist() {
Lines 258-264 Link Here
258
                return;     // no patron list selected
258
                return;     // no patron list selected
259
            }
259
            }
260
            getstr = 'patronlist_id='+patron_list_id.value;
260
            getstr = 'patronlist_id='+patron_list_id.value;
261
            return GB_showCenter(_("Export patron cards from list"), "/cgi-bin/koha/patroncards/print.pl?" + getstr, 700, 800);
261
            location.href = "/cgi-bin/koha/patroncards/print.pl?" + getstr;
262
        };
262
        };
263
263
264
        function selected_layout(op) {
264
        function selected_layout(op) {
Lines 328-334 Link Here
328
            $(".export").on("click", function(e){
328
            $(".export").on("click", function(e){
329
                e.preventDefault();
329
                e.preventDefault();
330
                var batch_id = $(this).data("batch-id");
330
                var batch_id = $(this).data("batch-id");
331
                GB_showCenter( _("Export single batch"),'/cgi-bin/koha/patroncards/print.pl?batch_id='+batch_id, 400, 800);
331
                location.href = "/cgi-bin/koha/patroncards/print.pl?batch_id=" + batch_id;
332
            });
332
            });
333
        });
333
        });
334
    </script>
334
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt (-36 / +47 lines)
Lines 3-24 Link Here
3
[% PROCESS 'i18n.inc' %]
3
[% PROCESS 'i18n.inc' %]
4
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
<title
6
<title>
7
    >[% FILTER collapse %]
7
    [% FILTER collapse %]
8
        [% t("Patron card printing/exporting") | html %]
8
        [% t("Export") | html %]
9
        &rsaquo; [% t("Patron cards") | html %] &rsaquo; [% t("Tools") | html %] &rsaquo; [% t("Koha") | html %]
9
        &rsaquo; [% t("Patron cards") | html %] &rsaquo; [% t("Tools") | html %] &rsaquo; [% t("Koha") | html %]
10
    [% END %]</title
10
    [% END %]
11
>
11
</title>
12
[% INCLUDE 'doc-head-close.inc' popup => 1 %]
12
[% INCLUDE 'doc-head-close.inc' %]
13
</head>
13
</head>
14
14
15
<body id="pcard_print" class="tools pcard">
15
<body id="pcard_edit-batch" class="tools pcard">
16
<div class="container-fluid">
16
[% WRAPPER 'header.inc' %]
17
    <h1>Patron card printing/exporting</h1>
17
    [% INCLUDE 'cat-search.inc' %]
18
[% END %]
19
20
[% WRAPPER 'sub-header.inc' %]
21
    [% WRAPPER breadcrumbs %]
22
        [% WRAPPER breadcrumb_item %]
23
            <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
24
        [% END %]
25
        [% WRAPPER breadcrumb_item %]
26
            <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
27
        [% END %]
28
        [% WRAPPER breadcrumb_item %]
29
            <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch">Batches</a>
30
        [% END %]
31
        [% WRAPPER breadcrumb_item bc_active= 1 %]
32
            <span>Export</span>
33
        [% END %]
34
    [% END #/ WRAPPER breadcrumbs %]
35
[% END #/ WRAPPER sub-header.inc %]
36
37
[% WRAPPER 'main-container.inc' %]
38
    <h1>Patron card export</h1>
18
    [% IF ( batches ) %]
39
    [% IF ( batches ) %]
19
        <form method="get">
40
        <form method="get">
20
            <h3>Click on the following link(s) to download the exported batch(es).</h3>
41
            <h3>Click any of the following links to download the exported batch</h3>
21
            <fieldset>
42
            <div class="page-section">
22
                [% FOREACH batche IN batches %]
43
                [% FOREACH batche IN batches %]
23
                    [% IF ( batche.label_ids ) %]
44
                    [% IF ( batche.label_ids ) %]
24
                        <legend>[% batche.card_count | html %] Single patron cards</legend>
45
                        <legend>[% batche.card_count | html %] Single patron cards</legend>
Lines 49-70 Link Here
49
                        </p>
70
                        </p>
50
                    [% END %]
71
                    [% END %]
51
                [% END %]
72
                [% END %]
52
            </fieldset>
73
            </div>
53
74
54
            <fieldset class="action">
75
            <fieldset class="action">
55
                <input type="button" class="gb-close" value="Done" />
76
                <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch" class="btn btn-default">Return to patron card batches</a>
56
            </fieldset>
77
            </fieldset>
57
        </form>
78
        </form>
58
    [% ELSIF ( patronlist_id && template_id && layout_id ) %]
79
    [% ELSIF ( patronlist_id && template_id && layout_id ) %]
59
        <div id="export_patron_list">
80
        <div id="export_patron_list">
60
            <h3>Click on the link to download the patron cards from the patron list.</h3>
81
            <h3>Click any of the following links to download the exported batch</h3>
61
            <p>
82
            <div class="page-section">
62
                <a
83
                <p>
63
                    class="document pdf"
84
                    <a
64
                    href="/cgi-bin/koha/patroncards/create-pdf.pl?patronlist_id=[% patronlist_id | html %]&amp;template_id=[% template_id | html %]&amp;layout_id=[% layout_id | html %]&amp;layout_back_id=[% layout_back_id | html %]&amp;start_card=[% start_card | html %]&amp;order_by=[% order_by | html %]"
85
                        class="document pdf"
65
                    >label_patronlist_[% patronlist_id | html %].pdf</a
86
                        href="/cgi-bin/koha/patroncards/create-pdf.pl?patronlist_id=[% patronlist_id | html %]&amp;template_id=[% template_id | html %]&amp;layout_id=[% layout_id | html %]&amp;layout_back_id=[% layout_back_id | html %]&amp;start_card=[% start_card | html %]&amp;order_by=[% order_by | html %]"
66
                >
87
                    >
67
            </p>
88
                        label_patronlist_[% patronlist_id | html %].pdf
89
                    </a>
90
                </p>
91
            </div>
68
        </div>
92
        </div>
69
    [% ELSE %]
93
    [% ELSE %]
70
        <h3>
94
        <h3>
Lines 143-163 Link Here
143
            </fieldset>
167
            </fieldset>
144
        </form>
168
        </form>
145
    [% END %]
169
    [% END %]
146
</div>
170
[% END %]
147
<!-- /.container-fluid -->
148
171
149
[% MACRO jsinclude BLOCK %]
172
[% MACRO jsinclude BLOCK %]
150
    [% INCLUDE 'greybox.inc' %]
151
    <script>
152
        function Done() {
153
            window.location = "[% referer | html %]";
154
        };
155
        $(document).ready(function(){
156
            $(".gb-close").on("click",function(){
157
                parent.parent.GB_hide();
158
            });
159
        });
160
    </script>
161
[% END %]
173
[% END %]
162
174
163
[% INCLUDE 'popup-bottom.inc' %]
175
[% INCLUDE 'intranet-bottom.inc' %]
164
- 

Return to bug 40412