Attempting to add Notes field to Create from SQL for reports
[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
250 <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 <input type="submit" name="phase" value="Save">  <input type="submit" name="phase" value="Execute">
255 </form>
256 <!-- /TMPL_IF -->
257
258 <!-- TMPL_IF NAME="save" -->
259 <h1>Save Your Custom Report</h1>
260 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
261 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
262 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
263 Report Name: <input type="text" name="reportname"> <br />
264 Notes: <textarea name="notes"></textarea><br />
265 <input type="submit" name="phase" value="Save Report">
266 </form>
267 <!-- /TMPL_IF -->
268
269 <!-- TMPL_IF NAME="execute" -->
270 <h1>Show results</h1>
271 <h2><!-- TMPL_VAR NAME="name" --></h2>
272 <p><!-- TMPL_VAR NAME="notes" --></p>
273 <table>
274 <!-- TMPL_LOOP NAME="results" -->
275 <!-- TMPL_VAR NAME="row" -->
276 <!-- /TMPL_LOOP -->
277 <p>Download the report</p>
278 </table>
279 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
280 <select name="format">
281 <option value="csv">Comma Separated Text</option>
282 <option value="tab">Tab Separated Text</option>
283 </select>
284 <input type="submit" name="phase" value="Export">
285 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
286 </form>
287 <!-- /TMPL_IF -->
288
289 <!-- TMPL_IF NAME="create" -->
290 <h1>Create Report From SQL</h1>
291 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
292 Report Name: <input type="text" name="reportname"> <br />
293 Notes: <textarea name="notes"></textarea><br />
294 Type:
295 <select name="types">
296 <!-- TMPL_LOOP NAME="types" -->
297 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
298 <!-- /TMPL_LOOP -->
299 </select>
300 <br />
301 SQl: <textarea name="sql" cols=30 rows=10></textarea><br />
302 <input type="submit" name="phase" value="Save Report">
303 </form>
304 <!-- /TMPL_IF -->
305
306 <!-- TMPL_IF NAME="compound" -->
307 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
308 Master: <select name="master">
309 <!-- TMPL_LOOP NAME="savedreports" -->
310 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
311 <!-- /TMPL_LOOP -->
312 </select>
313  &nbsp;
314 Sub report:<select name="subreport">
315 <!-- TMPL_LOOP NAME="savedreports" -->
316 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
317 <!-- /TMPL_LOOP -->
318 </select>
319 <br />
320 <input type="submit" name="phase" value="Save Compound">
321 </form>
322 <!-- /TMPL_IF -->
323
324 <!-- TMPL_IF NAME="save_compound" -->
325 <!-- TMPL_VAR NAME="master" --> <br />
326 <!-- TMPL_VAR NAME="subsql" -->
327 <!-- /TMPL_IF -->
328
329
330 <!-- TMPL_IF NAME="retresults" -->
331 <h1>Saved Report Results</h1>
332 <h2><!-- TMPL_VAR NAME="name" --></h2>
333 <p><!-- TMPL_VAR NAME="notes" --></p>
334 <table>
335 <!-- TMPL_LOOP NAME="results" -->
336 <!-- TMPL_VAR NAME = "row" -->
337 <!-- /TMPL_LOOP -->
338 </table>
339 <p>Download the report</p>
340 </table>
341 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
342 <select name="format">
343 <option value="csv">Comma Separated Text</option>
344 <option value="tab">Tab Separated Text</option>
345 </select>
346 <input type="submit" name="phase" value="Export">
347 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
348 </form>
349 <!-- /TMPL_IF -->
350
351 <!-- TMPL_IF NAME="showsql" -->
352 <!-- TMPL_VAR NAME="sql" -->
353 <!-- /TMPL_IF -->
354
355 <!-- TMPL_IF NAME="save_successful" -->
356 <!-- TMPL_VAR NAME="sql" -->
357 <h1>Save Your Custom Report</h1>
358 <h2>Your report has been saved</h2>
359 <p>The report you have created has now been saved. You can now</p>
360 <ul>
361         <li>Access this report from the: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used+saved">Saved Reports Page</a></li>
362         <li>Schedule this report to run using the: <a href="/cgi-bin/koha/tools/scheduler.pl">Scheduler Tool</a></li>
363         <li>Return to: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used+saved">Guided Reports</a></li>
364 </ul>
365
366
367
368 <!-- /TMPL_IF -->
369
370 </div>
371 </div>
372 </div>
373 <div class="yui-b">
374 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
375 </div>
376 </div>
377 <script type="text/javascript">
378 function setObjects() {
379         selectedColumnsObj=document.getElementById('selectedColumns');
380         availableColumnsObj=document.getElementById('availableColumns');
381 }
382 setObjects();
383
384 function addColumn() {
385         for (i=0;i<availableColumnsObj.length;i++) {
386                 if (availableColumnsObj.options[i].selected==true) {
387                         var newColumnObj=document.createElement("OPTION");
388                         newColumnObj.value=availableColumnsObj.options[i].value;
389                         newColumnObj.text=availableColumnsObj.options[i].text;
390                         selectedColumnsObj.appendChild(newColumnObj);
391                         newColumnObj.selected=true;
392                 }
393         }
394 }
395
396 function delColumn() {
397         for (i=0;i<=selectedColumnsObj.options.length;i++) {
398                 if (selectedColumnsObj.options.selectedIndex>=0)
399                 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
400         }
401 }
402 </script>
403 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->