bug 1909: add delete field/subfield button to MARC editor
[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">Tabular:
156 <img src="<!-- TMPL_VAR name="themelang" -->/../img/reports-tabular-graphic.gif" alt="" /></div>
157
158 <!--- Summary and Matrix reports have not yet been implemented-->
159 <!--<div class="yui-u">Summary:
160 <img src="/intranet-tmpl/prog/img/reports-summary-graphic.gif" /></div>
161 <div class="yui-u">Matrix:
162 <img src="/intranet-tmpl/prog/img/reports-matrix-graphic.gif" /></div>-->
163
164 <!-- /TMPL_IF -->
165
166 <!-- TMPL_IF NAME="build3" -->
167 <h3>Step 3 of 6: Select Columns for Display</h3>
168 <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>
169
170 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
171         <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
172         <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
173         <fieldset>
174 <div class="yui-g">
175 <div class="yui-u first">       <div style="float: left;"><select id="availableColumns" name="oldcolumns2" multiple="multiple" size="25" style="min-width: 200px;height:300px;">
176 <!-- TMPL_LOOP NAME="columns" -->
177 <!-- TMPL_IF NAME="table" -->
178
179 <!-- TMPL_IF NAME="__first__" -->
180 <!-- TMPL_ELSE -->
181 </optgroup>
182 <!-- /TMPL_IF -->
183
184 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
185 <!-- TMPL_ELSE -->
186 <option value="<!-- TMPL_VAR NAME="name" -->">
187 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
188 <!-- TMPL_ELSE -->
189 <!-- TMPL_VAR NAME="name" -->
190 <!-- /TMPL_IF -->
191 </option>
192 <!-- /TMPL_IF -->
193 <!-- /TMPL_LOOP -->
194 </optgroup>
195 </select></div>
196 <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 />
197 <input type="button" name="delete" value="&lt;&lt; Delete" class="button" style="width: 6em; margin: 1em 0;" onclick="delColumn()" /></div>
198 </div>
199
200 <div class="yui-u">
201 <select id="selectedColumns" name="columns" multiple="multiple" size="25" style="min-width:200px;height:300px;"></select>
202 </div>
203 </div>
204 </fieldset>
205 <div class="yui-g">
206 <fieldset class="action">
207 <input type="hidden" name="phase" value="Choose these columns" />
208 <input type="submit" name="submit" value="Next &gt;&gt;" />
209 </fieldset>
210 </div>
211 </form>
212
213 <!-- /TMPL_IF -->
214
215 <!-- TMPL_IF NAME="build4" -->
216 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
217 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
218 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
219 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
220 <fieldset><legend>Step 4 of 6: Select Criteria to Limit on</legend><table>
221 <!-- TMPL_LOOP NAME="criteria" -->
222 <tr><td><input type="checkbox" name="criteria_column" id="<!-- TMPL_VAR
223 NAME="name" -->" value="<!-- TMPL_VAR
224 NAME="name" -->" /> <label for="<!-- TMPL_VAR
225 NAME="name" -->"><!-- TMPL_VAR NAME="description" --> </label>
226 </td>
227 <!-- TMPL_IF NAME="date" -->
228 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
229 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
230 /><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" />                 
231 <script type="text/javascript">   
232 Calendar.setup({  
233 inputField     : "<!-- TMPL_VAR NAME="name" -->_value",                               
234 ifFormat       : "%Y-%m-%d",                               
235 button         : "buttonfrom<!-- TMPL_VAR NAME="name" -->",                               
236 align          : "Tl" 
237 });     
238 </script>          
239 </td></tr>
240 <!-- TMPL_ELSE -->
241 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
242 <!-- TMPL_LOOP NAME="values" -->
243 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
244 <!-- /TMPL_LOOP -->
245 </select>
246 </td></tr>
247 <!-- /TMPL_IF -->
248 <!-- /TMPL_LOOP -->
249 </table></fieldset>
250
251 <!-- TMPL_IF NAME="definitions" -->
252 <fieldset><legend>Dictionary Definitions</legend><table>
253 <!-- TMPL_LOOP NAME="definitions" -->
254        <tr><td><input type="checkbox" name="definition" value="<!--
255 TMPL_VAR NAME="id" -->" /> <!-- TMPL_VAR NAME="name" --></td></tr>
256 <!-- /TMPL_LOOP -->
257 </table>
258 <!-- /TMPL_IF -->
259
260 <fieldset class="action"><input type="hidden" name="phase" value="Choose these criteria" />
261 <input type="submit" name="submit" value="Next &gt;&gt;" /> </fieldset>
262 </form>
263 <!-- /TMPL_IF -->
264
265
266 <!-- TMPL_IF NAME="build5" -->
267 <h3>Step 5 of 6: Pick which columns to total</h3>
268 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
269 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
270 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
271 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
272 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
273 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
274 <fieldset><table>
275 <!-- TMPL_LOOP NAME="total_by" -->
276 <tr><td><input type="checkbox" name="total_by" id="<!-- TMPL_VAR
277 NAME="name" -->" value="<!-- TMPL_VAR
278 NAME="name" -->" /> <label for="<!-- TMPL_VAR
279 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td>
280 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
281
282 <!-- TMPL_LOOP NAME="select" -->
283 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
284 <!-- /TMPL_LOOP -->
285 </select>
286
287 </td></tr>
288 <!-- /TMPL_LOOP -->
289 </table></fieldset>
290
291 <fieldset class="action"><input type="hidden" name="phase" value="Choose These Operations" />
292 <input type="submit" name="submit" value="Next &gt;&gt;" /></fieldset>
293 </form>
294 <!-- /TMPL_IF -->
295
296
297 <!-- TMPL_IF NAME="build6" -->
298 <h3>Step 6 of 6: Choose how you want the report ordered</h3>
299 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
300 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
301 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
302 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
303 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
304 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
305 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->" />
306 <fieldset><table><!-- TMPL_LOOP NAME="order_by" -->
307 <tr><td><input type="checkbox" id="<!-- TMPL_VAR
308 NAME="name" -->" name="order_by" value="<!-- TMPL_VAR
309 NAME="name" -->" /> <label for="<!-- TMPL_VAR
310 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td><td>
311 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
312
313 <!-- TMPL_LOOP NAME="select" -->
314 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
315 <!-- /TMPL_LOOP -->
316 </select>
317 </td></tr>
318
319 <!-- /TMPL_LOOP -->
320 </table></fieldset>
321
322 <fieldset class="action">
323 <input type="hidden" name="phase" value="Build Report" />
324 <input type="submit" name="submit" value="Finish" /></fieldset>
325 </form>
326 <!-- /TMPL_IF -->
327
328
329 <!-- TMPL_IF NAME="showreport" -->
330 <h1>Confirm Custom Report</h1>
331 <p>Your report will be generated with the following SQL statement.</p>
332 <p> 
333 <!-- TMPL_VAR NAME="sql" -->
334 </p>
335
336 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
337 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
338 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
339 <p>You will need to save the report before you can execute it</p>
340 <fieldset class="action"><input type="hidden" name="phase" value="Save" />  
341 <input type="submit" name="submit" value="Save" />  </fieldset>
342 </form>
343 <!-- /TMPL_IF -->
344
345 <!-- TMPL_IF NAME="save" -->
346 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
347 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
348 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
349 <fieldset class="rows">
350 <legend>Save Your Custom Report</legend>
351 <ol>
352         <li><label for="reportname">Report Name: </label><input type="text" id="reportname" name="reportname" /></li>
353         <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
354 </ol></fieldset>
355 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
356 <input type="submit" name="submit" value="Save Report" /></fieldset>
357 </form>
358 <!-- /TMPL_IF -->
359
360 <!-- TMPL_IF NAME="execute" -->
361 <h1><!-- TMPL_VAR NAME="name" --></h1>
362 <p><!-- TMPL_VAR NAME="notes" --></p>
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" -->