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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt (-178 / +183 lines)
Lines 1-177 Link Here
1
[% USE Asset %]
1
[% USE Asset %]
2
[% USE ItemTypes %]
2
[% USE ItemTypes %]
3
[% SET footerjs = 1 %]
3
    [% INCLUDE 'doc-head-open.inc' %]
4
    [% INCLUDE 'doc-head-open.inc' %]
4
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Batches &rsaquo; [% IF batch_id %]Edit ([% batch_id %])[% ELSE %]New[% END %]</title>
5
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Batches &rsaquo; [% IF batch_id %]Edit ([% batch_id %])[% ELSE %]New[% END %]</title>
5
    [% INCLUDE 'doc-head-close.inc' %]
6
    [% INCLUDE 'doc-head-close.inc' %]
6
    [% INCLUDE 'greybox.inc' %]
7
    [% Asset.css("css/datatables.css") %]
7
    [% Asset.css("css/datatables.css") %]
8
    [% INCLUDE 'datatables.inc' %]
9
    <script type="text/javascript">
10
    //<![CDATA[
11
        function DeleteConfirm() {
12
            var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]");
13
            var answer = confirm(msg);
14
            if (answer) {
15
                window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=batch&amp;element_id=[% batch_id %]";
16
            }
17
            else {
18
                return; // abort delete
19
            }
20
        };
21
        function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
22
            $(".focus:last").select();
23
        }
24
        function verifyBarcodes(barcodes) {
25
            if (barcodes.value == '') {
26
                alert(_("Please add barcodes using either the direct entry text area or the item search."));
27
                return false;   // not ok
28
            }
29
            else {
30
                return true;    // ok
31
            };
32
        }
33
            function Remove() {
34
                items = new Array;
35
                item_num = new Array;
36
                if(document.items.action.length > 0) {
37
                    for (var i=0; i < document.items.action.length; i++) {
38
                        if (document.items.action[i].checked) {
39
                            items.push("label_id=" +  document.items.action[i].value);
40
                            item_num.push(i+1);
41
                        }
42
                    }
43
                    getstr = items.join("&");
44
                    item_msg = item_num.join(", ");
45
                    var msg = _("Are you sure you want to remove label number(s): %s from this batch?").format(item_msg);
46
                } else if (document.items.action.checked) {
47
		    alert(_("Deletion of label from a batch with only one label will delete the batch.") + "\n\n" + _("If this is what you want, select the 'Delete batch' option from the toolbar"));
48
                    return; // no deletion for single item batch
49
                }
50
                else {
51
                    alert(_("Please select at least one label to delete."));
52
                    return;     // no item selected
53
                }
54
                var answer = confirm(msg);
55
                if (answer) {
56
                    window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=remove&amp;batch_id=[% batch_id %]&amp;" + getstr;
57
                }
58
                else {
59
                    return; // abort delete
60
                }
61
            };
62
            function Add() {
63
                var number_list = document.getElementById("number_list");
64
                if (number_list.value == '') {
65
                    window.open("/cgi-bin/koha/labels/label-item-search.pl?batch_id=[% batch_id %]&amp;type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes');
66
                }
67
                else {
68
                    document.forms["add_by_number"].submit();
69
                }
70
            };
71
72
            function add_item(item_number) {
73
                $("#itemnum_enter").prop("checked",true);
74
                $("#number_list").val($("#number_list").val()+item_number+"\r\n");
75
            };
76
77
            function DeDuplicate() {
78
                window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=de_duplicate&amp;batch_id=[% batch_id %]";
79
            };
80
            function Xport(mode) {
81
                if (mode == 'label') {
82
                    labels= new Array;
83
                    if(document.items.action.length > 0) {
84
                        for (var i=0; i < document.items.action.length; i++) {
85
                            if (document.items.action[i].checked) {
86
                                labels.push("label_id=" +  document.items.action[i].value);
87
                            }
88
                        }
89
                        if (labels.length < 1) {
90
                            alert(_("Please select at least one label to export."));
91
                            return;     // no batch selected
92
                        }
93
                        getstr = labels.join("&");
94
                    }
95
                    else if (document.items.action.checked) {
96
                        getstr = document.items.action.value;
97
                    }
98
                    else {
99
                        alert(_("Please select at least one label to export."));
100
                        return;     // no batch selected
101
                    }
102
                    return GB_showCenter(_("Export labels"), "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]&" + getstr, 400, 800);
103
                }
104
                else if (mode == 'batch') {
105
                    return GB_showCenter(_("Export labels"), "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]", 400, 800);
106
                }
107
                else {
108
                    // some pass-thru error trapping just in case...
109
                }
110
            };
111
           function selected_layout() {
112
                if (document.items.action.length) {
113
                for (i=0;i<document.items.action.length;i++){
114
                    if (document.items.action[i].checked==true){
115
                        return(document.items.action[i].value);
116
                    }
117
                };
118
                }
119
                else {
120
                    if (document.items.action.checked){
121
                        return(document.items.action.value);
122
                    }
123
                };
124
                alert(_("Please select at least one item."));
125
                return (-1);
126
            };
127
128
         $(document).ready(function() {
129
            $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, {
130
                "autoWidth": false,
131
                "aoColumnDefs": [
132
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
133
                    { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
134
                ],
135
                "aaSorting": [[ 0, "asc" ]],
136
                "sPaginationType": "four_button"
137
            }));
138
            $("#additems").click(function(){
139
                Add();
140
                return false;
141
            });
142
            $("#removeitems").click(function(){
143
                Remove();
144
                return false;
145
            });
146
            $("#deletebatch").click(function(){
147
                DeleteConfirm();
148
                return false;
149
            });
150
            $("#deduplicate").click(function(){
151
                DeDuplicate();
152
                return false;
153
            });
154
            $("#exportitems").click(function(){
155
                Xport('label');
156
                return false;
157
            });
158
            $("#exportbatch").click(function(){
159
                Xport('batch');
160
                return false;
161
            });
162
            $(".delete").on("click", function(){
163
                return confirmDelete( _("Are you sure you want to delete this?") );
164
            });
165
            $(".export").on("click", function(e){
166
                e.preventDefault();
167
                var label_id = $(this).data("label-id");
168
                var batch_id = $(this).data("batch-id");
169
                GB_showCenter(_("Export labels"),"/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id + "&label_id=" + label_id, 400, 800);
170
            });
171
         });
172
    //]]>
173
    </script>
174
</head>
8
</head>
9
175
<body id="labels_label-edit-batch" class="tools labels" onload="dofocus();">
10
<body id="labels_label-edit-batch" class="tools labels" onload="dofocus();">
176
    [% INCLUDE 'header.inc' %]
11
    [% INCLUDE 'header.inc' %]
177
    [% INCLUDE 'cat-search.inc' %]
12
    [% INCLUDE 'cat-search.inc' %]
Lines 186-195 Link Here
186
            New
21
            New
187
        [% END %]
22
        [% END %]
188
    </div>
23
    </div>
189
    <div id="doc3" class="yui-t2">
24
190
        <div id="bd">
25
    <div class="main container-fluid">
191
            <div id="yui-main">
26
        <div class="row">
192
                <div class="yui-b">
27
            <div class="col-sm-10 col-sm-push-2">
28
                <main>
29
193
                        [% INCLUDE 'labels-toolbar.inc' %]
30
                        [% INCLUDE 'labels-toolbar.inc' %]
194
                        [% IF ( err ) %]
31
                        [% IF ( err ) %]
195
                            [% BLOCK xlate_errtype %]
32
                            [% BLOCK xlate_errtype %]
Lines 311-320 Link Here
311
                                    </div>
148
                                    </div>
312
                                [% END %]
149
                                [% END %]
313
                            </div>
150
                            </div>
314
                        </div>
151
            </main>
315
                </div>
152
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
316
            <div class="yui-b">
153
317
              [% INCLUDE 'tools-menu.inc' %]
154
        <div class="col-sm-2 col-sm-pull-10">
318
            </div>
155
            <aside>
319
            </div>
156
                [% INCLUDE 'tools-menu.inc' %]
320
    [% INCLUDE 'intranet-bottom.inc' %]
157
            </aside>
158
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
159
     </div> <!-- /.row -->
160
161
[% MACRO jsinclude BLOCK %]
162
    [% Asset.js("js/tools-menu.js") %]
163
    [% INCLUDE 'greybox.inc' %]
164
    [% INCLUDE 'datatables.inc' %]
165
    <script>
166
        function DeleteConfirm() {
167
            var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]");
168
            var answer = confirm(msg);
169
            if (answer) {
170
                window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=batch&amp;element_id=[% batch_id %]";
171
            }
172
            else {
173
                return; // abort delete
174
            }
175
        }
176
        function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
177
            $(".focus:last").select();
178
        }
179
        function verifyBarcodes(barcodes) {
180
            if (barcodes.value == '') {
181
                alert(_("Please add barcodes using either the direct entry text area or the item search."));
182
                return false;   // not ok
183
            }
184
            else {
185
                return true;    // ok
186
            }
187
        }
188
        function Remove() {
189
            items = new Array;
190
            item_num = new Array;
191
            if(document.items.action.length > 0) {
192
                for (var i=0; i < document.items.action.length; i++) {
193
                    if (document.items.action[i].checked) {
194
                        items.push("label_id=" +  document.items.action[i].value);
195
                        item_num.push(i+1);
196
                    }
197
                }
198
                getstr = items.join("&");
199
                item_msg = item_num.join(", ");
200
                var msg = _("Are you sure you want to remove label number(s): %s from this batch?").format(item_msg);
201
            } else if (document.items.action.checked) {
202
                alert(_("Deletion of label from a batch with only one label will delete the batch.") + "\n\n" + _("If this is what you want, select the 'Delete batch' option from the toolbar"));
203
                    return; // no deletion for single item batch
204
            } else {
205
                alert(_("Please select at least one label to delete."));
206
                return;     // no item selected
207
            }
208
            var answer = confirm(msg);
209
            if (answer) {
210
                window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=remove&amp;batch_id=[% batch_id %]&amp;" + getstr;
211
            } else {
212
                return; // abort delete
213
            }
214
        }
215
        function Add() {
216
            var number_list = document.getElementById("number_list");
217
            if (number_list.value == '') {
218
                window.open("/cgi-bin/koha/labels/label-item-search.pl?batch_id=[% batch_id %]&amp;type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes');
219
            } else {
220
                document.forms["add_by_number"].submit();
221
            }
222
        }
223
224
        function add_item(item_number) {
225
            $("#itemnum_enter").prop("checked",true);
226
            $("#number_list").val($("#number_list").val()+item_number+"\r\n");
227
        }
228
229
        function DeDuplicate() {
230
            window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=de_duplicate&amp;batch_id=[% batch_id %]";
231
        }
232
233
        function Xport(mode) {
234
            if (mode == 'label') {
235
                labels= new Array;
236
                if(document.items.action.length > 0) {
237
                    for (var i=0; i < document.items.action.length; i++) {
238
                        if (document.items.action[i].checked) {
239
                            labels.push("label_id=" +  document.items.action[i].value);
240
                        }
241
                    }
242
                    if (labels.length < 1) {
243
                        alert(_("Please select at least one label to export."));
244
                        return;     // no batch selected
245
                    }
246
                    getstr = labels.join("&");
247
                }
248
                else if (document.items.action.checked) {
249
                    getstr = document.items.action.value;
250
                } else {
251
                    alert(_("Please select at least one label to export."));
252
                    return;     // no batch selected
253
                }
254
                return GB_showCenter(_("Export labels"), "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]&" + getstr, 400, 800);
255
            } else if (mode == 'batch') {
256
                return GB_showCenter(_("Export labels"), "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]", 400, 800);
257
            } else {
258
                // some pass-thru error trapping just in case...
259
            }
260
        }
261
262
        function selected_layout() {
263
            if (document.items.action.length) {
264
                for (i=0;i<document.items.action.length;i++){
265
                    if (document.items.action[i].checked==true){
266
                        return(document.items.action[i].value);
267
                    }
268
                }
269
            } else {
270
                if (document.items.action.checked){
271
                    return(document.items.action.value);
272
                }
273
            }
274
            alert(_("Please select at least one item."));
275
            return (-1);
276
        }
277
278
         $(document).ready(function() {
279
            $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, {
280
                "autoWidth": false,
281
                "aoColumnDefs": [
282
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
283
                    { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
284
                ],
285
                "aaSorting": [[ 0, "asc" ]],
286
                "sPaginationType": "four_button"
287
            }));
288
            $("#additems").click(function(){
289
                Add();
290
                return false;
291
            });
292
            $("#removeitems").click(function(){
293
                Remove();
294
                return false;
295
            });
296
            $("#deletebatch").click(function(){
297
                DeleteConfirm();
298
                return false;
299
            });
300
            $("#deduplicate").click(function(){
301
                DeDuplicate();
302
                return false;
303
            });
304
            $("#exportitems").click(function(){
305
                Xport('label');
306
                return false;
307
            });
308
            $("#exportbatch").click(function(){
309
                Xport('batch');
310
                return false;
311
            });
312
            $(".delete").on("click", function(){
313
                return confirmDelete( _("Are you sure you want to delete this?") );
314
            });
315
            $(".export").on("click", function(e){
316
                e.preventDefault();
317
                var label_id = $(this).data("label-id");
318
                var batch_id = $(this).data("batch-id");
319
                GB_showCenter(_("Export labels"),"/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id + "&label_id=" + label_id, 400, 800);
320
            });
321
         });
322
    </script>
323
[% END %]
324
325
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt (-44 / +50 lines)
Lines 1-3 Link Here
1
[% SET footerjs = 1 %]
1
[% BLOCK translate_label_types %]
2
[% BLOCK translate_label_types %]
2
[%  SWITCH type %]
3
[%  SWITCH type %]
3
[%   CASE 'BIB'    %]Biblio
4
[%   CASE 'BIB'    %]Biblio
Lines 10-45 Link Here
10
    [% INCLUDE 'doc-head-open.inc' %]
11
    [% INCLUDE 'doc-head-open.inc' %]
11
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Layouts &rsaquo; [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %]</title>
12
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Layouts &rsaquo; [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %]</title>
12
    [% INCLUDE 'doc-head-close.inc' %]
13
    [% INCLUDE 'doc-head-close.inc' %]
13
    <script type="text/JavaScript">
14
        //<![CDATA[
15
            $(document).ready(function() {
16
                $("input[name='layout_choice']").change( function() { layout_method() } );
17
                layout_method();
18
                $("#font").on("change",function(){
19
                     checkOblique();
20
                });
21
            });
22
            function layout_method() {
23
                if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
24
                    $('#layout_table').hide();
25
                    $('#layout_string').show();
26
                } else {
27
                    $('#layout_table').show();
28
                    $('#layout_string').hide();
29
                }
30
            }
31
            function checkOblique() {
32
                var font = document.getElementById("font");
33
                var selectedfont = font.options[font.selectedIndex].value;
34
                if ( selectedfont.match("I$") || selectedfont.match("O$") ) {
35
                    document.getElementById("oblique_title").disabled = true;
36
                } else {
37
                    document.getElementById("oblique_title").disabled = false;
38
                }
39
            }
40
        //]]>
41
    </script>
42
</head>
14
</head>
15
43
[% BLOCK translate_justification_types %]
16
[% BLOCK translate_justification_types %]
44
[%  SWITCH type %]
17
[%  SWITCH type %]
45
[%   CASE 'L' %]Left
18
[%   CASE 'L' %]Left
Lines 57-72 Link Here
57
        <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a> &rsaquo;
30
        <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a> &rsaquo;
58
        [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %]
31
        [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %]
59
    </div>
32
    </div>
60
    <div id="doc3" class="yui-t2">
33
61
        <div id="bd">
34
    <div class="main container-fluid">
62
            <div id="yui-main">
35
        <div class="row">
63
                <div class="yui-b">
36
            <div class="col-sm-10 col-sm-push-2">
64
                    <div class="yui-g">
37
                <main>
38
65
                    [% INCLUDE 'labels-toolbar.inc' %]
39
                    [% INCLUDE 'labels-toolbar.inc' %]
66
                        <div class="yui-u first">
67
40
68
                        </div>
69
                    </div>
70
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
41
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
71
                        <fieldset class="rows">
42
                        <fieldset class="rows">
72
                            <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] label layout</legend>
43
                            <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] label layout</legend>
Lines 207-216 Link Here
207
                            <input type="hidden" name="layout_id" value="[% layout_id %]" />
178
                            <input type="hidden" name="layout_id" value="[% layout_id %]" />
208
                        </fieldset>
179
                        </fieldset>
209
                    </form>
180
                    </form>
210
                </div>
181
            </main>
211
            </div>
182
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
212
            <div class="yui-b">
183
213
              [% INCLUDE 'tools-menu.inc' %]
184
        <div class="col-sm-2 col-sm-pull-10">
214
            </div>
185
            <aside>
215
        </div>
186
                [% INCLUDE 'tools-menu.inc' %]
216
        [% INCLUDE 'intranet-bottom.inc' %]
187
            </aside>
188
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
189
     </div> <!-- /.row -->
190
191
[% MACRO jsinclude BLOCK %]
192
    [% Asset.js("js/tools-menu.js") %]
193
    <script>
194
        $(document).ready(function() {
195
            $("input[name='layout_choice']").change( function() { layout_method() } );
196
            layout_method();
197
            $("#font").on("change",function(){
198
                 checkOblique();
199
            });
200
        });
201
        function layout_method() {
202
            if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
203
                $('#layout_table').hide();
204
                $('#layout_string').show();
205
            } else {
206
                $('#layout_table').show();
207
                $('#layout_string').hide();
208
            }
209
        }
210
        function checkOblique() {
211
            var font = document.getElementById("font");
212
            var selectedfont = font.options[font.selectedIndex].value;
213
            if ( selectedfont.match("I$") || selectedfont.match("O$") ) {
214
                document.getElementById("oblique_title").disabled = true;
215
            } else {
216
                document.getElementById("oblique_title").disabled = false;
217
            }
218
        }
219
    </script>
220
[% END %]
221
222
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-profile.tt (-51 / +56 lines)
Lines 1-41 Link Here
1
[% SET footerjs = 1 %]
1
    [% INCLUDE 'doc-head-open.inc' %]
2
    [% INCLUDE 'doc-head-open.inc' %]
2
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Profiles &rsaquo; [% IF ( profile_id ) %]Edit ([% profile_id %])[% ELSE %]New[% END%]</title>
3
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Profiles &rsaquo; [% IF ( profile_id ) %]Edit ([% profile_id %])[% ELSE %]New[% END%]</title>
3
    [% INCLUDE 'doc-head-close.inc' %]
4
    [% INCLUDE 'doc-head-close.inc' %]
4
	<script type="text/javascript">
5
        //<![CDATA[
6
		$(document).ready(function(){
7
		var selectedUnit = $("#units option:selected").attr("value");
8
		var unitfields = $("#offset_horz,#offset_vert,#creep_horz,#creep_vert");
9
		$(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
10
		$("#units").change(function(){
11
			$(".unit").html(getUnit($(this).val()));
12
		});
13
		function getUnit(unit){
14
			switch(unit){
15
				case "POINT":
16
					var unit = " pt";
17
					break;
18
				case "AGATE":
19
					var unit = " ag";
20
					break;
21
				case "INCH":
22
					var unit = " in";
23
					break;
24
				case "MM":
25
					var unit = " mm";
26
					break;
27
				case "CM":
28
					var unit = " cm";
29
					break;
30
				default:
31
					var unit = "";
32
			}
33
			return unit;
34
		}
35
		});
36
        //]]>
37
	</script>
38
</head>
5
</head>
6
39
<body id="labels_label-edit-profile" class="tools labels">
7
<body id="labels_label-edit-profile" class="tools labels">
40
    [% INCLUDE 'header.inc' %]
8
    [% INCLUDE 'header.inc' %]
41
    [% INCLUDE 'cat-search.inc' %]
9
    [% INCLUDE 'cat-search.inc' %]
Lines 46-61 Link Here
46
        <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Profiles</a> &rsaquo;
14
        <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Profiles</a> &rsaquo;
47
        [% IF ( profile_id ) %]Edit ([% profile_id %])[% ELSE %]New[% END%]
15
        [% IF ( profile_id ) %]Edit ([% profile_id %])[% ELSE %]New[% END%]
48
    </div>
16
    </div>
49
    <div id="doc3" class="yui-t2">
17
50
        <div id="bd">
18
    <div class="main container-fluid">
51
	    <div id="yui-main">
19
        <div class="row">
52
	        <div class="yui-b">
20
            <div class="col-sm-10 col-sm-push-2">
53
                    <div class="yui-g">
21
                <main>
22
54
                    [% INCLUDE 'labels-toolbar.inc' %]
23
                    [% INCLUDE 'labels-toolbar.inc' %]
55
                    </div>
56
                        <div class="yui-u first">
57
                            <h3>Edit printer profile</h3>
24
                            <h3>Edit printer profile</h3>
58
                                <div class="yui-g first">
59
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-profile.pl" method="get">
25
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-profile.pl" method="get">
60
                                    <fieldset class="rows"><legend>Profile settings</legend>
26
                                    <fieldset class="rows"><legend>Profile settings</legend>
61
                                        <ol>
27
                                        <ol>
Lines 138-149 Link Here
138
                                        <input type="hidden" name="profile_id" value="[% profile_id %]" />
104
                                        <input type="hidden" name="profile_id" value="[% profile_id %]" />
139
                                    </fieldset>
105
                                    </fieldset>
140
                    </form>
106
                    </form>
141
                                </div>
107
142
                            </div>
108
            </main>
143
                        </div>
109
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
144
                </div>
110
145
                <div class="yui-b">
111
        <div class="col-sm-2 col-sm-pull-10">
146
                  [% INCLUDE 'tools-menu.inc' %]
112
            <aside>
147
                </div>
113
                [% INCLUDE 'tools-menu.inc' %]
148
            </div>
114
            </aside>
149
            [% INCLUDE 'intranet-bottom.inc' %]
115
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
116
     </div> <!-- /.row -->
117
118
[% MACRO jsinclude BLOCK %]
119
    [% Asset.js("js/tools-menu.js") %]
120
    <script>
121
        $(document).ready(function(){
122
            var selectedUnit = $("#units option:selected").attr("value");
123
            var unitfields = $("#offset_horz,#offset_vert,#creep_horz,#creep_vert");
124
            $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
125
            $("#units").change(function(){
126
                $(".unit").html(getUnit($(this).val()));
127
            });
128
        });
129
        function getUnit(unit){
130
            switch(unit){
131
                case "POINT":
132
                    var unit = " pt";
133
                    break;
134
                case "AGATE":
135
                    var unit = " ag";
136
                    break;
137
                case "INCH":
138
                    var unit = " in";
139
                    break;
140
                case "MM":
141
                    var unit = " mm";
142
                    break;
143
                case "CM":
144
                    var unit = " cm";
145
                    break;
146
                default:
147
                    var unit = "";
148
            }
149
            return unit;
150
        }
151
    </script>
152
[% END %]
153
154
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt (-55 / +59 lines)
Lines 1-41 Link Here
1
[% SET footerjs = 1 %]
1
    [% INCLUDE 'doc-head-open.inc' %]
2
    [% INCLUDE 'doc-head-open.inc' %]
2
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Templates &rsaquo; [% IF ( template_id ) %]Edit ([% template_id %])[% ELSE %]New[% END %]</title>
3
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Templates &rsaquo; [% IF ( template_id ) %]Edit ([% template_id %])[% ELSE %]New[% END %]</title>
3
    [% INCLUDE 'doc-head-close.inc' %]
4
    [% INCLUDE 'doc-head-close.inc' %]
4
	<script type="text/javascript">
5
        //<![CDATA[
6
		$(document).ready(function(){
7
		var selectedUnit = $("#units option:selected").attr("value");
8
		var unitfields = $("#page_height,#page_width,#label_width,#label_height,#top_margin,#left_margin,#top_text_margin,#left_text_margin,#col_gap,#row_gap");
9
		$(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
10
		$("#units").change(function(){
11
			$(".unit").html(getUnit($(this).val()));
12
		});
13
		function getUnit(unit){
14
			switch(unit){
15
				case "POINT":
16
					var unit = " pt";
17
					break;
18
				case "AGATE":
19
					var unit = " ag";
20
					break;
21
				case "INCH":
22
					var unit = " in";
23
					break;
24
				case "MM":
25
					var unit = " mm";
26
					break;
27
				case "CM":
28
					var unit = " cm";
29
					break;
30
				default:
31
					var unit = "";
32
			}
33
			return unit;
34
		}
35
		});
36
        //]]>
37
	</script>
38
</head>
5
</head>
6
39
<body id="labels_label-edit-template" class="tools labels">
7
<body id="labels_label-edit-template" class="tools labels">
40
    [% INCLUDE 'header.inc' %]
8
    [% INCLUDE 'header.inc' %]
41
    [% INCLUDE 'cat-search.inc' %]
9
    [% INCLUDE 'cat-search.inc' %]
Lines 46-65 Link Here
46
        <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Templates</a> &rsaquo;
14
        <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Templates</a> &rsaquo;
47
        [% IF ( template_id ) %]Edit ([% template_id %])[% ELSE %]New[% END %]
15
        [% IF ( template_id ) %]Edit ([% template_id %])[% ELSE %]New[% END %]
48
    </div>
16
    </div>
49
    <div id="doc3" class="yui-t2">
17
50
        <div id="bd">
18
    <div class="main container-fluid">
51
            <div id="yui-main">
19
        <div class="row">
52
                <div class="yui-b">
20
            <div class="col-sm-10 col-sm-push-2">
53
                    <div class="yui-g">
21
                <main>
54
                    [% INCLUDE 'labels-toolbar.inc' %]
22
                    [% INCLUDE 'labels-toolbar.inc' %]
55
                        <div class="yui-u first">
56
23
57
                        </div>
24
                    <h3>Edit label template</h3>
58
                    </div>
59
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-template.pl" method="get">
25
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-template.pl" method="get">
60
                    <div class="yui-g">
26
                    <div class="row">
61
                        <h3>Edit label template</h3>
27
                        <div class="col-sm-6">
62
                        <div class="yui-u first">
63
                            <fieldset class="rows">
28
                            <fieldset class="rows">
64
                                <ol>
29
                                <ol>
65
                                    <li>
30
                                    <li>
Lines 119-125 Link Here
119
                                </ol>
84
                                </ol>
120
                            </fieldset>
85
                            </fieldset>
121
                        </div>
86
                        </div>
122
                        <div class="yui-u">
87
                        <div class="col-sm-6">
123
                            <fieldset class="rows">
88
                            <fieldset class="rows">
124
                                <ol><li>
89
                                <ol><li>
125
                                    <label for="top_margin">Top page margin:</label>
90
                                    <label for="top_margin">Top page margin:</label>
Lines 176-182 Link Here
176
                            </fieldset>
141
                            </fieldset>
177
                        </div>
142
                        </div>
178
                    </div>
143
                    </div>
179
                    <div class="yui-g">
180
                        <fieldset class="action">
144
                        <fieldset class="action">
181
                            <input type="submit" class="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Cancel</a>
145
                            <input type="submit" class="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Cancel</a>
182
                            <input type="hidden" name="op" value="save" />
146
                            <input type="hidden" name="op" value="save" />
Lines 184-195 Link Here
184
                            <input type="hidden" name="template_id" value="[% template_id %]" />
148
                            <input type="hidden" name="template_id" value="[% template_id %]" />
185
                            [% END %]
149
                            [% END %]
186
                        </fieldset>
150
                        </fieldset>
187
                    </div>
188
                </form>
151
                </form>
189
            </div>
152
190
        </div>
153
            </main>
191
        <div class="yui-b">
154
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
192
          [% INCLUDE 'tools-menu.inc' %]
155
193
        </div>
156
        <div class="col-sm-2 col-sm-pull-10">
194
    </div>
157
            <aside>
195
    [% INCLUDE 'intranet-bottom.inc' %]
158
                [% INCLUDE 'tools-menu.inc' %]
159
            </aside>
160
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
161
     </div> <!-- /.row -->
162
163
[% MACRO jsinclude BLOCK %]
164
    [% Asset.js("js/tools-menu.js") %]
165
    <script>
166
        $(document).ready(function(){
167
            var selectedUnit = $("#units option:selected").attr("value");
168
            var unitfields = $("#page_height,#page_width,#label_width,#label_height,#top_margin,#left_margin,#top_text_margin,#left_text_margin,#col_gap,#row_gap");
169
            $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
170
            $("#units").change(function(){
171
                $(".unit").html(getUnit($(this).val()));
172
            });
173
        });
174
        function getUnit(unit){
175
            switch(unit){
176
                case "POINT":
177
                    var unit = " pt";
178
                    break;
179
                case "AGATE":
180
                    var unit = " ag";
181
                    break;
182
                case "INCH":
183
                    var unit = " in";
184
                    break;
185
                case "MM":
186
                    var unit = " mm";
187
                    break;
188
                case "CM":
189
                    var unit = " cm";
190
                    break;
191
                default:
192
                    var unit = "";
193
            }
194
            return unit;
195
        }
196
    </script>
197
[% END %]
198
199
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt (-16 / +21 lines)
Lines 1-4 Link Here
1
[% USE Asset %]
1
[% USE Asset %]
2
[% SET footerjs = 1 %]
2
    [% INCLUDE 'doc-head-open.inc' %]
3
    [% INCLUDE 'doc-head-open.inc' %]
3
    <title>Koha &rsaquo; Tools &rsaquo; Label creator</title>
4
    <title>Koha &rsaquo; Tools &rsaquo; Label creator</title>
4
    [% INCLUDE 'doc-head-close.inc' %]
5
    [% INCLUDE 'doc-head-close.inc' %]
Lines 14-33 Link Here
14
        <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
15
        <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
15
        Label creator
16
        Label creator
16
    </div>
17
    </div>
17
    <div id="doc3" class="yui-t2">
18
        <div id="bd">
19
            <div id="yui-main">
20
                <div class="yui-b">
21
                    <div class="yui-g">
22
                    [% INCLUDE 'labels-toolbar.inc' %]
23
                        <div class="yui-u first">
24
18
25
                        </div>
19
<div class="main container-fluid">
26
                    </div>
20
    <div class="row">
27
                </div>
21
        <div class="col-sm-10 col-sm-push-2">
28
            </div>
22
            <main>
29
            <div class="yui-b">
23
                [% INCLUDE 'labels-toolbar.inc' %]
30
              [% INCLUDE 'tools-menu.inc' %]
24
            </main>
31
            </div>
25
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
32
        </div>
26
33
        [% INCLUDE 'intranet-bottom.inc' %]
27
        <div class="col-sm-2 col-sm-pull-10">
28
            <aside>
29
                [% INCLUDE 'tools-menu.inc' %]
30
            </aside>
31
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
32
     </div> <!-- /.row -->
33
34
[% MACRO jsinclude BLOCK %]
35
    [% Asset.js("js/tools-menu.js") %]
36
[% END %]
37
38
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt (-96 / +98 lines)
Lines 1-4 Link Here
1
[% USE Asset %]
1
[% USE Asset %]
2
[% SET footerjs = 1 %]
2
[% BLOCK translate_label_element %]
3
[% BLOCK translate_label_element %]
3
[%-  SWITCH element -%]
4
[%-  SWITCH element -%]
4
[%-  CASE 'layout'    -%]layout
5
[%-  CASE 'layout'    -%]layout
Lines 14-96 Link Here
14
    [% INCLUDE 'doc-head-open.inc' %]
15
    [% INCLUDE 'doc-head-open.inc' %]
15
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; [% PROCESS translate_label_element element=label_element_title %]</title>
16
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; [% PROCESS translate_label_element element=label_element_title %]</title>
16
    [% INCLUDE 'doc-head-close.inc' %]
17
    [% INCLUDE 'doc-head-close.inc' %]
17
    [% INCLUDE 'greybox.inc' %]
18
    <script type="text/javascript">
19
        //<![CDATA[
20
            function Xport() {
21
                batches= new Array;
22
                if(document.layouts.action.length > 0) {
23
                    for (var i=0; i < document.layouts.action.length; i++) {
24
                        if (document.layouts.action[i].checked) {
25
                            batches.push("batch_id=" +  document.layouts.action[i].value);
26
                        }
27
                    }
28
                    if (batches.length < 1) {
29
                        alert(_("Please select at least one batch to export."));
30
                        return;     // no batch selected
31
                    }
32
                    getstr = batches.join("&");
33
                }
34
                else if (document.layouts.action.checked) {
35
                    getstr = "batch_id="+document.layouts.action.value;
36
                }
37
                else {
38
                    alert(_("Please select at least one batch to export."));
39
                    return;     // no batch selected
40
                }
41
                return GB_showCenter(_("Export Labels"), "/cgi-bin/koha/labels/label-print.pl?" + getstr, 400, 800);
42
            };
43
            function selected_layout(op) {
44
                var selected = new Array;
45
                if (document.layouts.action.length) {
46
                    for (i=0;i<document.layouts.action.length;i++){
47
                        if (document.layouts.action[i].checked){
48
                            selected.push(i);
49
                        }
50
                    };
51
                    if (selected.length == 1) {
52
                        return(document.layouts.action[selected[0]].value);
53
                    }
54
                    else {
55
                        alert(_("Please select only one %s to %s.").format("[% label_element %]", op));
56
                        return (-1);
57
                    }
58
                }
59
                else {
60
                    if (document.layouts.action.checked){
61
                        return(document.layouts.action.value);
62
                    }
63
                };
64
                alert(_("Please select a %s.").format("[% label_element %]"));
65
                return (-1);
66
            };
67
            $(document).ready(function(){
68
                $("#print").click(function(e){
69
                    e.preventDefault();
70
                    Xport();
71
                });
72
                $(".delete").on("click", function(){
73
                    return confirmDelete( _("Are you sure you want to delete this?") );
74
                });
75
            });
76
        //]]>
77
    </script>
78
79
[% Asset.css("css/datatables.css") %]
18
[% Asset.css("css/datatables.css") %]
80
[% INCLUDE 'datatables.inc' %]
81
<script type="text/javascript" id="js">
82
 $(document).ready(function() {
83
    $("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
84
        "sPaginationType": "four_button",
85
        "aaSorting": [[ 1, "asc" ]],
86
        "aoColumnDefs": [
87
            { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
88
        ]
89
    }));
90
 });
91
</script>
92
93
</head>
19
</head>
20
94
<body id="labels_label-manage" class="tools labels">
21
<body id="labels_label-manage" class="tools labels">
95
    [% INCLUDE 'header.inc' %]
22
    [% INCLUDE 'header.inc' %]
96
    [% INCLUDE 'cat-search.inc' %]
23
    [% INCLUDE 'cat-search.inc' %]
Lines 100-112 Link Here
100
        <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> &rsaquo;
27
        <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> &rsaquo;
101
        [% PROCESS translate_label_element element=label_element_title %]
28
        [% PROCESS translate_label_element element=label_element_title %]
102
    </div>
29
    </div>
103
    <div id="doc3" class="yui-t2">
30
104
        <div id="bd">
31
    <div class="main container-fluid">
105
            <div id="yui-main">
32
        <div class="row">
106
                <div class="yui-b">
33
            <div class="col-sm-10 col-sm-push-2">
34
                <main>
35
107
                    [% INCLUDE 'labels-toolbar.inc' %]
36
                    [% INCLUDE 'labels-toolbar.inc' %]
108
                    <div class="yui-gc">
37
109
                        <div class="yui-u first" id="manage-label-layouts">
38
                        [% IF ( error ) %]
39
                            <div class="dialog alert">
40
                                <strong>WARNING:</strong> An error was encountered and the [% op %] operation for [% label_element %] [% element_id %] was not completed. Please have your system administrator check the error log for details.
41
                            </div>
42
                        [% END %]
43
44
                        <div id="manage-label-layouts">
110
                            <div class="hint">Current library: [% LoginBranchname %]</div>
45
                            <div class="hint">Current library: [% LoginBranchname %]</div>
111
                            [% IF ( table_loop ) %]
46
                            [% IF ( table_loop ) %]
112
                            <form name="layouts" action="/cgi-bin/koha/label-manage.pl?label_element=[% label_element %]">
47
                            <form name="layouts" action="/cgi-bin/koha/label-manage.pl?label_element=[% label_element %]">
Lines 176-193 Link Here
176
                            [% PROCESS translate_label_element element=label_element %].</p></div>
111
                            [% PROCESS translate_label_element element=label_element %].</p></div>
177
                            [% END %]
112
                            [% END %]
178
                        </div>
113
                        </div>
179
                        [% IF ( error ) %]
114
            </main>
180
                        <div class="yui-u">
115
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
181
                            <div class="dialog alert">
116
182
                                <strong>WARNING:</strong> An error was encountered and the [% op %] operation for [% label_element %] [% element_id %] was not completed. Please have your system administrator check the error log for details.
117
        <div class="col-sm-2 col-sm-pull-10">
183
                            </div>
118
            <aside>
184
                        </div>
119
                [% INCLUDE 'tools-menu.inc' %]
185
                        [% END %]
120
            </aside>
186
                    </div>
121
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
187
                </div>
122
     </div> <!-- /.row -->
188
            </div>
123
189
        <div class="yui-b">
124
[% MACRO jsinclude BLOCK %]
190
          [% INCLUDE 'tools-menu.inc' %]
125
    [% Asset.js("js/tools-menu.js") %]
191
        </div>
126
    [% INCLUDE 'greybox.inc' %]
192
        </div>
127
    [% INCLUDE 'datatables.inc' %]
193
    [% INCLUDE 'intranet-bottom.inc' %]
128
    <script>
129
        function Xport() {
130
            batches= new Array;
131
            if(document.layouts.action.length > 0) {
132
                for (var i=0; i < document.layouts.action.length; i++) {
133
                    if (document.layouts.action[i].checked) {
134
                        batches.push("batch_id=" +  document.layouts.action[i].value);
135
                    }
136
                }
137
                if (batches.length < 1) {
138
                    alert(_("Please select at least one batch to export."));
139
                    return;     // no batch selected
140
                }
141
                getstr = batches.join("&");
142
            }
143
            else if (document.layouts.action.checked) {
144
                getstr = "batch_id="+document.layouts.action.value;
145
            }
146
            else {
147
                alert(_("Please select at least one batch to export."));
148
                return;     // no batch selected
149
            }
150
            return GB_showCenter(_("Export Labels"), "/cgi-bin/koha/labels/label-print.pl?" + getstr, 400, 800);
151
        }
152
        function selected_layout(op) {
153
            var selected = new Array;
154
            if (document.layouts.action.length) {
155
                for (i=0;i<document.layouts.action.length;i++){
156
                    if (document.layouts.action[i].checked){
157
                        selected.push(i);
158
                    }
159
                };
160
                if (selected.length == 1) {
161
                    return(document.layouts.action[selected[0]].value);
162
                }
163
                else {
164
                    alert(_("Please select only one %s to %s.").format("[% label_element %]", op));
165
                    return (-1);
166
                }
167
            }
168
            else {
169
                if (document.layouts.action.checked){
170
                    return(document.layouts.action.value);
171
                }
172
            };
173
            alert(_("Please select a %s.").format("[% label_element %]"));
174
            return (-1);
175
        }
176
        $(document).ready(function(){
177
            $("#print").click(function(e){
178
                e.preventDefault();
179
                Xport();
180
            });
181
            $(".delete").on("click", function(){
182
                return confirmDelete( _("Are you sure you want to delete this?") );
183
            });
184
            $("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
185
                "sPaginationType": "four_button",
186
                "aaSorting": [[ 1, "asc" ]],
187
                "aoColumnDefs": [
188
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
189
                ]
190
            }));
191
        });
192
    </script>
193
[% END %]
194
195
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt (-17 / +21 lines)
Lines 1-25 Link Here
1
[% SET footerjs = 1 %]
1
    [% INCLUDE 'doc-head-open.inc' %]
2
    [% INCLUDE 'doc-head-open.inc' %]
2
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Label printing/exporting</title>
3
    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Label printing/exporting</title>
3
    [% INCLUDE 'doc-head-close.inc' popup => 1 %]
4
    [% INCLUDE 'doc-head-close.inc' popup => 1 %]
4
    <script type="text/javascript">
5
    <style>table {border-collapse: separate; border-spacing: 0; border: hidden none;} .header {cursor: auto; background-position: center center; background-repeat: repeat;}</style>
5
        //<![CDATA[
6
            function Done() {
7
                window.location = "[% referer %]";
8
            };
9
            $(document).ready(function(){
10
                $(".gb-close").on("click",function(){
11
                    parent.parent.GB_hide();
12
                });
13
            });
14
        //]]>
15
    </script>
16
    <style type="text/css">#custom-doc {width:47.23em; *width:46.04em; min-width:610px; margin:auto; margin-top:0.4em;}</style>
17
    <style type="text/css">table {border-collapse: separate; border-spacing: 0; border: hidden none;} .header {cursor: auto; background-position: center center; background-repeat: repeat;}</style>
18
</head>
6
</head>
7
19
<body id="labels_label-print" class="tools labels">
8
<body id="labels_label-print" class="tools labels">
20
    <div id="custom-doc" class="yui-t2">
9
    <div class="main container-fluid">
21
        <div id="bd">
10
        [% IF ( batches ) %]
22
            [% IF ( batches ) %]
23
            <form>
11
            <form>
24
                <h3>Click on the following links to download the exported batch(es).</h3>
12
                <h3>Click on the following links to download the exported batch(es).</h3>
25
                        [% FOREACH batche IN batches %]
13
                        [% FOREACH batche IN batches %]
Lines 107-110 Link Here
107
            </form>
95
            </form>
108
            [% END %]
96
            [% END %]
109
        </div>
97
        </div>
98
99
[% MACRO jsinclude BLOCK %]
100
    [% Asset.js("js/tools-menu.js") %]
101
    [% INCLUDE 'greybox.inc' %]
102
    <script>
103
        function Done() {
104
            window.location = "[% referer %]";
105
        };
106
        $(document).ready(function(){
107
            $(".gb-close").on("click",function(){
108
                parent.parent.GB_hide();
109
            });
110
        });
111
    </script>
112
[% END %]
113
110
[% INCLUDE 'popup-bottom.inc' %]
114
[% INCLUDE 'popup-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt (-49 / +51 lines)
Lines 1-56 Link Here
1
[% USE Asset %]
1
[% USE Asset %]
2
[% SET footerjs = 1 %]
2
    [% INCLUDE 'doc-head-open.inc' %]
3
    [% INCLUDE 'doc-head-open.inc' %]
3
    <title>Koha &rsaquo; Barcodes and labels &rsaquo; Search results</title>
4
    <title>Koha &rsaquo; Barcodes and labels &rsaquo; Search results</title>
4
    [% INCLUDE 'doc-head-close.inc' %]
5
    [% INCLUDE 'doc-head-close.inc' %]
5
    <style type="text/css">#custom-doc { width:46.23em;*width:45.04em;min-width:700px; margin:auto;margin-top: .4em; text-align:left; }</style>
6
    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
7
    <script type="text/javascript">
8
        //<![CDATA[
9
            $(document).ready(function(){
10
                $("#toolbar").fixFloat();
11
                $("#CheckAll").click(function(e){
12
                    e.preventDefault();
13
                    $("input[type='checkbox']").prop("checked",true);
14
                });
15
                $("#CheckNone").click(function(e){
16
                    e.preventDefault();
17
                    $("input[type='checkbox']").prop("checked",false);
18
                });
19
                $("#add_items").on("click",function(){
20
                    add_item('checked',[% batch_id %],'[% type %]');
21
                });
22
                $(".select_item").on("click",function(e){
23
                    e.preventDefault();
24
                    var batch_id = $(this).data("batch-id");
25
                    var itemnumber = $(this).data("item-number");
26
                    var type = $(this).data("field-type");
27
                    add_item(itemnumber, batch_id, type);
28
                });
29
            });
30
            function add_item(item_number,batch_id,type_id){
31
                var p = window.opener;
32
                if (item_number == 'checked') {
33
                    items= new Array;
34
                    if(document.resultform.action.length > 0) {
35
                        for (var i=0; i < document.resultform.action.length; i++) {
36
                            if (document.resultform.action[i].checked) {
37
                                p.add_item(document.resultform.action[i].value);
38
                            }
39
                        }
40
                    } else {
41
                        p.add_item(document.resultform.action.value);
42
                    }
43
                }
44
                else {
45
                    p.add_item(item_number);
46
                }
47
            }
48
            //]]>
49
    </script>
50
</head>
6
</head>
7
51
<body id="labels_result" class="tools labels">
8
<body id="labels_result" class="tools labels">
52
    <div id="custom-doc" class="yui-t7">
9
    <div class="main container-fluid">
53
        <div id="bd">
54
            <h1>Search results</h1>
10
            <h1>Search results</h1>
55
        <div class="results">
11
        <div class="results">
56
                [% IF ( displayprev || displaynext ) %]
12
                [% IF ( displayprev || displaynext ) %]
Lines 106-112 Link Here
106
                                            <th>Select</th>
62
                                            <th>Select</th>
107
                                        [% CASE %]
63
                                        [% CASE %]
108
                                            <th>[% header_field.field_label %]</th>
64
                                            <th>[% header_field.field_label %]</th>
109
z                                    [% END -%]
65
                                    [% END -%]
110
                                [% END %]
66
                                [% END %]
111
                            </tr>
67
                            </tr>
112
                        </thead>
68
                        </thead>
Lines 151-154 z [% END -%] Link Here
151
        <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
107
        <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
152
            [% END %]
108
            [% END %]
153
    </div>
109
    </div>
154
    [% INCLUDE 'popup-bottom.inc' %]
110
111
[% MACRO jsinclude BLOCK %]
112
    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
113
    <script>
114
        $(document).ready(function(){
115
            $("#toolbar").fixFloat();
116
            $("#CheckAll").click(function(e){
117
                e.preventDefault();
118
                $("input[type='checkbox']").prop("checked",true);
119
            });
120
            $("#CheckNone").click(function(e){
121
                e.preventDefault();
122
                $("input[type='checkbox']").prop("checked",false);
123
            });
124
            $("#add_items").on("click",function(){
125
                add_item('checked',[% batch_id %],'[% type %]');
126
            });
127
            $(".select_item").on("click",function(e){
128
                e.preventDefault();
129
                var batch_id = $(this).data("batch-id");
130
                var itemnumber = $(this).data("item-number");
131
                var type = $(this).data("field-type");
132
                add_item(itemnumber, batch_id, type);
133
            });
134
        });
135
        function add_item(item_number,batch_id,type_id){
136
            var p = window.opener;
137
            if (item_number == 'checked') {
138
                items= new Array;
139
                if(document.resultform.action.length > 0) {
140
                    for (var i=0; i < document.resultform.action.length; i++) {
141
                        if (document.resultform.action[i].checked) {
142
                            p.add_item(document.resultform.action[i].value);
143
                        }
144
                    }
145
                } else {
146
                    p.add_item(document.resultform.action.value);
147
                }
148
            }
149
            else {
150
                p.add_item(item_number);
151
            }
152
        }
153
    </script>
154
[% END %]
155
156
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt (-6 / +5 lines)
Lines 1-12 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo;  Labels</title>
2
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo;  Labels</title>
2
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'calendar.inc' %]
4
[% INCLUDE 'calendar.inc' %]
4
<style type="text/css">#custom-doc { width:47.23em;*width:46.04em;min-width:610px; margin:auto;margin-top: .4em; text-align:left; }</style>
5
</head>
5
</head>
6
<body id="labels_search" class="tools labels">
7
6
8
<div id="custom-doc" class="yui-t7">
7
<body id="labels_search" class="tools labels">
9
   <div id="bd">
8
    <div class="main container-fluid">
10
9
11
<h1>Search for items
10
<h1>Search for items
12
[% IF ( batch_id ) %]
11
[% IF ( batch_id ) %]
Lines 104-108 to add to Batch [% batch_id %] Link Here
104
<fieldset class="action"><input type="submit" value="Search" class="submit" /> <a class="cancel close" href="#">Cancel</a></fieldset>
103
<fieldset class="action"><input type="submit" value="Search" class="submit" /> <a class="cancel close" href="#">Cancel</a></fieldset>
105
</form>
104
</form>
106
</div>
105
</div>
107
</div>
106
108
[% INCLUDE 'popup-bottom.inc' %]
107
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-home.tt (-11 / +22 lines)
Lines 1-17 Link Here
1
[% USE Asset %]
2
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Tools &rsaquo; Quick spine label creator</title>
3
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Tools &rsaquo; Quick spine label creator</title>
2
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
3
</head>
5
</head>
6
4
<body id="labels_spinelabel-home" class="tools labels">
7
<body id="labels_spinelabel-home" class="tools labels">
5
[% INCLUDE 'header.inc' %]
8
[% INCLUDE 'header.inc' %]
6
[% INCLUDE 'cat-search.inc' %]
9
[% INCLUDE 'cat-search.inc' %]
7
10
8
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Quick spine label creator</div>
11
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Quick spine label creator</div>
9
12
10
<div id="doc3" class="yui-t2">
13
<div class="main container-fluid">
11
   
14
    <div class="row">
12
	<div id="bd">
15
        <div class="col-sm-10 col-sm-push-2">
13
		<div id="yui-main">
16
            <main>
14
			<div class="yui-b">
17
15
			<h2>Quick spine label creator</h2>
18
			<h2>Quick spine label creator</h2>
16
				<form action="/cgi-bin/koha/labels/spinelabel-print.pl" method="post">
19
				<form action="/cgi-bin/koha/labels/spinelabel-print.pl" method="post">
17
				<fieldset class="brief">
20
				<fieldset class="brief">
Lines 23-33 Link Here
23
				<fieldset class="action"><input type="submit" value="View spine label" /></fieldset>
26
				<fieldset class="action"><input type="submit" value="View spine label" /></fieldset>
24
				</fieldset>
27
				</fieldset>
25
				</form>
28
				</form>
26
			</div>
27
		</div>
28
       <div class="yui-b">
29
            [% INCLUDE 'tools-menu.inc' %]
30
        </div>
31
29
32
</div>
30
            </main>
31
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
32
33
        <div class="col-sm-2 col-sm-pull-10">
34
            <aside>
35
                [% INCLUDE 'tools-menu.inc' %]
36
            </aside>
37
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
38
     </div> <!-- /.row -->
39
40
[% MACRO jsinclude BLOCK %]
41
    [% Asset.js("js/tools-menu.js") %]
42
[% END %]
43
33
[% INCLUDE 'intranet-bottom.inc' %]
44
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt (-21 / +20 lines)
Lines 1-32 Link Here
1
[% USE Asset %]
1
[% USE Asset %]
2
[% SET footerjs = 1 %]
2
<!DOCTYPE html>
3
<!DOCTYPE html>
3
[% IF ( bidi ) %]<html lang="[% lang %]" dir="[% bidi %]">[% ELSE %]<html lang="[% lang %]">[% END %]
4
[% IF ( bidi ) %]<html lang="[% lang %]" dir="[% bidi %]">[% ELSE %]<html lang="[% lang %]">[% END %]
4
<head>
5
<head>
5
<title>Koha &rsaquo; Tools &rsaquo; Spine labels</title>
6
<title>Koha &rsaquo; Tools &rsaquo; Spine labels</title>
6
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
[% Asset.css("css/spinelabel.css") %]
8
[% Asset.css("css/spinelabel.css") %]
8
9
<style>
9
		<style type="text/css">
10
    @media print {
10
		@media print {
11
        .noprint { display: none; }
11
			.noprint { display: none; }
12
    }
12
		}
13
</style>
13
	</style>
14
[% IF ( IntranetUserCSS ) %]<style>[% IntranetUserCSS %]</style>[% END %]
14
[% IF ( IntranetUserCSS ) %]<style type="text/css">[% IntranetUserCSS %]</style>[% END %]
15
[% IF ( IntranetUserJS ) %]
16
    [% Asset.js("lib/jquery/jquery-2.2.3.min.js") %]
17
    [% Asset.js("lib/jquery/jquery-migrate-1.3.0.min.js") %]
18
    <script type="text/javascript">
19
    //<![CDATA[
20
    [% IntranetUserJS %]
21
    //]]>
22
    </script>
23
[% END %]
24
</head>
15
</head>
16
25
	[% IF ( BarcodeNotFound ) %]
17
	[% IF ( BarcodeNotFound ) %]
26
		<body id="labels_spinelabel-print" class="tools labels">
18
		<body id="labels_spinelabel-print" class="tools labels">
27
            <p>The barcode [% Barcode |html %] was not found.</p>
19
            <p>The barcode [% Barcode |html %] was not found.</p>
28
            <p><a href="spinelabel-home.pl">Return to spine label printer</a></p>
20
            <p><a href="spinelabel-home.pl">Return to spine label printer</a></p>
29
		</body>
30
	[% ELSE %]
21
	[% ELSE %]
31
		[% IF ( autoprint ) %]
22
		[% IF ( autoprint ) %]
32
            <body id="labels_spinelabel-print" class="tools labels" onload="window.print()">
23
            <body id="labels_spinelabel-print" class="tools labels" onload="window.print()">
Lines 37-44 Link Here
37
				[% content %]
28
				[% content %]
38
			</span>
29
			</span>
39
			<span id="print_button" class="noprint">
30
			<span id="print_button" class="noprint">
40
                <button onclick="window.print()">Print this label</button>
31
                <button onclick="window.print()">Print this slabel</button>
41
			</span>
32
			</span>
42
		</body>
43
	[% END %]
33
	[% END %]
44
</html>
34
35
[% IF ( IntranetUserJS ) %]
36
    [% Asset.js( "lib/jquery/jquery-2.2.3.min.js" ) %]
37
    [% Asset.js( "lib/jquery/jquery-migrate-1.3.0.min.js" ) %]
38
    <script>
39
        [% IntranetUserJS %]
40
    </script>
41
[% END %]
42
43
[% INCLUDE 'popup-bottom.inc' %]
44
45
- 

Return to bug 19709