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