Bug 5895: Translation error in German fast add framework
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / guided_reports_start.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Reports &rsaquo; Guided Reports Wizard 
3 <!-- TMPL_IF    NAME="saved1"  -->&rsaquo; Saved Reports
4 <!-- TMPL_ELSIF NAME="create"  -->&rsaquo; Create from SQL
5 <!-- TMPL_ELSIF NAME="showsql" -->&rsaquo; Saved Reports &rsaquo; SQL View
6 <!-- TMPL_ELSIF NAME="execute" -->&rsaquo; Saved Reports &rsaquo; <!-- TMPL_VAR NAME="name" --> Report
7 <!-- TMPL_ELSIF NAME="buildx"  -->&rsaquo; Build A Report, Step <!-- TMPL_VAR NAME="buildx" --> of 6:
8 <!-- TMPL_IF    NAME="build1" -->Choose a Module
9 <!-- TMPL_ELSIF NAME="build2" -->Pick a Report Type
10 <!-- TMPL_ELSIF NAME="build3" -->Select Columns for Display
11 <!-- TMPL_ELSIF NAME="build4" -->Select Criteria to Limit on
12 <!-- TMPL_ELSIF NAME="build5" -->Pick which columns to total
13 <!-- TMPL_ELSIF NAME="build6" -->Select how you want the report ordered
14 <!-- /TMPL_IF -->
15 <!-- /TMPL_IF -->
16 </title>
17 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
18 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
19 <style type="text/css">
20     #sql { width: 90%; height: 9em;}
21 </style>
22 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
23 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
24
25 <script type="text/javascript">
26 //<![CDATA[
27 $(document).ready(function(){
28 <!-- TMPL_IF NAME="showsql" -->
29     $("#sql").focus(function() {
30         $(this).select();
31     });
32 <!-- /TMPL_IF -->
33 <!-- TMPL_IF NAME="saved1" -->
34     $(".confirmdelete").click(function(){
35         $(this).parents('tr').attr("class","warn");
36         if(confirm("Are you sure you want to "+$(this).attr("title")+"?")){
37             return true;
38         } else {
39             $(this).parents('tr').attr("class","");
40             return false;
41         }
42     });
43 <!-- /TMPL_IF -->
44   // call the tablesorter plugin
45   $("#table_reports").tablesorter({
46     sortList: [[1,0]],
47     headers: {
48        6: { sorter: false},
49        7: { sorter: false},
50        8: { sorter: false},
51        9: { sorter: false},
52       10: { sorter: false}
53     }
54   }).tablesorterPager({
55     container:     $("#pagertable_reports"),
56     positionFixed: false,
57     size:          50
58   });
59 });
60 //]]>
61 </script>
62 </head>
63 <body>
64 <!-- TMPL_INCLUDE NAME="header.inc" -->
65 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
66
67 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
68 &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
69 &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a>
70 &rsaquo; 
71 <!-- TMPL_IF NAME="saved1"  -->Saved Reports
72 <!-- TMPL_ELSIF NAME="create"  -->Create from SQL
73 <!-- TMPL_ELSIF NAME="showsql" --><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved Reports</a> &rsaquo; SQL View
74 <!-- TMPL_ELSIF NAME="execute" --><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved Reports</a> &rsaquo; <em><!-- TMPL_VAR NAME="name" --></em> Report
75 <!-- TMPL_ELSIF NAME="buildx"  --><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a> &rsaquo; Step <!-- TMPL_VAR NAME="buildx" --> of 6:
76     <!-- TMPL_IF    NAME="build1" -->Choose a Module
77     <!-- TMPL_ELSIF NAME="build2" -->Pick a Report Type
78     <!-- TMPL_ELSIF NAME="build3" -->Select Columns for Display
79     <!-- TMPL_ELSIF NAME="build4" -->Select Criteria to Limit on
80     <!-- TMPL_ELSIF NAME="build5" -->Pick which columns to total
81     <!-- TMPL_ELSIF NAME="build6" -->Select how you want the report ordered
82     <!-- /TMPL_IF -->
83 <!-- /TMPL_IF -->
84 </div>
85
86 <div id="doc3" class="yui-t1">
87 <div id="bd">
88 <div id="yui-main">
89     <div class="yui-b">
90
91 <!-- TMPL_IF NAME="start" -->
92     <h2>Guided Reports</h2>
93     <p>Use the guided reports engine to create non standard reports.
94 This feature aims to provide some middle ground between the built in
95 canned reports and writing custom SQL reports.</p>
96
97     <h3>Build And Run Reports</h3>
98         <!-- TMPL_IF NAME="CAN_user_reports_create_reports" -->
99         <form action="/cgi-bin/koha/reports/guided_reports.pl">
100             <input type="hidden" name="phase" value="Build new" />
101             <input type="submit" name="submit" value="Build new"/>
102         </form>
103         <!-- /TMPL_IF -->
104         <!-- TMPL_IF NAME="CAN_user_reports_execute_reports" -->
105         <form action="/cgi-bin/koha/reports/guided_reports.pl">
106             <input type="hidden" name="phase" value="Use saved"/>
107             <input type="submit" name="submit" value="Use saved"/>
108         </form>
109         <!-- /TMPL_IF -->
110         <!-- TMPL_IF NAME="CAN_user_reports_create_reports" -->
111         <form action="/cgi-bin/koha/reports/guided_reports.pl">
112             <input type="hidden" name="phase" value="Create report from SQL"/>
113             <input type="submit" name="submit" value="Create report from SQL"/>
114         </form>
115         <!-- /TMPL_IF -->
116 <h3>Reports Dictionary</h3>
117 <p>Use the reports dictionary to define custom criteria to use in your reports</p>
118 <form action="/cgi-bin/koha/reports/dictionary.pl">
119 <input type="hidden" name="phase" value="View Dictionary"/>
120 <input type="submit" name="submit" value="View Dictionary"/>
121 </form>
122 <!-- /TMPL_IF -->
123
124 <!-- TMPL_IF NAME="saved1" -->
125 <!-- TMPL_IF NAME="savedreports" --><h1>Saved Reports</h1>
126 <p>Choose the report to run from the list</p>
127
128 <span id="pagertable_reports" class="pager">
129  <form class="formpager">&nbsp;<strong>page(s)</strong>&nbsp;:
130   <img src="<!-- TMPL_VAR name="interface" -->/prog/img/first.png" class="first"/>
131   <img src="<!-- TMPL_VAR name="interface" -->/prog/img/prev.png" class="prev"/>
132   <input type="text" size="5" class="pagedisplay"/>
133   <img src="<!-- TMPL_VAR name="interface" -->/prog/img/next.png" class="next"/>
134   <img src="<!-- TMPL_VAR name="interface" -->/prog/img/last.png" class="last"/>
135   , entries/page:
136   <select class="pagesize">
137    <option value="10">10</option>
138    <option value="25" selected="selected">25</option>
139    <option value="50">50</option>
140    <option value="100">100</option>
141    <option value="200">200</option>
142   </select>
143  </form>
144 </span>
145
146 <table id="table_reports" class="tablesorter">
147 <thead>
148  <tr>
149   <th>ID</th>
150   <th>Report Name</th>
151   <th>Type</th>
152   <th>Notes</th>
153   <th>Author</th>
154   <th>Creation Date</th>
155   <th>Saved Results</th>
156   <th>Saved SQL</th>
157   <th>&nbsp;</th>
158   <th>&nbsp;</th>
159  </tr>
160 </thead>
161 <tbody>
162 <!-- TMPL_LOOP NAME="savedreports" -->
163 <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
164 <td><!-- TMPL_VAR NAME="id" --></td>
165 <td><!-- TMPL_VAR NAME="report_name" --></td>
166 <td><!-- TMPL_VAR NAME="type" --></td>
167 <td><!-- TMPL_VAR NAME="notes" --></td>
168 <td><!-- TMPL_VAR NAME="borrowersurname" --><!-- TMPL_IF NAME="borrowerfirstname" -->, <!-- TMPL_VAR NAME="borrowerfirstname" --><!-- /TMPL_IF --> (<!-- TMPL_VAR NAME="borrowernumber" -->)</td>
169 <td><!-- TMPL_VAR NAME="date_created" --></td>
170 <td><!-- TMPL_IF NAME="date_run" --><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=retrieve%20results&id=<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="date_run" --></a><!-- /TMPL_IF -->
171 </td>
172     <td>
173         <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&amp;phase=Show%20SQL">Show</a> 
174         <!-- TMPL_IF name="CAN_user_reports_create_reports" -->
175             &nbsp; <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&amp;phase=Edit%20SQL">Edit</a>
176         <!-- /TMPL_IF -->
177     </td>
178 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&amp;phase=Run%20this%20report">Run</a>
179 <a href="/cgi-bin/koha/tools/scheduler.pl?id=<!-- TMPL_VAR NAME="id" -->">Schedule</a></td>
180     <!-- TMPL_IF name="CAN_user_reports_create_reports" -->
181         <td><a class="confirmdelete" title="Delete this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&amp;phase=Delete%20Saved">Delete</a></td>
182     <!-- /TMPL_IF -->
183 </tr>
184 <!-- /TMPL_LOOP -->
185 </tbody>
186 </table>
187 <!-- TMPL_ELSE --><h4>There are no saved reports. 
188     <!-- TMPL_IF name="CAN_user_reports_create_reports" -->
189         <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build new?</a>
190     <!-- /TMPL_IF -->
191 </h4>
192 <!-- /TMPL_IF -->
193 <!-- /TMPL_IF -->
194
195
196 <!-- TMPL_IF NAME="build1" -->
197 <h1>Build A Report</h1>
198 <form action="/cgi-bin/koha/reports/guided_reports.pl">
199 <fieldset class="rows">
200 <legend>Step 1 of 6: Choose a Module to Report on</legend>
201 <ol><li><label for="areas">Choose: </label><select name="areas" id="areas">
202 <!-- TMPL_LOOP NAME="areas" -->
203 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
204 <!-- /TMPL_LOOP -->
205 </select></li></ol>
206 </fieldset>
207 <fieldset class="action">
208 <input type="hidden" name="phase" value="Report on this Area" />
209 <input type="submit" name="submit" value="Next &gt;&gt;" />
210
211 </fieldset>
212 </form>
213 <!-- /TMPL_IF -->
214
215
216 <!-- TMPL_IF NAME="build2" -->
217 <h1>Build A Report</h1>
218 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
219 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
220 <fieldset class="rows"><legend>Step 2 of 6: Pick a Report Type</legend>
221 <ol><li><label for="types">Choose: </label>
222     <select id="types" name="types">
223         <option value="1">Tabular</option>
224         <option value="2" disabled="disabled">Summary</option>
225         <option value="3" disabled="disabled">Matrix</option>
226     </select>
227 </li></ol></fieldset>
228
229 <fieldset class="action">
230     <input type="hidden" name="phase" value="Choose this type" />
231     <input type="button" name="back" value="&lt;&lt; Back" onclick="javascript:history.back()" />
232     <input type="submit" name="submit" value="Next &gt;&gt;" />
233 </fieldset>
234 </form>
235 </div>
236 <div class="yui-gb"><div class="yui-u first"></div>
237
238 <!--- Summary and Matrix reports have not yet been implemented-->
239 <!--<div class="yui-u">Summary:
240 <img src="/intranet-tmpl/prog/img/reports-summary-graphic.gif" /></div>
241 <div class="yui-u">Matrix:
242 <img src="/intranet-tmpl/prog/img/reports-matrix-graphic.gif" /></div>-->
243
244 <!-- /TMPL_IF -->
245
246 <!-- TMPL_IF NAME="build3" -->
247 <h3>Step 3 of 6: Select Columns for Display</h3>
248 <p>Note: Be careful selecting when selecting columns. If your choice is too broad it could result in a very large report that will either not complete, or slow your system down.</p>
249
250 <form id="column_submit" action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
251     <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
252     <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
253     <fieldset>
254 <div class="yui-g">
255 <div class="yui-u first">       <div style="float: left;"><select id="availableColumns" name="oldcolumns2" multiple="multiple" size="25" style="min-width: 200px;height:300px;">
256 <!-- TMPL_LOOP NAME="columns" -->
257 <!-- TMPL_IF NAME="table" -->
258
259 <!-- TMPL_IF NAME="__first__" -->
260 <!-- TMPL_ELSE -->
261 </optgroup>
262 <!-- /TMPL_IF -->
263
264 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
265 <!-- TMPL_ELSE -->
266 <option value="<!-- TMPL_VAR NAME="name" -->">
267 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
268 <!-- TMPL_ELSE -->
269 <!-- TMPL_VAR NAME="name" -->
270 <!-- /TMPL_IF -->
271 </option>
272 <!-- /TMPL_IF -->
273 <!-- /TMPL_LOOP -->
274 </optgroup>
275 </select></div>
276 <div style="width: 6.3em; float: right; margin-top: 100px"><input type="button" name="Add" value="Add" class="button" style="width:6em;" onclick="addColumn()" /><br />
277 <input type="button" name="delete" value="&lt;&lt; Delete" class="button" style="width: 6em; margin: 1em 0;" onclick="delColumn()" /></div>
278 </div>
279
280 <div class="yui-u">
281 <select id="selectedColumns" name="columns" multiple="multiple" size="25" style="width:200px; height:300px;"></select>
282 </div>
283 </div>
284 </fieldset>
285 <div class="yui-g">
286 <fieldset class="action">
287     <input type="hidden" name="phase" value="Choose these columns" />
288     <input type="button" name="back" value="&lt;&lt; Back" onclick="javascript:history.back()" />
289     <input type="submit" name="submit" value="Next &gt;&gt;" />
290 </fieldset>
291 </div>
292 </form>
293
294 <!-- /TMPL_IF -->
295
296 <!-- TMPL_IF NAME="build4" -->
297 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
298     <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
299     <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
300     <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
301     <fieldset><legend>Step 4 of 6: Select Criteria to Limit on</legend>
302     <table>
303         <!-- TMPL_LOOP NAME="criteria" -->
304         <tr>
305         <td>
306             <input type="checkbox" name="criteria_column" id="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="name" -->" /> 
307             <label for="<!-- TMPL_VAR NAME="name" -->"><!-- TMPL_VAR NAME="description" --> </label>
308         </td>
309         <!-- TMPL_IF NAME="date" -->
310         <td>
311             <input type="text" size="10" id="<!-- TMPL_VAR NAME="name" -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value="" />
312             <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom<!-- TMPL_VAR NAME="name" -->" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />                 
313             <script type="text/javascript">   
314             Calendar.setup({  
315             inputField     : "<!-- TMPL_VAR NAME="name" -->_value",
316             ifFormat       : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
317             button         : "buttonfrom<!-- TMPL_VAR NAME="name" -->",
318             align          : "Tl" 
319             });     
320             </script>          
321                 <span class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span>
322         </td>
323         </tr>
324         <!-- TMPL_ELSE -->
325         <!-- TMPL_IF NAME="textrange" -->
326             <td>from
327             <input type="text" size="10" id="<!-- TMPL_VAR NAME="from" -->_value" name="<!-- TMPL_VAR NAME="from" -->_value" value="" /> to 
328             <input type="text" size="10" id="<!-- TMPL_VAR NAME="to" -->_value" name="<!-- TMPL_VAR NAME="to" -->_value" value="" />
329             </td>
330             </tr>
331         <!-- TMPL_ELSE -->
332             <!-- TMPL_IF NAME="daterange" -->
333             <td>from 
334             <input type="text" size="10" id="from_<!-- TMPL_VAR NAME="name" -->_value" name="from_<!-- TMPL_VAR NAME="name" -->_value" value="" />
335             <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfromfrom_<!-- TMPL_VAR NAME="name" -->" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />                 
336             <script type="text/javascript">   
337                 Calendar.setup({  
338                 inputField     : "from_<!-- TMPL_VAR NAME="name" -->_value",
339                 ifFormat       : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
340                 button         : "buttonfromfrom_<!-- TMPL_VAR NAME="name" -->",
341                 align          : "Tl" 
342                 });     
343             </script>         
344             to
345             <input type="text" size="10" id="to_<!-- TMPL_VAR NAME="name" -->_value" name="to_<!-- TMPL_VAR NAME="name" -->_value" value="" />
346             <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfromto_<!-- TMPL_VAR NAME="name" -->" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />                 
347             <script type="text/javascript">   
348                 Calendar.setup({  
349                 inputField     : "to_<!-- TMPL_VAR NAME="name" -->_value",
350                 ifFormat       : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
351                 button         : "buttonfromto_<!-- TMPL_VAR NAME="name" -->",
352                 align          : "Tl" 
353                 });     
354             </script>        
355                         <span class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span>
356             </td>
357         </tr>
358             <!-- TMPL_ELSE -->
359             <td>
360                 <select name="<!-- TMPL_VAR NAME="name" -->_value">
361                 <!-- TMPL_LOOP NAME="values" -->
362                 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_IF name="default" -->Default<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="availablevalues" ESCAPE="HTML"--><!-- /TMPL_IF --></option>
363                 <!-- /TMPL_LOOP -->
364                 </select>
365             </td>
366             </tr>
367             <!-- /TMPL_IF -->
368         <!-- /TMPL_IF -->
369         <!-- /TMPL_IF -->
370     <!-- /TMPL_LOOP -->
371     </table>
372     </fieldset>
373
374 <!-- TMPL_IF NAME="definitions" -->
375 <fieldset><legend>Dictionary Definitions</legend><table>
376 <!-- TMPL_LOOP NAME="definitions" -->
377     <tr><td><input type="checkbox" name="definition" value="<!--
378 TMPL_VAR NAME="id" -->" /> <!-- TMPL_VAR NAME="name" --></td></tr>
379 <!-- /TMPL_LOOP -->
380 </table>
381 <!-- /TMPL_IF -->
382
383 <fieldset class="action"><input type="hidden" name="phase" value="Choose these criteria" />
384     <input type="button" name="back" value="&lt;&lt; Back" onclick="javascript:history.back()" />
385     <input type="submit" name="submit" value="Next &gt;&gt;" /> </fieldset>
386 </form>
387 <!-- /TMPL_IF -->
388
389
390 <!-- TMPL_IF NAME="build5" -->
391 <h3>Step 5 of 6: Pick which columns to total</h3>
392 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
393 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
394 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
395 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
396 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
397 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
398 <fieldset><table>
399 <!-- TMPL_LOOP NAME="total_by" -->
400 <tr><td><input type="checkbox" name="total_by" id="<!-- TMPL_VAR
401 NAME="name" -->" value="<!-- TMPL_VAR
402 NAME="name" -->" /> <label for="<!-- TMPL_VAR
403 NAME="name" -->"><!-- TMPL_VAR NAME="name" --></label></td>
404 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
405
406 <!-- TMPL_LOOP NAME="select" -->
407 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
408 <!-- /TMPL_LOOP -->
409 </select>
410
411 </td></tr>
412 <!-- /TMPL_LOOP -->
413 </table></fieldset>
414
415 <fieldset class="action"><input type="hidden" name="phase" value="Choose These Operations" />
416     <input type="button" name="back" value="&lt;&lt; Back" onclick="javascript:history.back()" />
417     <input type="submit" name="submit" value="Next &gt;&gt;" /></fieldset>
418 </form>
419 <!-- /TMPL_IF -->
420
421
422 <!-- TMPL_IF NAME="build6" -->
423 <h3>Step 6 of 6: Choose how you want the report ordered</h3>
424 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
425 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
426 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
427 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
428 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
429 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
430 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->" />
431 <fieldset><table><!-- TMPL_LOOP NAME="order_by" -->
432 <tr><td><input type="checkbox" id="<!-- TMPL_VAR
433 NAME="name" -->" name="order_by" value="<!-- TMPL_VAR
434 NAME="name" -->" /> <label for="<!-- TMPL_VAR
435 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td><td>
436 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
437
438 <!-- TMPL_LOOP NAME="select" -->
439 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
440 <!-- /TMPL_LOOP -->
441 </select>
442 </td></tr>
443
444 <!-- /TMPL_LOOP -->
445 </table></fieldset>
446
447 <fieldset class="action">
448 <input type="hidden" name="phase" value="Build Report" />
449 <input type="submit" name="submit" value="Finish" /></fieldset>
450 </form>
451 <!-- /TMPL_IF -->
452
453
454 <!-- TMPL_IF NAME="showreport" -->
455 <h1>Confirm Custom Report</h1>
456 <p>Your report will be generated with the following SQL statement.</p>
457 <p> 
458 <!-- TMPL_VAR NAME="sql" ESCAPE="HTML" -->
459 </p>
460
461 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
462 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
463 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
464 <p>You will need to save the report before you can execute it</p>
465 <fieldset class="action"><input type="hidden" name="phase" value="Save" />  
466 <input type="submit" name="submit" value="Save" />  </fieldset>
467 </form>
468 <!-- /TMPL_IF -->
469
470 <!-- TMPL_IF NAME="save" -->
471 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
472 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" ESCAPE="html" -->" />
473 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
474 <fieldset class="rows">
475 <legend>Save Your Custom Report</legend>
476 <ol>
477     <li><label for="reportname">Report Name: </label><input type="text" id="reportname" name="reportname" /></li>
478     <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
479 </ol></fieldset>
480 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
481 <input type="submit" name="submit" value="Save Report" /></fieldset>
482 </form>
483 <!-- /TMPL_IF -->
484
485 <!-- TMPL_IF name="enter_params" -->
486     <form action='/cgi-bin/koha/reports/guided_reports.pl'>
487         <input type='hidden' name='phase' value='Run this report' />
488         <input type='hidden' name='reports' value="<!--TMPL_VAR name='reports' -->" />
489         <h1>Enter parameters for report <!-- TMPL_VAR name="name" -->:</h1>
490         <!-- TMPL_IF NAME="notes" --><p><!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF -->
491         <!-- TMPL_LOOP name="sql_params" -->
492             <p><!-- TMPL_VAR name="entry" -->: <!-- TMPL_VAR name='input' --></p>
493         <!-- /TMPL_LOOP -->
494         <input type='submit' value='Run the report'/>
495     </form>
496 <!-- /TMPL_IF -->
497
498 <!-- TMPL_IF NAME="execute" -->
499 <h1><!-- TMPL_VAR NAME="name" --></h1>
500 <!-- TMPL_IF NAME="notes" --><p><!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF -->
501 <!-- TMPL_IF NAME="unlimited_total" --><p>Total number of rows matching the (unlimited) query is <!-- TMPL_VAR NAME="unlimited_total" -->.</p><!-- /TMPL_IF -->
502 <pre id="sql_output"><!-- TMPL_VAR name="sql" --></pre>
503 <p><!-- TMPL_VAR NAME='pagination_bar' DEFAULT="" --></p>
504 <!-- TMPL_UNLESS name="errors" -->
505 <table>
506 <tr><!-- TMPL_LOOP NAME="header_row" --><th><!-- TMPL_VAR NAME="cell" --></th><!-- /TMPL_LOOP --></tr>
507 <!-- TMPL_LOOP NAME="results" -->
508 <tr>
509     <!-- TMPL_LOOP NAME="cells" --><td><!-- TMPL_VAR NAME="cell" --></td><!-- /TMPL_LOOP -->
510 </tr>
511 <!-- /TMPL_LOOP -->
512 </table>
513 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
514 <fieldset class="action">
515 <label for="format">Download the report: </label>
516 <select name="format" id="format">
517 <option value="csv">Comma Separated Text</option>
518 <option value="tab">Tab Separated Text</option>
519 </select>
520 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" ESCAPE="html" -->" />
521 <input type="hidden" name="phase" value="Export" />
522 <input type="submit" name="submit" value="Download" /></fieldset>
523 </form>
524 <!-- /TMPL_UNLESS -->
525 <!-- /TMPL_IF -->
526
527 <!-- TMPL_IF NAME="create" -->
528 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
529 <fieldset class="rows">
530 <legend>Create Report From SQL</legend>
531 <ol>
532     <li><label for="reportname">Report Name:</label> <input type="text" id="reportname" name="reportname" <!-- TMPL_IF NAME="reportname" --> value="<!-- TMPL_VAR NAME="reportname" -->"<!-- /TMPL_IF --> /> </li>
533     <li><label for="notes">Notes:</label> <textarea id="notes" name="notes" cols="50" rows="2"><!-- TMPL_VAR NAME="notes" DEFAULT="" --></textarea></li>
534     <li><label for="types">Type:</label>
535         <select id="types" name="types">
536             <option value="1">Tabular</option>
537             <option value="2" disabled="disabled">Summary</option>
538             <option value="3" disabled="disabled">Matrix</option>
539         </select>
540     </li>
541 </ol>
542 </fieldset>
543 <fieldset class="rows">
544 <legend>SQL:</legend>
545 <div style="margin:1em;">
546 <textarea  id="sql" name="sql" cols="50" rows="10"><!-- TMPL_VAR NAME="sql" DEFAULT="" --></textarea>
547 </div>
548 </fieldset>
549
550 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
551 <input type="submit" name="submit" value="Save Report" /></fieldset>
552 </form>
553 <!-- /TMPL_IF -->
554
555 <!-- TMPL_IF NAME="compound" -->
556 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
557 Master: <select name="master">
558 <!-- TMPL_LOOP NAME="savedreports" -->
559 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
560 <!-- /TMPL_LOOP -->
561 </select>
562 &nbsp;
563 Sub report:<select name="subreport">
564 <!-- TMPL_LOOP NAME="savedreports" -->
565 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
566 <!-- /TMPL_LOOP -->
567 </select>
568 <br />
569 <input type="hidden" name="phase" value="Save Compound" />
570 <input type="submit" name="submit" value="Save Compound" />
571 </form>
572 <!-- /TMPL_IF -->
573
574 <!-- TMPL_IF NAME="save_compound" -->
575 <!-- TMPL_VAR NAME="master" --> <br />
576 <!-- TMPL_VAR NAME="subsql" -->
577 <!-- /TMPL_IF -->
578
579
580 <!-- TMPL_IF NAME="retresults" -->
581 <h1>Saved Report Results</h1>
582 <h2><!-- TMPL_VAR NAME="name" --></h2>
583 <p><!-- TMPL_VAR NAME="notes" --></p>
584 <table>
585 <!-- TMPL_LOOP NAME="results" -->
586 <!-- TMPL_VAR NAME="row" -->
587 <!-- /TMPL_LOOP -->
588 </table>
589 <!-- /TMPL_IF -->
590
591 <!-- TMPL_IF NAME="showsql" -->
592 <textarea id="sql"><!-- TMPL_VAR NAME="sql" --></textarea>
593 <!-- /TMPL_IF -->
594
595 <!-- TMPL_IF NAME="editsql" -->
596 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
597 <input type="hidden" name="phase" value="Update SQL" />
598 <input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->"/>
599 <fieldset class="rows">
600 <legend>Edit SQL</legend>
601 <ol>
602 <li><label for="reportname">Report Name:</label><input type="text" id="reportname" name="reportname" value="<!-- TMPL_VAR NAME="reportname" -->" /></li>
603 <li><label for="notes">Notes:</label><textarea id="notes" name="notes" cols="50" rows="2"><!-- TMPL_VAR NAME="notes" --></textarea></li>
604 <li><textarea id="sql" name="sql" rows="10" cols="60"><!-- TMPL_VAR NAME="sql" --></textarea></li>
605 </ol>
606 </fieldset>
607
608 <fieldset class="action">
609 <input type="submit" name="submit" value="Update SQL" /></fieldset>
610 </form>
611
612
613 <!-- /TMPL_IF -->
614
615 <!-- TMPL_IF NAME="save_successful" -->
616 <!-- TMPL_UNLESS NAME="errors" -->
617 <h2>Your report has been saved</h2>
618 <p>The report you have created has now been saved. You can now</p>
619 <ul>
620     <li>Access this report from the: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved Reports Page</a></li>
621     <li>Schedule this report to run using the: <a href="/cgi-bin/koha/tools/scheduler.pl">Scheduler Tool</a></li>
622     <li>Return to: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Guided Reports</a></li>
623 </ul>
624 <!-- /TMPL_UNLESS -->
625 <!-- /TMPL_IF -->
626
627 <!-- TMPL_IF NAME="errors" -->
628 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
629 <div class="dialog alert">
630 <b>The following error was encountered:</b><br />
631 <!-- TMPL_LOOP name="errors" -->
632     <!-- TMPL_IF NAME="sqlerr" -->This report contains the SQL keyword <b><!-- TMPL_VAR name="sqlerr" --></b>.
633     <br />Use of this keyword is not allowed in Koha reports due to security and data integrity risks. Only SELECT queries are allowed.
634     <br />Please return to the &quot;Saved Reports&quot; screen and delete this report or retry creating a new one.
635     <!-- TMPL_ELSIF NAME="queryerr" -->The database returned the following error: <br /><!-- TMPL_VAR NAME="queryerr" --><br />Please check the log for further details.
636     <!-- TMPL_ELSE -->
637     <!-- /TMPL_IF -->
638 <!-- /TMPL_LOOP -->
639 </div>
640 <fieldset class="action"><input type="hidden" name="phase" value="Use saved" />
641 <input type="submit" name="submit" value="Saved Reports" /></fieldset>
642 </form>
643 <!-- /TMPL_IF -->
644
645 </div>
646 </div>
647 <div class="yui-b">
648 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
649 </div>
650 </div>
651 <script type="text/javascript">
652 //<![CDATA[
653 function addColumn() {
654     $("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected");
655 }
656 function delColumn() {
657     $("#selectedColumns option:selected").remove();
658 }
659 $("#column_submit").submit(function() {
660     if ($("#selectedColumns option").size() < 1) {
661         alert(_("No columns selected!"));
662         return false;
663     }
664     $("#selectedColumns option").attr("selected", "selected");  // Select everything still in #selectedColumns
665     return true;
666 });
667 //]]>
668 </script>
669 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->