Bug 19918: Close span tag in opac-registration-confirmation.tt
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / result.tt
1     [% INCLUDE 'doc-head-open.inc' %]
2     <title>Koha &rsaquo; Barcodes and labels &rsaquo; Search results</title>
3     [% INCLUDE 'doc-head-close.inc' %]
4     <style type="text/css">#custom-doc { width:46.23em;*width:45.04em;min-width:700px; margin:auto;margin-top: .4em; text-align:left; }</style>
5     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
6     <script type="text/javascript">
7         //<![CDATA[
8             $(document).ready(function(){
9                 $("#toolbar").fixFloat();
10                 $("#CheckAll").click(function(e){
11                     e.preventDefault();
12                     $("input[type='checkbox']").prop("checked",true);
13                 });
14                 $("#CheckNone").click(function(e){
15                     e.preventDefault();
16                     $("input[type='checkbox']").prop("checked",false);
17                 });
18                 $("#add_items").on("click",function(){
19                     add_item('checked',[% batch_id %],'[% type %]');
20                 });
21                 $(".select_item").on("click",function(e){
22                     e.preventDefault();
23                     var batch_id = $(this).data("batch-id");
24                     var itemnumber = $(this).data("item-number");
25                     var type = $(this).data("field-type");
26                     add_item(itemnumber, batch_id, type);
27                 });
28             });
29             function add_item(item_number,batch_id,type_id){
30                 var p = window.opener;
31                 if (item_number == 'checked') {
32                     items= new Array;
33                     if(document.resultform.action.length > 0) {
34                         for (var i=0; i < document.resultform.action.length; i++) {
35                             if (document.resultform.action[i].checked) {
36                                 p.add_item(document.resultform.action[i].value);
37                             }
38                         }
39                     } else {
40                         p.add_item(document.resultform.action.value);
41                     }
42                 }
43                 else {
44                     p.add_item(item_number);
45                 }
46             }
47             //]]>
48     </script>
49 </head>
50 <body id="labels_result" class="tools labels">
51     <div id="custom-doc" class="yui-t7">
52         <div id="bd">
53             <h1>Search results</h1>
54         <div class="results">
55                 [% IF ( displayprev || displaynext ) %]
56             <p>
57                     [% IF ( displayprev ) %]
58                     <a href="label-item-search.pl?startfrom=[% startfromprev %]&amp;ccl_query=[% ccl_query %]&amp;resultsperpage=[% resultsperpage %]&amp;op=do_search&amp;batch_id=[% batch_id %]">&lt;&lt;</a>
59                     [% END %]
60                     [% FOREACH number IN numbers %]
61                     <a href="label-item-search.pl?startfrom=[% number.startfrom %]&amp;ccl_query=[% ccl_query %]&amp;resultsperpage=[% resultsperpage %]&amp;op=do_search&amp;batch_id=[% batch_id %]">[% number.number %]</a>
62                     [% END %]
63                     [% IF ( displaynext ) %]
64                     <a href="label-item-search.pl?startfrom=[% startfromnext %]&amp;ccl_query=[% ccl_query %]&amp;resultsperpage=[% resultsperpage %]&amp;op=do_search&amp;batch_id=[% batch_id %]">&gt;&gt;</a>
65                     [% END %]
66         </p>
67                 [% END %]
68                 [% IF ( results ) %]
69                 <strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong>
70                 [% ELSE %]
71                 No results found
72                 [% END %]
73
74             <form name="resultform" action="">
75             <div id="toolbar" class="btn-toolbar">
76                 <div class="btn-group"><button type="button" class="btn btn-default btn-sm" id="add_items"><i class="fa fa-plus"></i> Add checked</button></div>
77                 <div class="btn-group"><a href="#" class="btn btn-default btn-sm close"><i class="fa fa-times-circle"></i> Done</a></div>
78             </div>
79                 <div><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a> <a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></div>
80
81                 <div id="label-search-results">
82                 <input type="hidden" name="ccl_query" value="[% ccl_query %]" />
83             [% FOREACH result_se IN result_set %]
84             <div style="border-bottom:1px solid #CCC;padding:1em 0;">
85                     <h4>[% result_se.title |html %]</h4>
86                             <p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %]
87                             [[% result_se.itemtype %]], [% IF ( result_se.publishercode ) %][% result_se.publishercode %] [% END %][% IF ( result_se.place ) %][% result_se.place %] [% END %][% IF ( result_se.copyrightdate ) %][% result_se.copyrightdate %], [% END %][% IF ( result_se.pages ) %][% result_se.pages %][% END %][% IF ( result_se.isbn ) %], <b>ISBN: </b>[% result_se.isbn %][% END %][% IF ( result_se.notes ) %],<br />[% result_se.notes %][% END %]</p>
88
89                     <table>
90                     [% FOREACH item_tabl IN result_se.item_table %]
91                     [% IF ( item_tabl.header_fields ) %]
92                         <thead>
93                             <tr>
94                                 [% FOREACH header_field IN item_tabl.header_fields %]
95                                     [% SWITCH header_field.field_label -%]
96                                         [% CASE "Add Item" -%]
97                                             <th>Add item</th>
98                                         [% CASE "Call Number" -%]
99                                             <th>Call number</th>
100                                         [% CASE "Accession Date" %]
101                                             <th>Accession date</th>
102                                         [% CASE "Barcode" %]
103                                             <th>Barcode</th>
104                                         [% CASE "Select" -%]
105                                             <th>Select</th>
106                                         [% CASE %]
107                                             <th>[% header_field.field_label %]</th>
108 z                                    [% END -%]
109                                 [% END %]
110                             </tr>
111                         </thead>
112                     [% ELSE %]
113                     <tr>
114                     [% FOREACH text_field IN item_tabl.text_fields %]
115                     [% IF ( text_field.select_field ) %]
116                         <td><input type="checkbox" name="action" value="[% text_field.field_value %]"></td>
117                     [% ELSIF ( text_field.link_field ) %]
118                         <td>
119                             <a class="btn btn-default btn-xs select_item" data-item-number="[% text_field.field_value %]" data-batch-id="[% batch_id %]" data-field-type="[% text_field.type %]"><i class="fa fa-plus"></i> Add</a>
120                         </td>
121                     [% ELSE %]
122                         <td>[% text_field.field_value %]</td>
123                     [% END %]
124                     [% END %]
125                     </tr>
126                     [% END %]
127                     [% END %]
128                     </table>
129                     </div>
130             [% END %]
131                 </div>
132             </form>
133         </div>
134         [% IF ( displayprev || displaynext ) %]
135             <p>
136                 [% IF ( displayprev ) %]
137                 <a href="label-item-search.pl?startfrom=[% startfromnext %]&amp;ccl_query=[% ccl_query %]&amp;resultsperpage=[% resultsperpage %]&amp;op=do_search&amp;batch_id=[% batch_id %]">&lt;&lt;</a>
138                 [% END %]
139                 [% FOREACH number IN numbers %]
140                 [% IF ( number.highlight ) %]
141                 <span class="current">[% number.number %]</span>
142                 [% ELSE %]
143                 <a href="label-item-search.pl?startfrom=[% number.startfrom %]&amp;ccl_query=[% number.ccl_query %]&amp;resultsperpage=[% number.resultsperpage %]&amp;op=do_search&amp;batch_id=[% number.batch_id %]">[% number.number %]</a>
144                 [% END %]
145         [% END %]
146                 [% IF ( displaynext ) %]
147                 <a href="label-item-search.pl?startfrom=[% startfromnext %]&amp;ccl_query=[% ccl_query %]&amp;resultsperpage=[% resultsperpage %]&amp;op=do_search&amp;batch_id=[% batch_id %]">&gt;&gt;</a>
148                 [% END %]
149         </p>
150         <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
151             [% END %]
152     </div>
153     [% INCLUDE 'popup-bottom.inc' %]