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