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