8bf572a2de8f0a9508957f188def1775cba4cca2
[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 <!-- TMPL_IF NAME="start" --> &rsaquo; Guided Reports Wizard <!-- /TMPL_IF --><!-- TMPL_IF NAME="saved1" --> &rsaquo; Guided Reports Wizard &rsaquo; Saved Reports<!-- /TMPL_IF --><!-- TMPL_IF NAME="create" --> &rsaquo; Guided Reports Wizard &rsaquo; Create from SQL<!-- /TMPL_IF --><!-- TMPL_IF NAME="showsql" -->
3  &rsaquo; Guided Reports Wizard &rsaquo; Saved Reports &rsaquo; SQL View<!-- /TMPL_IF -->
4   <!-- TMPL_IF NAME="execute" --> &rsaquo; Guided Reports Wizard &rsaquo; Saved Reports &rsaquo; <!-- TMPL_VAR NAME="name" --> Report<!-- /TMPL_IF -->
5   <!-- TMPL_IF NAME="build1" -->&rsaquo; Guided Reports Wizard &rsaquo; Build A Report, Step 1: Choose a Module<!-- /TMPL_IF -->
6   <!-- TMPL_IF NAME="build2" -->&rsaquo; Guided Reports Wizard &rsaquo; Build A Report, Step 2: Pick a Report Type<!-- /TMPL_IF -->
7   <!-- TMPL_IF NAME="build3" -->&rsaquo; Guided Reports Wizard &rsaquo; Build A Report, Step 3 of 6: Select Columns for Display<!-- /TMPL_IF -->
8   <!-- TMPL_IF NAME="build4" --> &rsaquo; Guided Reports Wizard &rsaquo; Build A Report, Step 4 of 6: Select Criteria to Limit on<!-- /TMPL_IF -->
9   <!-- TMPL_IF NAME="build5" --> &rsaquo; Guided Reports Wizard &rsaquo; Build A Report, Step 5 of 6: Pick which columns to total<!-- /TMPL_IF -->
10   <!-- TMPL_IF NAME="build6" -->&rsaquo; Guided Reports Wizard &rsaquo; Build A Report, Step 6 of 6: Select how you want the report ordered<!-- /TMPL_IF -->
11 </title>
12 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
13 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
14 <!-- TMPL_IF NAME="saved1" -->
15 <script type="text/javascript">
16 //<![CDATA[
17 $(document).ready(function(){
18         $(".confirmdelete").click(function(){
19                 $(this).parents('tr').attr("class","warn");
20                 if(confirm("Are you sure you want to "+$(this).attr("title")+"?")){
21                         return true;
22                 } else {
23                         $(this).parents('tr').attr("class","");
24                         return false;
25                 }
26         });
27 });
28 //]]>
29  </script>
30 <!-- /TMPL_IF -->
31 <!-- TMPL_IF NAME="showsql" -->
32 <style type="text/css">
33         #sql { width: 90%; height: 9em; border: 1px solid #EEE; }
34 </style>
35
36 <script type="text/javascript">
37  $(document).ready(function() {
38         $("#sql").focus(function() {
39                 $(this).select();
40                 });
41  });
42  </script><!-- /TMPL_IF -->
43 </head>
44 <body>
45 <!-- TMPL_INCLUDE NAME="header.inc" -->
46 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
47
48 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
49 &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a><!-- TMPL_IF NAME="start" --> &rsaquo; <strong>Guided Reports Wizard </strong><!-- /TMPL_IF --><!-- TMPL_IF NAME="saved1" --> &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; <strong>Saved Reports</strong><!-- /TMPL_IF --><!-- TMPL_IF NAME="create" --> &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; <strong>Create from SQL</strong><!-- /TMPL_IF --><!-- TMPL_IF NAME="showsql" -->
50  &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used%20saved">Saved Reports</a> &rsaquo; <strong>SQL View</strong><!-- /TMPL_IF -->
51   <!-- TMPL_IF NAME="execute" -->&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used%20saved">Saved Reports</a> &rsaquo; <em><!-- TMPL_VAR NAME="name" --></em> Report<!-- /TMPL_IF -->
52   <!-- TMPL_IF NAME="build1" -->&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; Build A Report, Step 1: Choose a Module<!-- /TMPL_IF -->
53   <!-- TMPL_IF NAME="build2" -->&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a>, Step 2: Pick a Report Type<!-- /TMPL_IF -->
54   <!-- TMPL_IF NAME="build3" -->&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a>, Step 3 of 6: Select Columns for Display<!-- /TMPL_IF -->
55   <!-- TMPL_IF NAME="build4" -->&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a>, Step 4 of 6: Select Criteria to Limit on<!-- /TMPL_IF -->
56   <!-- TMPL_IF NAME="build5" -->&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a>, Step 5 of 6: Pick which columns to total<!-- /TMPL_IF -->
57   <!-- TMPL_IF NAME="build6" -->&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a>, Step 6 of 6: Select how you want the report ordered<!-- /TMPL_IF -->
58 </div>
59
60 <div id="doc3" class="yui-t1">
61
62     <div id="bd">
63     <div id="yui-main">
64     <div class="yui-b">
65
66         <div class="details">
67
68 <!-- TMPL_IF NAME="start" -->
69      <h2>Guided Reports</h2>
70      <p>Use the guided reports engine to create non standard reports.
71 This feature aims to provide some middle ground between the built in
72 canned reports and writing custom SQL reports.</p>
73
74      <h3>Build And Run Reports</h3>                                                                                           
75               <form action="/cgi-bin/koha/reports/guided_reports.pl">
76                   <input type="hidden" name="phase" value="Build new" />
77                 <input type="submit" name="submit" value="Build new"/>
78                 </form>
79                 <form action="/cgi-bin/koha/reports/guided_reports.pl">
80                 <input type="hidden" name="phase" value="Used saved"/>
81                 <input type="submit" name="submit" value="Used saved"/>
82                 </form>
83                 <form action="/cgi-bin/koha/reports/guided_reports.pl">
84                 <input type="hidden" name="phase" value="Create report from SQL"/>
85                 <input type="submit" name="submit" value="Create report from SQL"/>
86         </form>
87 <h3>Reports Dictionary</h3>
88 <p>Use the reports dictionary to define custom criteria to use in your
89 reports</p>
90 <form action="/cgi-bin/koha/reports/dictionary.pl">
91 <input type="hidden" name="phase" value="View Dictionary"/>
92 <input type="submit" name="submit" value="View Dictionary"/>
93 </form>
94 <!-- /TMPL_IF -->
95
96 <!-- TMPL_IF NAME="saved1" -->
97 <!-- TMPL_IF NAME="savedreports" --><h1>Saved Reports</h1>
98 <p>Choose the report to run from the list</p>
99 <form action="/cgi-bin/koha/reports/guided_reports.pl">
100 <table>
101 <tr><th>Report Name</th><th>Type</th><th>Notes</th><th>Saved Results</th><th>Saved SQL</th><th colspan="3">&nbsp;</th></tr>
102 <!-- TMPL_LOOP NAME="savedreports" -->
103 <tr><td><!-- TMPL_VAR NAME="report_name" --></td>
104 <td><!-- TMPL_VAR NAME="type" --></td>
105 <td><!-- TMPL_VAR NAME="notes" --></td>
106 <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 -->
107 </td>
108 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&amp;phase=Show%20SQL">Show SQL</a></td>
109 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&amp;phase=Run%20this%20report">Run this Report</a></td>
110 <td><a href="/cgi-bin/koha/tools/scheduler.pl?id=<!-- TMPL_VAR NAME="id" -->">Schedule this Report</a></td>
111 <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></tr>
112 <!-- /TMPL_LOOP -->
113 </table>
114 </form>
115 <!-- TMPL_ELSE --><h4>There are no saved reports. <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build new?</a></h4><!-- /TMPL_IF -->
116 <!-- /TMPL_IF -->
117
118
119 <!-- TMPL_IF NAME="build1" -->
120 <h1>Build A Report</h1>
121 <form action="/cgi-bin/koha/reports/guided_reports.pl">
122 <fieldset class="rows">
123 <legend>Step 1 of 6: Choose a Module to Report on</legend>
124 <ol><li><label for="areas">Choose: </label><select name="areas" id="areas">
125 <!-- TMPL_LOOP NAME="areas" -->
126 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
127 <!-- /TMPL_LOOP -->
128 </select></li></ol>
129 </fieldset>
130 <fieldset class="action">
131 <input type="hidden" name="phase" value="Report on this Area" />
132 <input type="submit" name="submit" value="Next &gt;&gt;" />
133
134 </fieldset>
135 </form>
136 <!-- /TMPL_IF -->
137
138
139 <!-- TMPL_IF NAME="build2" -->
140 <h1>Build A Report</h1>
141 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
142 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
143 <fieldset class="rows"><legend>Step 2 of 6: Pick a Report Type</legend>
144 <ol><li><label for="types">Choose: </label><select name="types" id="types">
145 <!-- TMPL_LOOP NAME="types" -->
146 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
147 <!-- /TMPL_LOOP -->
148 </select></li></ol></fieldset>
149
150 <fieldset class="action">
151 <input type="hidden" name="phase" value="Choose this type" />
152 <input type="submit" name="submit" value="Next &gt;&gt;" /></fieldset>
153 </form>
154 </div>
155 <div class="yui-gb"><div class="yui-u first"></div>
156
157 <!--- Summary and Matrix reports have not yet been implemented-->
158 <!--<div class="yui-u">Summary:
159 <img src="/intranet-tmpl/prog/img/reports-summary-graphic.gif" /></div>
160 <div class="yui-u">Matrix:
161 <img src="/intranet-tmpl/prog/img/reports-matrix-graphic.gif" /></div>-->
162
163 <!-- /TMPL_IF -->
164
165 <!-- TMPL_IF NAME="build3" -->
166 <h3>Step 3 of 6: Select Columns for Display</h3>
167 <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>
168
169 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
170         <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
171         <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
172         <fieldset>
173 <div class="yui-g">
174 <div class="yui-u first">       <div style="float: left;"><select id="availableColumns" name="oldcolumns2" multiple="multiple" size="25" style="min-width: 200px;height:300px;">
175 <!-- TMPL_LOOP NAME="columns" -->
176 <!-- TMPL_IF NAME="table" -->
177
178 <!-- TMPL_IF NAME="__first__" -->
179 <!-- TMPL_ELSE -->
180 </optgroup>
181 <!-- /TMPL_IF -->
182
183 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
184 <!-- TMPL_ELSE -->
185 <option value="<!-- TMPL_VAR NAME="name" -->">
186 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
187 <!-- TMPL_ELSE -->
188 <!-- TMPL_VAR NAME="name" -->
189 <!-- /TMPL_IF -->
190 </option>
191 <!-- /TMPL_IF -->
192 <!-- /TMPL_LOOP -->
193 </optgroup>
194 </select></div>
195 <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 />
196 <input type="button" name="delete" value="&lt;&lt; Delete" class="button" style="width: 6em; margin: 1em 0;" onclick="delColumn()" /></div>
197 </div>
198
199 <div class="yui-u">
200 <select id="selectedColumns" name="columns" multiple="multiple" size="25" style="min-width:200px;height:300px;"></select>
201 </div>
202 </div>
203 </fieldset>
204 <div class="yui-g">
205 <fieldset class="action">
206 <input type="hidden" name="phase" value="Choose these columns" />
207 <input type="submit" name="submit" value="Next &gt;&gt;" />
208 </fieldset>
209 </div>
210 </form>
211
212 <!-- /TMPL_IF -->
213
214 <!-- TMPL_IF NAME="build4" -->
215 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
216 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
217 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
218 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
219 <fieldset><legend>Step 4 of 6: Select Criteria to Limit on</legend><table>
220 <!-- TMPL_LOOP NAME="criteria" -->
221 <tr><td><input type="checkbox" name="criteria_column" id="<!-- TMPL_VAR
222 NAME="name" -->" value="<!-- TMPL_VAR
223 NAME="name" -->" /> <label for="<!-- TMPL_VAR
224 NAME="name" -->"><!-- TMPL_VAR NAME="description" --> </label>
225 </td>
226 <!-- TMPL_IF NAME="date" -->
227 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
228 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
229 /><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" />                 
230 <script type="text/javascript">   
231 Calendar.setup({  
232 inputField     : "<!-- TMPL_VAR NAME="name" -->_value",
233 ifFormat       : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
234 button         : "buttonfrom<!-- TMPL_VAR NAME="name" -->",
235 align          : "Tl" 
236 });     
237 </script>          
238 </td></tr>
239 <!-- TMPL_ELSE -->
240 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
241 <!-- TMPL_LOOP NAME="values" -->
242 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
243 <!-- /TMPL_LOOP -->
244 </select>
245 </td></tr>
246 <!-- /TMPL_IF -->
247 <!-- /TMPL_LOOP -->
248 </table></fieldset>
249
250 <!-- TMPL_IF NAME="definitions" -->
251 <fieldset><legend>Dictionary Definitions</legend><table>
252 <!-- TMPL_LOOP NAME="definitions" -->
253        <tr><td><input type="checkbox" name="definition" value="<!--
254 TMPL_VAR NAME="id" -->" /> <!-- TMPL_VAR NAME="name" --></td></tr>
255 <!-- /TMPL_LOOP -->
256 </table>
257 <!-- /TMPL_IF -->
258
259 <fieldset class="action"><input type="hidden" name="phase" value="Choose these criteria" />
260 <input type="submit" name="submit" value="Next &gt;&gt;" /> </fieldset>
261 </form>
262 <!-- /TMPL_IF -->
263
264
265 <!-- TMPL_IF NAME="build5" -->
266 <h3>Step 5 of 6: Pick which columns to total</h3>
267 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
268 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
269 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
270 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
271 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
272 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
273 <fieldset><table>
274 <!-- TMPL_LOOP NAME="total_by" -->
275 <tr><td><input type="checkbox" name="total_by" id="<!-- TMPL_VAR
276 NAME="name" -->" value="<!-- TMPL_VAR
277 NAME="name" -->" /> <label for="<!-- TMPL_VAR
278 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td>
279 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
280
281 <!-- TMPL_LOOP NAME="select" -->
282 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
283 <!-- /TMPL_LOOP -->
284 </select>
285
286 </td></tr>
287 <!-- /TMPL_LOOP -->
288 </table></fieldset>
289
290 <fieldset class="action"><input type="hidden" name="phase" value="Choose These Operations" />
291 <input type="submit" name="submit" value="Next &gt;&gt;" /></fieldset>
292 </form>
293 <!-- /TMPL_IF -->
294
295
296 <!-- TMPL_IF NAME="build6" -->
297 <h3>Step 6 of 6: Choose how you want the report ordered</h3>
298 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
299 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
300 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
301 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
302 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
303 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
304 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->" />
305 <fieldset><table><!-- TMPL_LOOP NAME="order_by" -->
306 <tr><td><input type="checkbox" id="<!-- TMPL_VAR
307 NAME="name" -->" name="order_by" value="<!-- TMPL_VAR
308 NAME="name" -->" /> <label for="<!-- TMPL_VAR
309 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td><td>
310 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
311
312 <!-- TMPL_LOOP NAME="select" -->
313 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
314 <!-- /TMPL_LOOP -->
315 </select>
316 </td></tr>
317
318 <!-- /TMPL_LOOP -->
319 </table></fieldset>
320
321 <fieldset class="action">
322 <input type="hidden" name="phase" value="Build Report" />
323 <input type="submit" name="submit" value="Finish" /></fieldset>
324 </form>
325 <!-- /TMPL_IF -->
326
327
328 <!-- TMPL_IF NAME="showreport" -->
329 <h1>Confirm Custom Report</h1>
330 <p>Your report will be generated with the following SQL statement.</p>
331 <p> 
332 <!-- TMPL_VAR NAME="sql" -->
333 </p>
334
335 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
336 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
337 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
338 <p>You will need to save the report before you can execute it</p>
339 <fieldset class="action"><input type="hidden" name="phase" value="Save" />  
340 <input type="submit" name="submit" value="Save" />  </fieldset>
341 </form>
342 <!-- /TMPL_IF -->
343
344 <!-- TMPL_IF NAME="save" -->
345 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
346 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
347 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
348 <fieldset class="rows">
349 <legend>Save Your Custom Report</legend>
350 <ol>
351         <li><label for="reportname">Report Name: </label><input type="text" id="reportname" name="reportname" /></li>
352         <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
353 </ol></fieldset>
354 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
355 <input type="submit" name="submit" value="Save Report" /></fieldset>
356 </form>
357 <!-- /TMPL_IF -->
358
359 <!-- TMPL_IF NAME="execute" -->
360 <h1><!-- TMPL_VAR NAME="name" --></h1>
361 <p><!-- TMPL_VAR NAME="notes" --></p>
362 <!-- TMPL_VAR name='pagination_bar'-->
363 <table>
364 <!-- TMPL_LOOP NAME="results" -->
365 <!-- TMPL_VAR NAME="row" -->
366 <!-- /TMPL_LOOP -->
367 </table>
368 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
369 <fieldset class="action">
370 <label for="format">Download the report: </label>
371 <select name="format" id="format">
372 <option value="csv">Comma Separated Text</option>
373 <option value="tab">Tab Separated Text</option>
374 </select>
375 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
376 <input type="hidden" name="phase" value="Export" />
377 <input type="submit" name="submit" value="Download" /></fieldset>
378 </form>
379 <!-- /TMPL_IF -->
380
381 <!-- TMPL_IF NAME="create" -->
382 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
383 <fieldset class="rows">
384 <legend>Create Report From SQL</legend>
385 <ol>
386         <li><label for="reportname">Report Name:</label> <input type="text" id="reportname" name="reportname" /> </li>
387         <li><label for="notes">Notes:</label> <textarea  id="notes" name="notes" cols="50" rows="2"></textarea></li>
388         <li><label for="types">Type:</label><select id="types"  name="types"><!-- TMPL_LOOP NAME="types" --><option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option><!-- /TMPL_LOOP --></select></li>
389         <li><label for="sql">SQL: </label><textarea  id="sql" name="sql" cols="50" rows="10"></textarea></li>
390 </ol>
391 </fieldset>
392
393 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
394 <input type="submit" name="submit" value="Save Report" /></fieldset>
395 </form>
396 <!-- /TMPL_IF -->
397
398 <!-- TMPL_IF NAME="compound" -->
399 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
400 Master: <select name="master">
401 <!-- TMPL_LOOP NAME="savedreports" -->
402 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
403 <!-- /TMPL_LOOP -->
404 </select>
405  &nbsp;
406 Sub report:<select name="subreport">
407 <!-- TMPL_LOOP NAME="savedreports" -->
408 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
409 <!-- /TMPL_LOOP -->
410 </select>
411 <br />
412 <input type="hidden" name="phase" value="Save Compound" />
413 <input type="submit" name="submit" value="Save Compound" />
414 </form>
415 <!-- /TMPL_IF -->
416
417 <!-- TMPL_IF NAME="save_compound" -->
418 <!-- TMPL_VAR NAME="master" --> <br />
419 <!-- TMPL_VAR NAME="subsql" -->
420 <!-- /TMPL_IF -->
421
422
423 <!-- TMPL_IF NAME="retresults" -->
424 <h1>Saved Report Results</h1>
425 <h2><!-- TMPL_VAR NAME="name" --></h2>
426 <p><!-- TMPL_VAR NAME="notes" --></p>
427 <table>
428 <!-- TMPL_LOOP NAME="results" -->
429 <!-- TMPL_VAR NAME = "row" -->
430 <!-- /TMPL_LOOP -->
431 </table>
432
433 <!-- /TMPL_IF -->
434
435 <!-- TMPL_IF NAME="showsql" -->
436 <textarea id="sql"><!-- TMPL_VAR NAME="sql" --></textarea>
437 <!-- /TMPL_IF -->
438
439 <!-- TMPL_IF NAME="save_successful" -->
440 <h2>Your report has been saved</h2>
441 <p>The report you have created has now been saved. You can now</p>
442 <ul>
443         <li>Access this report from the: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used+saved">Saved Reports Page</a></li>
444         <li>Schedule this report to run using the: <a href="/cgi-bin/koha/tools/scheduler.pl">Scheduler Tool</a></li>
445         <li>Return to: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used+saved">Guided Reports</a></li>
446 </ul>
447
448
449
450 <!-- /TMPL_IF -->
451
452 </div>
453 </div>
454 </div>
455 <div class="yui-b">
456 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
457 </div>
458 </div>
459 <script type="text/javascript">
460 //<![CDATA[
461 function setObjects() {
462         selectedColumnsObj=document.getElementById('selectedColumns');
463         availableColumnsObj=document.getElementById('availableColumns');
464 }
465 setObjects();
466
467 function addColumn() {
468         for (i=0;i<availableColumnsObj.length;i++) {
469                 if (availableColumnsObj.options[i].selected==true) {
470                         var newColumnObj=document.createElement("OPTION");
471                         newColumnObj.value=availableColumnsObj.options[i].value;
472                         newColumnObj.text=availableColumnsObj.options[i].text;
473                         selectedColumnsObj.appendChild(newColumnObj);
474                         newColumnObj.selected=true;
475                 }
476         }
477 }
478
479 function delColumn() {
480         for (i=0;i<=selectedColumnsObj.options.length;i++) {
481                 if (selectedColumnsObj.options.selectedIndex>=0)
482                 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
483         }
484 }
485 //]]>
486 </script>
487 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->