Bug 14915: (QA followup) Switch recent commits from Glyphicons to Font Awesome
[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.checkboxes.min.js"></script>
6     <script type="text/javascript">
7         //<![CDATA[
8             $(document).ready(function(){
9                 $("#CheckAll").click(function(){
10                     $(".checkboxed").checkCheckboxes();
11                     return false;
12                 });
13                 $("#CheckNone").click(function(){
14                     $(".checkboxed").unCheckCheckboxes();
15                     return false;
16                 });
17             });
18             function add_item(item_number,batch_id,type_id){
19                 var p = window.opener;
20                 if (item_number == 'checked') {
21                     items= new Array;
22                     if(document.resultform.action.length > 0) {
23                         for (var i=0; i < document.resultform.action.length; i++) {
24                             if (document.resultform.action[i].checked) {
25                                 p.add_item(document.resultform.action[i].value);
26                             }
27                         }
28                     } else {
29                         p.add_item(document.resultform.action.value);
30                     }
31                 }
32                 else {
33                     p.add_item(item_number);
34                 }
35             }
36             //]]>
37     </script>
38 </head>
39 <body id="labels_result" class="tools labels">
40     <div id="custom-doc" class="yui-t7">
41         <div id="bd">
42             <h1>Search results</h1>
43             <div class="results">
44                 [% IF ( displayprev || displaynext ) %]
45                 <p>
46                     [% IF ( displayprev ) %]
47                     <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>
48                     [% END %]
49                     [% FOREACH number IN numbers %]
50                     <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>
51                     [% END %]
52                     [% IF ( displaynext ) %]
53                     <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>
54                     [% END %]
55                 </p>
56                 [% END %]
57                 [% IF ( results ) %]
58                 <strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong>
59                 [% ELSE %]
60                 No results found
61                 [% END %]
62             </div>
63
64             <form name="resultform" class="checkboxed" action="">
65             <p><a id="CheckAll" href="#">Select all</a> <a id="CheckNone" href="#">Clear all</a> | <input type="button" value="Add checked" onclick="add_item('checked',[% batch_id %],'[% type %]'); return false;" />
66                     <input type="button" class="close" value="Done" /></p>
67
68                 <div id="label-search-results">
69                 <input type="hidden" name="ccl_query" value="[% ccl_query %]" />
70             [% FOREACH result_se IN result_set %]
71             <div style="border-bottom:1px solid #CCC;margin: .5em 0;">
72                             <h4>[% result_se.title |html %]</h4>
73                             <p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %]
74                             [[% 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>
75
76                     <table style="margin-bottom:1em;">
77                     [% FOREACH item_tabl IN result_se.item_table %]
78                     [% IF ( item_tabl.header_fields ) %]
79                     <tr>
80                     [% FOREACH header_field IN item_tabl.header_fields %]
81                         <th>[% header_field.field_label %]</th>
82                     [% END %]
83                     </tr>
84                     [% ELSE %]
85                     <tr>
86                     [% FOREACH text_field IN item_tabl.text_fields %]
87                     [% IF ( text_field.select_field ) %]
88                         <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]"></td>
89                     [% ELSIF ( text_field.link_field ) %]
90                         <td align="center">
91                             <a onclick="add_item('[% text_field.field_value %]',[% batch_id %], '[% text_field.type %]'); return false" href="/cgi-bin/koha/barcodes/label-edit-batch.pl?op=add&amp;batch_id=[% batch_id %]&amp;item_number=[% text_field.field_value %]">Add</a>
92                         </td>
93                     [% ELSE %]
94                         <td align="center">[% text_field.field_value %]</td>
95                     [% END %]
96                     [% END %]
97                     </tr>
98                     [% END %]
99                     [% END %]
100                     </table>
101                     </div>
102                 [% END %]
103                 </div>
104             </form>
105         </div>
106         <div class="results">
107             [% IF ( displayprev || displaynext ) %]
108             <p>
109                 [% IF ( displayprev ) %]
110                 <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>
111                 [% END %]
112                 [% FOREACH number IN numbers %]
113                 [% IF ( number.highlight ) %]
114                 <span class="current">[% number.number %]</span>
115                 [% ELSE %]
116                 <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>
117                 [% END %]
118                 [% END %]
119                 [% IF ( displaynext ) %]
120                 <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>
121                 [% END %]
122             </p>
123             [% END %]
124         </div>
125     [% INCLUDE 'popup-bottom.inc' %]