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