Bug 5917 / Bug 6085 : Fixing not being able to change language
[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="[% themelang %]/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 getstr='';
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                                 items.push("item_number=" +  document.resultform.action[i].value);
26                             }
27                         }
28                         getstr = items.join("&");
29                     } else {
30                         getstr = "item_number="+document.resultform.action.value;
31                     }
32                 }
33                 else {
34                     getstr = "item_number="+item_number;
35                 }
36                 var myurl = "label-edit-batch.pl?op=add&batch_id="+batch_id+
37                 "&"+getstr;
38                 window.opener.location.href = myurl;
39                 //top.location.href=myurl;
40             }
41             //]]>
42     </script>
43 </head>
44 <body>
45     <div id="custom-doc" class="yui-t7">
46         <div id="bd">
47             <h1>Search results</h1>
48             <div class="results">
49                 [% IF ( displayprev || displaynext ) %]
50                 <p>
51                     [% IF ( displayprev ) %]
52                     <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>
53                     [% END %]
54                     [% FOREACH number IN numbers %]
55                     <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>
56                     [% END %]
57                     [% IF ( displaynext ) %]
58                     <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>
59                     [% END %]
60                 </p>
61                 [% END %]
62                 [% IF ( results ) %]
63                 <strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong>
64                 [% ELSE %]
65                 No results found
66                 [% END %]
67             </div>
68
69             <form name="resultform" class="checkboxed" action="">
70             <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;" />
71                     <input type="button" class="close" value="Done" /></p>
72
73                 <div id="label-search-results">
74                 <input type="hidden" name="ccl_query" value="[% ccl_query %]" />
75             [% FOREACH result_se IN result_set %]
76             <div style="border-bottom:1px solid #CCC;margin: .5em 0;">
77                             <h4>[% result_se.title |html %]</h4>
78                             <p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %]
79                             [[% 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>
80
81                     <table style="margin-bottom:1em;">
82                     [% FOREACH item_tabl IN result_se.item_table %]
83                     [% IF ( item_tabl.header_fields ) %]
84                     <tr>
85                     [% FOREACH header_field IN item_tabl.header_fields %]
86                         <th>[% header_field.field_label %]</th>
87                     [% END %]
88                     </tr>
89                     [% ELSE %]
90                     <tr>
91                     [% FOREACH text_field IN item_tabl.text_fields %]
92                     [% IF ( text_field.select_field ) %]
93                         <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]"></td>
94                     [% ELSIF ( text_field.link_field ) %]
95                         <td align="center">
96                             <a onclick="add_item('[% text_field.field_value %]',[% text_field.batch_id %], '[% text_field.type %]'); return false" href="/cgi-bin/koha/barcodes/label-edit-batch.pl?op=add&amp;batch_id=[% text_field.batch_id %]&amp;item_number=[% text_field.field_value %]">Add</a>
97                         </td>
98                     [% ELSE %]
99                         <td align="center">[% text_field.field_value %]</td>
100                     [% END %]
101                     [% END %]
102                     </tr>
103                     [% END %]
104                     [% END %]
105                     </table>
106                     </div>
107                 [% END %]
108                 </div>
109             </form>
110         </div>
111         <div class="results">
112             [% IF ( displayprev || displaynext ) %]
113             <p>
114                 [% IF ( displayprev ) %]
115                 <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>
116                 [% END %]
117                 [% FOREACH number IN numbers %]
118                 [% IF ( number.highlight ) %]
119                 <span class="current">[% number.number %]</span>
120                 [% ELSE %]
121                 <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>
122                 [% END %]
123                 [% END %]
124                 [% IF ( displaynext ) %]
125                 <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>
126                 [% END %]
127             </p>
128             [% END %]
129         </div>
130     [% INCLUDE 'intranet-bottom.inc' %]