Fixing nomenclature and tmpl_process3.pl bugs
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / value_builder / unimarc_field_4XX.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Cataloging &rsaquo; 4XX plugin</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 </head>
5 <body>
6 <!-- TMPL_IF NAME='fillinput' -->
7         <body>
8         <script language="javascript" type="text/javascript">
9
10             function go() {
11
12                 var index_start = "<!-- TMPL_VAR NAME='index' -->";
13                 var whichfield;
14                 try {
15                         whichfield = opener.opener.document.getElementById(index_start);
16                 } catch(e) {
17                         return;
18                 }
19                 
20                 // browse all its subfields
21
22                 var subfields = whichfield.parentNode.parentNode.getElementsByTagName('input');
23
24                 var re = /^tag_\d*_code_/;
25                 for(var i=0, len = subfields.length ; i< len ; i++) {
26                     if(subfields[i].getAttribute('name').match(re)){ // it s a subfield
27                         var code     = subfields[i];
28                         var subfield = subfields[i+1];
29                         
30                         if(code.value == '9'){
31                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_9" -->';
32                         }
33                         if(code.value == '0'){
34                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_0" -->';
35                         }
36                         if(code.value == 'a'){
37                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_a" -->';
38                         }
39                         if(code.value == 'c'){
40                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_c" -->';
41                         }
42                         if(code.value == 'd'){
43                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_d" -->';
44                         }
45                         if(code.value == 'e'){
46                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_e" -->';
47                         }
48                         if(code.value == 'h'){
49                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_h" -->';
50                         }
51                         if(code.value == 'i'){
52                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_i" -->';
53                         }
54                         if(code.value == 'p'){
55                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_p" -->';
56                         }
57                         if(code.value == 't'){
58                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_t" -->';
59                         }
60                         if(code.value == 'u'){
61                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_u" -->';
62                         }
63                         if(code.value == 'v'){
64                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_v" -->';
65                         }
66                         if(code.value == 'x'){
67                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_x" -->';
68                         }
69                         if(code.value == 'y'){
70                                 subfield.value = '<!-- TMPL_VAR NAME="subfield_value_y" -->';
71                         }
72                     }
73                 }
74                     return false;
75             }
76                 
77             window.onload = go();
78             opener.close();
79             window.close();
80         </script>
81         </body>
82 <!-- TMPL_ELSE -->
83         <body>
84                 <script type="text/javascript">
85                         
86 //                      document.getElementById('searchbox').focus();
87                 
88                         function report(value2report) {
89                             if (document.f_pop.result.value.length==0) {
90                                     document.f_pop.result.value = value2report;
91                             } else {
92                                     document.f_pop.result.value = document.f_pop.result.value+'|'+value2report;
93                             }
94                             return true;
95                         }
96                         function finish() {
97                             opener.document.f.field_value[<!-- TMPL_VAR name="index" -->].value= document.f_pop.result.value;
98                             self.close();
99                             return false;
100                         }
101                 </script>
102     </head>
103         <h1>KOHA : INTRANET : Catalogue </h1>
104         <!--TMPL_IF Name = "Search"-->
105                 <div id="unimarc_field_4XX_search">
106                 <h2> Search On  </h2>
107                 <form name="f" method="post" action="/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl">
108         
109                         <p>
110                                 <input type="hidden" name="plugin_name" value="unimarc_field_4XX.pl">
111                                 <input type="hidden" name="index" value="<!--TMPL_VAR Name="index" -->">
112                                 <input type="hidden" name="result" value="unimarc field 4 <!--TMPL_VAR Name="index" -->">
113                                 <input type="hidden" name="op" value="do_search">
114                                 <label class="label100" for="searchbox">Any word</label>
115                                 <input type="text" name="search" id="searchbox" size="35">
116                         </p>
117                         <p>
118                                 <input type="submit" value="Start search">
119                                 <input type="reset"  value="Clear All Fields">
120                         </p>
121         
122                 </div>
123         </form>
124         
125         <!--TMPL_ELSE-->
126         
127
128                 <h2>Search results</h2>
129                 <div id="unimarc_field_4XX_resultnumber">
130                         <p><!-- TMPL_IF NAME="displayprev" --> <a class="resultnumber" href="/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&amp;index=<!--TMPL_VAR Name="index"-->&amp;startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search">&lt;&lt; Previous</a><!-- /TMPL_IF -->
131                                 <!-- TMPL_LOOP NAME="numbers" --><!-- TMPL_IF NAME="highlight" --> <span class="highlight"><!-- TMPL_VAR NAME="number" --></span><!-- TMPL_ELSE --> <a class="resultnumber" href="/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&amp;index=<!--TMPL_VAR Name="index"-->&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search"><!-- TMPL_VAR NAME="number" --></a><!-- /TMPL_IF --><!-- /TMPL_LOOP --> <!-- TMPL_IF NAME="displaynext" --><a class="resultnumber" href="/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&amp;index=<!--TMPL_VAR Name="index"-->&amp;startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search">Next&gt;&gt;</a><!-- /TMPL_IF --></p>
132                         <p class="resultcount"><!-- TMPL_IF NAME="total" -->Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --><!-- TMPL_ELSE -->No results found.<!-- /TMPL_IF --></p></div>
133                 <div id="resultlist">
134                         <table>
135                                 <tr>
136                                         <th>Summary</th>
137                                         <th>Item Count</th>
138                                         <th>Location</th>
139                                         <th>&nbsp;</th>
140                                 </tr>
141                                 <!-- TMPL_LOOP NAME="result" -->
142                                 <tr>
143                                     <td<!-- TMPL_IF NAME="even" --> class="hilighted"<!-- /TMPL_IF -->>
144                                                             <!-- TMPL_IF name="MARC_ON" -->
145                                                                     <a_class="transparent resultlist" href="/cgi-bin/koha/MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" ESCAPE="HTML"--></a>
146                                                             <!-- TMPL_ELSE -->
147                                                                     <a_class="transparent resultlist" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" ESCAPE="HTML" --></a>                         <!-- /TMPL_IF -->
148                                                     <p><!-- TMPL_VAR NAME="author" -->
149                                                     <!-- TMPL_IF NAME="publishercode" -->- <!-- TMPL_VAR NAME="publishercode" --><!-- /TMPL_IF -->
150                                                     <!-- TMPL_IF NAME="place" --> ; <!-- TMPL_VAR NAME="place" --><!-- /TMPL_IF -->
151                                                     <!-- TMPL_IF NAME="pages" --> - <!-- TMPL_VAR NAME="pages" --><!-- /TMPL_IF -->
152                                                     <!-- TMPL_IF NAME="notes" --> : <!-- TMPL_VAR NAME="notes" --><!-- /TMPL_IF -->
153                                                     <!-- TMPL_IF NAME="size" --> ; <!-- TMPL_VAR NAME="size" --><!-- /TMPL_IF -->
154                                             </p>
155                                         </td>
156                                         <td align="center" <!-- TMPL_IF NAME="even" --> class="hilighted"<!-- /TMPL_IF -->>
157                                                 <!-- TMPL_VAR NAME="totitem" -->
158                                         </td>
159                                         <td <!-- TMPL_IF NAME="even" -->class="hilighted"<!-- /TMPL_IF -->>
160                                                 <!-- TMPL_VAR NAME="CN" -->
161                                         </td>
162                                         <td>
163                       <!--TMPL_IF Name="biblionumber"-->
164                                                 <a href="javascript:jumpfull('/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&index=<!--TMPL_VAR Name="index"-->&biblionumber=<!--TMPL_VAR Name="biblionumber"-->&type=intranet&op=fillinput')">Choose</a>
165                       <!--TMPL_ELSE-->
166                                                 <a href="javascript:jumpfull('/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&index=<!--TMPL_VAR Name="index"-->&type=intranet&op=fillinput')">Clear Field</a>
167                       <!--/TMPL_IF-->
168                                         </td>
169                                 </tr>
170                                 <!-- /TMPL_LOOP -->
171                         </table>
172                 </div>
173                 <div id="resultnumber">
174                         <p>
175                                 <!-- TMPL_IF NAME="displayprev" -->
176                                 <a class="resultnumber" href="/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&amp;index=<!--TMPL_VAR Name="index"-->&amp;startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search">
177                                         &lt;&lt; Previous
178                                 </a>
179                                 <!-- /TMPL_IF -->
180
181                                 <!-- TMPL_LOOP NAME="numbers" -->
182                                         <!-- TMPL_IF NAME="highlight" -->
183                                                 <span class="highlight">
184                                                         <!-- TMPL_VAR NAME="number" -->
185                                                 </span>
186                                         <!-- TMPL_ELSE -->
187                                                 <a class="resultnumber" href="/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&amp;index=<!--TMPL_VAR Name="index"-->&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search">
188                                                         <!-- TMPL_VAR NAME="number" -->
189                                                 </a>
190                                         <!-- /TMPL_IF -->
191                                 <!-- /TMPL_LOOP -->
192
193                                 <!-- TMPL_IF NAME="displaynext" -->
194                                 <a class="resultnumber" href="/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&amp;index=<!--TMPL_VAR Name="index"-->&amp;startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search">
195                                         Next&gt;&gt;
196                                 </a>
197                                 <!-- /TMPL_IF -->
198                         </p>
199                 </div>
200         
201                 <script language="JavaScript" type="text/javascript">
202                 
203                 function jumpfull(page){        
204                         window.open(page,'','fullscreen,scrollbars');
205                 }
206                 </script>
207                 
208         <!--/TMPL_IF-->
209
210 </body>
211 <!-- /TMPL_IF -->
212 </html>