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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt (-3 / +4 lines)
Lines 315-323 Link Here
315
                    alert(_("Please select at least one label to export."));
315
                    alert(_("Please select at least one label to export."));
316
                    return;     // no batch selected
316
                    return;     // no batch selected
317
                }
317
                }
318
                return GB_showCenter(_("Export labels"), "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id | html %]&" + getstr, 400, 800);
318
                location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id | html %]&" + getstr;
319
            } else if (mode == 'batch') {
319
            } else if (mode == 'batch') {
320
                return GB_showCenter(_("Export labels"), "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id | html %]", 400, 800);
320
                location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id | html %]";
321
            } else {
321
            } else {
322
                // some pass-through error trapping just in case...
322
                // some pass-through error trapping just in case...
323
            }
323
            }
Lines 347-352 Link Here
347
                $("#description").hide();
347
                $("#description").hide();
348
            [% END %]
348
            [% END %]
349
            $("#batcht").kohaTable({
349
            $("#batcht").kohaTable({
350
                dom: '<"dt-info"i><"top pager"<"table_entries"lp><"table_controls"f>>tr<"bottom pager"ip>',
350
                autoWidth: false,
351
                autoWidth: false,
351
                order: [[0, "asc"]],
352
                order: [[0, "asc"]],
352
                pagingType: "full",
353
                pagingType: "full",
Lines 379-385 Link Here
379
                e.preventDefault();
380
                e.preventDefault();
380
                var label_id = $(this).data("label-id");
381
                var label_id = $(this).data("label-id");
381
                var batch_id = $(this).data("batch-id");
382
                var batch_id = $(this).data("batch-id");
382
                GB_showCenter(_("Export labels"),"/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id + "&label_id=" + label_id, 400, 800);
383
                location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id + "&label_id=" + label_id;
383
            });
384
            });
384
            $("#savedesc").click(function(event){
385
            $("#savedesc").click(function(event){
385
                event.preventDefault(); // prevent form submission
386
                event.preventDefault(); // prevent form submission
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-range.tt (-1 / +1 lines)
Lines 61-67 Link Here
61
            var str = "";
61
            var str = "";
62
            str += "from=" + document.getElementById("from-input").value + "&";
62
            str += "from=" + document.getElementById("from-input").value + "&";
63
            str += "to=" + document.getElementById("to-input").value;
63
            str += "to=" + document.getElementById("to-input").value;
64
            return GB_showCenter("Export labels", "/cgi-bin/koha/labels/label-print.pl?" + str, 400, 800);
64
            location.href = "/cgi-bin/koha/labels/label-print.pl?" + str;
65
        }
65
        }
66
66
67
        function checkTwoValue(_from, _to, _id) {
67
        function checkTwoValue(_from, _to, _id) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt (-1 / +2 lines)
Lines 180-186 Link Here
180
                alert(_("Please select at least one batch to export."));
180
                alert(_("Please select at least one batch to export."));
181
                return;     // no batch selected
181
                return;     // no batch selected
182
            }
182
            }
183
            return GB_showCenter(_("Export labels"), "/cgi-bin/koha/labels/label-print.pl?" + getstr, 400, 800);
183
            location.href = "/cgi-bin/koha/labels/label-print.pl?" + getstr;
184
        }
184
        }
185
        function selected_layout(op) {
185
        function selected_layout(op) {
186
            var selected = new Array;
186
            var selected = new Array;
Lines 216-221 Link Here
216
                return confirmDelete( _("Are you sure you want to delete this?") );
216
                return confirmDelete( _("Are you sure you want to delete this?") );
217
            });
217
            });
218
            $("#labels-table").kohaTable({
218
            $("#labels-table").kohaTable({
219
                dom: '<"dt-info"i><"top pager"<"table_entries"lp><"table_controls"f>>tr<"bottom pager"ip>',
219
                pagingType: "full",
220
                pagingType: "full",
220
                order: [[1, "asc"]],
221
                order: [[1, "asc"]],
221
            });
222
            });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt (-34 / +48 lines)
Lines 1-12 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% PROCESS 'i18n.inc' %]
2
[% SET footerjs = 1 %]
3
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title
5
<title>
5
    >[% FILTER collapse %]
6
    [% FILTER collapse %]
6
        [% t("Label printing/exporting") | html %]
7
        [% t("Label export") | html %]
7
        &rsaquo; [% t("Label creator") | html %] &rsaquo; [% t("Tools") | html %] &rsaquo; [% t("Koha") | html %]
8
        &rsaquo; [% t("Label creator") | html %] &rsaquo; [% t("Cataloging") | html %] &rsaquo; [% t("Koha") | html %]
8
    [% END %]</title
9
    [% END %]
9
>
10
</title>
10
[% INCLUDE 'doc-head-close.inc' popup => 1 %]
11
[% INCLUDE 'doc-head-close.inc' popup => 1 %]
11
<style>
12
<style>
12
    table {
13
    table {
Lines 22-34 Link Here
22
</style>
23
</style>
23
</head>
24
</head>
24
25
25
<body id="labels_label-print" class="tools labels">
26
<body id="labels_label-export-batch" class="tools labels">
26
<div class="main container-fluid">
27
[% WRAPPER 'header.inc' %]
27
    [% INCLUDE 'messages.inc' %]
28
    [% INCLUDE 'cat-search.inc' %]
28
    <h1>Label printing/exporting</h1>
29
[% END %]
30
31
[% WRAPPER 'sub-header.inc' %]
32
    [% WRAPPER breadcrumbs %]
33
        [% WRAPPER breadcrumb_item %]
34
            <a href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cataloging</a>
35
        [% END %]
36
        [% WRAPPER breadcrumb_item %]
37
            <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a>
38
        [% END %]
39
        [% WRAPPER breadcrumb_item %]
40
            <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Label batches</a>
41
        [% END %]
42
        [% WRAPPER breadcrumb_item bc_active= 1 %]
43
            <span>Label export</span>
44
        [% END %]
45
    [% END #/ WRAPPER breadcrumbs %]
46
[% END #/ WRAPPER sub-header.inc %]
47
48
[% WRAPPER 'main-container.inc' %]
49
    <h1>Label export</h1>
29
    [% IF ( batches ) %]
50
    [% IF ( batches ) %]
30
        <form method="get">
51
        <form method="get">
31
            <h3>Click on the following links to download the exported batch(es).</h3>
52
            <h3>Click any of the following links to download the exported batch</h3>
32
            [% IF warn_empty_range %]
53
            [% IF warn_empty_range %]
33
                <div class="alert alert-warning">
54
                <div class="alert alert-warning">
34
                    <p>Some or all of the barcodes in the range you have selected have no corresponding items.</p>
55
                    <p>Some or all of the barcodes in the range you have selected have no corresponding items.</p>
Lines 39-49 Link Here
39
                <fieldset>
60
                <fieldset>
40
                    [% IF ( batche.label_ids ) %]
61
                    [% IF ( batche.label_ids ) %]
41
                        <legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count | html %] single label[% ELSE %][% batche.label_count | html %] single labels[% END %]</legend>
62
                        <legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count | html %] single label[% ELSE %][% batche.label_count | html %] single labels[% END %]</legend>
42
                        <a
63
                        <p>
43
                            class="document pdf"
64
                            <a
44
                            href="/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %]&amp;start_label=[% batche.start_label | html %][% batche.label_ids | html %]"
65
                                class="document pdf"
45
                            >Download as PDF</a
66
                                href="/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %]&amp;start_label=[% batche.start_label | html %][% batche.label_ids | html %]"
46
                        >
67
                            >
68
                                Download as PDF
69
                            </a>
70
                        </p>
47
71
48
                        <p
72
                        <p
49
                            ><a
73
                            ><a
Lines 117-123 Link Here
117
                </fieldset>
141
                </fieldset>
118
            [% END %]
142
            [% END %]
119
            <fieldset class="action">
143
            <fieldset class="action">
120
                <input type="button" class="gb-close" value="Done" />
144
                <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch" class="btn btn-default">Return to label batches</a>
121
            </fieldset>
145
            </fieldset>
122
        </form>
146
        </form>
123
    [% ELSE %]
147
    [% ELSE %]
Lines 127-133 Link Here
127
            [% ELSIF ( item_numbers ) %]
151
            [% ELSIF ( item_numbers ) %]
128
                [% IF ( item_count == 1 ) %]<span>Exporting 1 label</span>[% ELSE %]<span>Exporting [% item_count | html %] labels</span>[% END %]
152
                [% IF ( item_count == 1 ) %]<span>Exporting 1 label</span>[% ELSE %]<span>Exporting [% item_count | html %] labels</span>[% END %]
129
            [% ELSE %]
153
            [% ELSE %]
130
                [% IF ( multi_batch_count == 1 ) %]<span>1 batch to export</span>[% ELSE %]<span>[% multi_batch_count | html %] batches to export</span>[% END %]
154
                [% IF ( multi_batch_count == 1 ) %]
155
                    <span>1 batch to export</span>
156
                [% ELSE %]
157
                    <span>[% multi_batch_count | html %] batches to export</span>
158
                [% END %]
131
            [% END %]
159
            [% END %]
132
        </h3>
160
        </h3>
133
        <form name="exporting" method="post" action="/cgi-bin/koha/labels/label-print.pl">
161
        <form name="exporting" method="post" action="/cgi-bin/koha/labels/label-print.pl">
Lines 176-197 Link Here
176
            </fieldset>
204
            </fieldset>
177
        </form>
205
        </form>
178
    [% END %]
206
    [% END %]
179
</div>
207
[% END %]
180
<!-- /.main.container-fluid -->
181
208
182
[% MACRO jsinclude BLOCK %]
209
[% MACRO jsinclude BLOCK %]
183
    [% Asset.js("js/tools-menu.js") | $raw %]
184
    [% INCLUDE 'greybox.inc' %]
185
    <script>
186
        function Done() {
187
            window.location = "[% referer | html %]";
188
        };
189
        $(document).ready(function(){
190
            $(".gb-close").on("click",function(){
191
                parent.parent.GB_hide();
192
            });
193
        });
194
    </script>
195
[% END %]
210
[% END %]
196
211
197
[% INCLUDE 'popup-bottom.inc' %]
212
[% INCLUDE 'intranet-bottom.inc' %]
198
- 

Return to bug 40366