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

(-)a/koha-tmpl/intranet-tmpl/prog/css/spinelabel.css (-3 / +11 lines)
Lines 20-27 body { Link Here
20
	top: 75px;
20
	top: 75px;
21
}
21
}
22
22
23
#spinelabel {
24
25
}
26
23
#print_button {
27
#print_button {
24
	position: absolute;
28
    bottom: 0;
25
	top: 25px;
29
    padding: 1em;
26
	left: 500px;
30
    position: absolute;
31
    text-align: center;
32
    width: 100%;
33
    border-top: 1px solid #b9d8d9;
34
    background-color: #e6f0f2;
27
}
35
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-5 / +11 lines)
Lines 209-218 Link Here
209
                [% IF materials %]<th>Materials specified</th>[% END %]
209
                [% IF materials %]<th>Materials specified</th>[% END %]
210
                [% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %]
210
                [% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %]
211
                [% IF ( itemdata_nonpublicnotes ) %]<th>Non-public notes</th>[% END %]
211
                [% IF ( itemdata_nonpublicnotes ) %]<th>Non-public notes</th>[% END %]
212
                [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine label</th>[% END %]
213
                [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
212
                [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
214
                [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
213
                [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
215
                [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %]
214
                [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %]
215
                [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th class="NoSort">Spine label</th>[% END %]
216
                [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort">&nbsp;</th>[% END %]
216
                [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort">&nbsp;</th>[% END %]
217
            </tr>
217
            </tr>
218
        </thead>
218
        </thead>
Lines 365-373 Link Here
365
                    [% IF itemdata_nonpublicnotes %]
365
                    [% IF itemdata_nonpublicnotes %]
366
                        <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td>
366
                        <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td>
367
                    [% END %]
367
                    [% END %]
368
                    [% IF ( SpineLabelShowPrintOnBibDetails ) %]
369
                        <td><a href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% item.barcode | uri %]" >Print label</a></td>
370
                    [% END %]
371
                    [% IF ( hostrecords ) %]
368
                    [% IF ( hostrecords ) %]
372
                        <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td>
369
                        <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td>
373
                    [% END %]
370
                    [% END %]
Lines 400-405 Link Here
400
                       [% END %]
397
                       [% END %]
401
                    </td>
398
                    </td>
402
                [% END %]
399
                [% END %]
400
401
                [% IF ( SpineLabelShowPrintOnBibDetails ) %]
402
                    <td><a class="btn btn-default btn-xs print-label" href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% item.barcode | uri %]"><i class="fa fa-print"></i> Print label</a></td>
403
                [% END %]
404
403
                [% IF CAN_user_editcatalogue_edit_items %]
405
                [% IF CAN_user_editcatalogue_edit_items %]
404
                    <td class="actions">
406
                    <td class="actions">
405
                        [% UNLESS item.cannot_be_edited %]
407
                        [% UNLESS item.cannot_be_edited %]
Lines 937-943 Link Here
937
                    }
939
                    }
938
                 });
940
                 });
939
             [% END %]
941
             [% END %]
940
942
             $(".print-label").on("click", function(e){
943
                e.preventDefault();
944
                link = $(this).attr("href");
945
                openWindow(link,"Print spine label",400,400);
946
             });
941
        });
947
        });
942
948
943
        [% IF ( AmazonCoverImages || LocalCoverImages ) %]$(window).load(function() {
949
        [% IF ( AmazonCoverImages || LocalCoverImages ) %]$(window).load(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-home.tt (-1 / +11 lines)
Lines 17-23 Link Here
17
            <main>
17
            <main>
18
18
19
			<h2>Quick spine label creator</h2>
19
			<h2>Quick spine label creator</h2>
20
				<form action="/cgi-bin/koha/labels/spinelabel-print.pl" method="post">
20
                <form action="/cgi-bin/koha/labels/spinelabel-print.pl" method="post" id="spinelabelprint">
21
				<fieldset class="brief">
21
				<fieldset class="brief">
22
				<ol>
22
				<ol>
23
					<li><label for="barcode">Barcode: </label>
23
					<li><label for="barcode">Barcode: </label>
Lines 40-45 Link Here
40
40
41
[% MACRO jsinclude BLOCK %]
41
[% MACRO jsinclude BLOCK %]
42
    [% Asset.js("js/tools-menu.js") | $raw %]
42
    [% Asset.js("js/tools-menu.js") | $raw %]
43
    <script>
44
        $(document).ready(function(){
45
            $("#spinelabelprint").on("submit", function(e){
46
                e.preventDefault();
47
                var params = $(this).serialize();
48
                openWindow("/cgi-bin/koha/labels/spinelabel-print.pl?" + params,"Print spine label",400,400);
49
                $("#barcode").val("").focus();
50
            });
51
        });
52
    </script>
43
[% END %]
53
[% END %]
44
54
45
[% INCLUDE 'intranet-bottom.inc' %]
55
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt (-14 / +17 lines)
Lines 1-11 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% SET footerjs = 1 %]
3
[% SET footerjs = 1 %]
4
<!DOCTYPE html>
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% IF ( bidi ) %]<html lang="[% lang | html %]" dir="[% bidi | html %]">[% ELSE %]<html lang="[% lang | html %]">[% END %]
6
<head>
7
<title>Koha &rsaquo; Tools &rsaquo; Spine labels</title>
5
<title>Koha &rsaquo; Tools &rsaquo; Spine labels</title>
8
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
[% INCLUDE 'doc-head-close.inc' popup => 1 %]
9
[% Asset.css("css/spinelabel.css") | $raw %]
7
[% Asset.css("css/spinelabel.css") | $raw %]
10
<style>
8
<style>
11
    @media print {
9
    @media print {
Lines 20-43 Link Here
20
            <p>The barcode [% Barcode | html %] was not found.</p>
18
            <p>The barcode [% Barcode | html %] was not found.</p>
21
            <p><a href="spinelabel-home.pl">Return to spine label printer</a></p>
19
            <p><a href="spinelabel-home.pl">Return to spine label printer</a></p>
22
	[% ELSE %]
20
	[% ELSE %]
23
		[% IF ( autoprint ) %]
24
            <body id="labels_spinelabel-print" class="tools labels" onload="window.print()">
25
		[% ELSE %]	
26
            <body id="labels_spinelabel-print" class="tools labels">
21
            <body id="labels_spinelabel-print" class="tools labels">
27
		[% END %] 
22
            <div id="spinelabel">
28
			<span id="spinelabel" class="label">
29
				[% content | $raw %]
23
				[% content | $raw %]
30
			</span>
24
            </div>
31
			<span id="print_button" class="noprint">
25
            <div id="print_button" class="noprint">
32
                <button onclick="window.print()">Print this label</button>
26
                <button class="btn btn-default print-label" onclick="window.print()"><i class="fa fa-print"></i> Print this label</button>
33
			</span>
27
            </div>
34
	[% END %]
28
	[% END %]
35
29
36
[% IF ( IntranetUserJS ) %]
30
[% IF ( IntranetUserJS ) %]
37
    [% Asset.js( "lib/jquery/jquery-2.2.3.min.js" ) | $raw %]
31
    [% Asset.js( "lib/jquery/jquery-2.2.3.min.js" ) | $raw %]
38
    [% Asset.js( "lib/jquery/jquery-migrate-1.3.0.min.js" ) | $raw %]
32
    [% Asset.js( "lib/jquery/jquery-migrate-1.3.0.min.js" ) | $raw %]
33
    [% IF ( autoprint ) %]
34
        [% INCLUDE 'slip-print.inc' #printThenClose %]
35
    [% END %]
39
    <script>
36
    <script>
40
        [% IntranetUserJS | $raw %]
37
        [% IntranetUserJS | $raw %]
38
        $(document).ready(function(){
39
            $(".print-label").on("click", function(e){
40
                e.preventDefault();
41
                window.print();
42
                window.close();
43
            });
44
        });
41
    </script>
45
    </script>
42
[% END %]
46
[% END %]
43
47
44
- 

Return to bug 23464