Bug 20731: Move template JavaScript to the footer: Call number browser MARC plugin
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / value_builder / unimarc_field_210c.tt
1 [% PROCESS 'authorities-search-results.inc' %]
2 [% SET footerjs = 1 %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>UNIMARC field 210c builder</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 </head>
7
8 <body id="cat_unimarc_field_210c" class="cat" style="padding:1em;">
9 <h3>UNIMARC field 210c builder</h3>
10     <h4>Search for authority type: EDITORS</h4>
11         <form name="f" method="post" action="plugin_launcher.pl">
12         <fieldset class="rows">
13             <input type="hidden" name="plugin_name" value="unimarc_field_210c.pl" />
14             <input type="hidden" name="op" value="do_search" />
15             <input type="hidden" name="type" value="intranet" />
16             <input type="hidden" name="nbstatements" value="[% nbstatements %]" />
17             <input type="hidden" name="index" value="[% index %]" />
18             <input type="hidden" name="authtypecode" value="EDITORS" />
19             <input type="hidden" name="q" value="[% index %]" />
20             <input type="hidden" name="marclist" value="all" />
21             <input type="hidden" name="and_or" value="and" />
22             <input type="hidden" name="excluding" value="" />
23                  <ol>
24                     <li>
25                                         <select name="orderby" id="orderby">
26                                 <option value="">None</option>
27                                 <option value="HeadingAsc" selected="selected">Heading A-Z</option>
28                                 <option value="HeadingDsc">Heading Z-A</option>
29                                 </select>
30                                         <select name="operator" id="operator">
31                                     <option value="contains">contains</option>
32                                     <option value="start">starts with</option>
33                                     <option value="is">is exactly</option>
34                                 </select>
35                     <input type="text" id="value" name="value" value="[% resultstring %]" />
36                     </li>
37                 </ol>
38                 </fieldset>
39                 <fieldset class="action">
40                 <input type="submit" value="Search" />
41                 </fieldset>
42         </form>
43             [% IF ( total ) %]
44             <h3>Authority search results</h3>
45             <div class="pages">
46                           [% pagination_bar %]      
47                         </div>[% END %]
48             <p>
49                 [% IF ( total ) %]
50                     &nbsp;<b>Results [% from %] to [% to %] of [% total %]</b><br /><br />
51                 [% ELSE %]
52                     &nbsp; No results found<br />
53                 [% END %]
54             </p>
55 [% IF ( total ) %]
56         <div id="resultlist">
57             <table>
58                 <tr>
59                     <th>Summary</th>
60                     <th>Used</th>
61                     <th>Get it!</th>
62                 </tr>
63                 [% FOREACH resul IN result %]
64                     <tr>
65                         <td>[% PROCESS authresult summary=resul.summary %]</td>
66                         <td>[% resul.used %] times</td>
67                         <td>
68                 [% IF ( resul.to_report ) %]
69                             <a href="javascript:report('[% resul.to_report |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]')"><img alt="choose" src="[% interface %]/[% theme %]/images/arrow.gif" width="32" /></a>
70                 [% END %]
71                         </td>
72                     </tr>
73                 [% END %]
74             </table>
75         </div>
76 [% END %]
77
78             [% IF ( total ) %]<div class="pages">
79                           [% pagination_bar %]      
80                         </div>
81             [% END %]
82
83 [% MACRO jsinclude BLOCK %]
84     <script type="text/javascript">
85         function report(summary){
86             var doc   = opener.document;
87             var field = doc.getElementById('[% index %]');
88
89             field.value = summary;
90             self.close();
91         }
92     </script>
93 [% END %]
94
95 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]