Adding back button to all steps in build report
[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 requiring a DBA to write the SQL code for you.</p>
27      <form action="/cgi-bin/koha/reports/guided_reports.pl">
28      <h3>Build and Run existing 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 <h3>Define Custom Criteria</h3>
34 <p>Use the reports dictionary to define custom criteria to use in your
35 reports</p>
36 <input type="submit" name="phase" value="View Dictionary"/>
37         </form>
38 <!-- /TMPL_IF -->
39
40 <!-- TMPL_IF NAME="saved1" -->
41 <h1>Load Saved Reports</h1>
42 Choose the report from the list
43 <form action="/cgi-bin/koha/reports/guided_reports.pl">
44 <select name="reports">
45 <!-- TMPL_LOOP NAME="savedreports" -->
46 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
47 <!-- /TMPL_LOOP -->
48 </select>
49 <input type="submit" name="phase" value="Run this report">
50 </form>
51 <!-- /TMPL_IF -->
52
53
54 <!-- TMPL_IF NAME="build1" -->
55 <h1>Build A Report</h1>
56 <h3>Step 1 of 6: Choose a Module to Report on</h3>
57 <form action="/cgi-bin/koha/reports/guided_reports.pl">
58 <select name="areas">
59 <!-- TMPL_LOOP NAME="areas" -->
60 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
61 <!-- /TMPL_LOOP -->
62 </select>
63 <br />
64 <input type=button value="Back" onClick="history.go(-1)">
65  <input type="submit" name="phase" value="Report on this Area">
66 </form>
67 <!-- /TMPL_IF -->
68
69
70 <!-- TMPL_IF NAME="build2" -->
71 <h1>Build A Report</h1>
72 <h3>Step 2 of 6: Pick a Report Type</h3>
73 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
74 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
75 <select name="types">
76 <!-- TMPL_LOOP NAME="types" -->
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="submit" name="phase" value="Choose this type">
83 <br />
84 </form>
85 Tabular:
86 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-tabular-graphic.gif" />
87 Summary:
88 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-summary-graphic.gif" />
89 Matrix:
90 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-matrix-graphic.gif" />
91 <!-- /TMPL_IF -->
92
93 <!-- TMPL_IF NAME="build3" -->
94 <h3>Step 3 of 6: Select Columns for Display</h3>
95 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
96         <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
97         <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
98         <select id="availableColumns" name="oldcolumns2" multiple size="25" style="width:200px;height:300px;">
99 <!-- TMPL_LOOP NAME="columns" -->
100 <!-- TMPL_IF NAME="table" -->
101
102 <!-- TMPL_IF NAME="__first__" -->
103 <!-- TMPL_ELSE -->
104 </optgroup>
105 <!-- /TMPL_IF -->
106
107 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
108 <!-- TMPL_ELSE -->
109 <option value="<!-- TMPL_VAR NAME="name" -->">
110 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
111 <!-- TMPL_ELSE -->
112 <!-- TMPL_VAR NAME="name" -->
113 <!-- /TMPL_IF -->
114 <!-- /TMPL_IF -->
115 </option>
116 <!-- /TMPL_LOOP -->
117 </select>
118 <input type="button" name="Add" value="Add" class="button" onClick="addColumn()"/>
119 <select id="selectedColumns" name="columns" multiple size="25" style="width:200px;height:300px;"></select>
120 <input type="button" name="delete" value="delete" class="button" onClick="delColumn()"/>
121
122 <input type=button value="Back" onClick="history.go(-1)">
123 <input type="submit" name="phase" value="Choose these columns">
124 </form>
125 <!-- /TMPL_IF -->
126
127 <!-- TMPL_IF NAME="build4" -->
128 <h3>Step 4 of 6: Select Criteria to Limit on </h3>
129
130 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
131 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
132 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
133 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
134 <table>
135 <!-- TMPL_LOOP NAME="criteria" -->
136 <tr><td><input type=checkbox name="criteria_column" value="<!-- TMPL_VAR
137 NAME="name" -->"> <!-- TMPL_VAR NAME="description" --> 
138 </td>
139 <!-- TMPL_IF NAME="date" -->
140 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
141 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
142 ><img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;"  />                 
143 <script type="text/javascript">   
144 Calendar.setup({  
145 inputField     : "<!-- TMPL_VAR NAME="name" -->_value",                               
146 ifFormat       : "%Y-%m-%d",                               
147 button         : "buttonfrom1",                               
148 align          : "Tl" 
149 });     
150 </script>          
151 </td></tr>
152 <!-- TMPL_ELSE -->
153 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
154 <!-- TMPL_LOOP NAME="values" -->
155 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
156 <!-- /TMPL_LOOP -->
157 </select>
158 </td></tr>
159 <!-- /TMPL_IF -->
160 <!-- /TMPL_LOOP -->
161 </table><br />
162 <!-- TMPL_IF NAME="definitions" -->
163 Dictionary Definitions <br />
164 <table>
165 <!-- TMPL_LOOP NAME="definitions" -->
166
167        <tr><td><input type=checkbox name="definition" value="<!--
168 TMPL_VAR NAME="id" -->"> <!-- TMPL_VAR NAME="name" --></td></tr>
169
170 <!-- /TMPL_LOOP -->
171 </table>
172 <!-- /TMPL_IF -->
173 <input type=button value="Back" onClick="history.go(-1)">
174  <input type="submit" name="phase" value="Choose these criteria">
175 </form>
176 <!-- /TMPL_IF -->
177
178
179 <!-- TMPL_IF NAME="build5" -->
180 <h3>Step 5 of 6: Pick which columns to total</h3>
181 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
182 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
183 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
184 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
185 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
186 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
187 <table>
188 <!-- TMPL_LOOP NAME="total_by" -->
189 <tr><td><input type=checkbox name="total_by" value="<!-- TMPL_VAR
190 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td>
191 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
192
193 <!-- TMPL_LOOP NAME="select" -->
194 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
195 <!-- /TMPL_LOOP -->
196 </select>
197
198 </td></tr>
199 <!-- /TMPL_LOOP -->
200 </table>
201 <input type=button value="Back" onClick="history.go(-1)">
202  <input type="submit" name="phase" value="Choose These Operations">
203 </form>
204 <!-- /TMPL_IF -->
205
206
207 <!-- TMPL_IF NAME="build6" -->
208 <h3>Step 6 of 6: Select the ordering</h3>
209 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
210 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
211 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
212 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
213 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
214 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
215 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->">
216 <table><!-- TMPL_LOOP NAME="order_by" -->
217 <tr><td><input type=checkbox name="order_by" value="<!-- TMPL_VAR
218 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td><td>
219 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
220
221 <!-- TMPL_LOOP NAME="select" -->
222 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
223 <!-- /TMPL_LOOP -->
224 </select>
225 </td></tr>
226
227 <!-- /TMPL_LOOP -->
228 </table>
229 <br />
230 <input type=button value="Back" onClick="history.go(-1)">
231  <input type="submit" name="phase" value="Build Report">
232 </form>
233 <!-- /TMPL_IF -->
234
235
236 <!-- TMPL_IF NAME="showreport" -->
237 <!-- TMPL_VAR NAME="sql" -->
238
239 <p>
240 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
241 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
242 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
243 <input type="submit" name="phase" value="Save">  <input type="submit" name="phase" value="Execute">
244 </form>
245 <!-- /TMPL_IF -->
246
247 <!-- TMPL_IF NAME="save" -->
248 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
249 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
250 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
251 Report Name: <input type="text" name="reportname"> <br />
252 Notes: <textarea name="notes"></textarea><br />
253 <input type="submit" name="phase" value="Save Report">
254 </form>
255 <!-- /TMPL_IF -->
256
257 <!-- TMPL_IF NAME="execute" -->
258 <h1>Show results</h1>
259 <h2>Report Name</h2>
260 <p>Report description</p>
261 <table>
262 <!-- TMPL_LOOP NAME="results" -->
263 <!-- TMPL_VAR NAME="row" -->
264 <!-- /TMPL_LOOP -->
265 </table>
266 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
267 <select name="format">
268 <option value="csv">Comma Separated Text</option>
269 <option value="tab">Tab Separated Text</option>
270 </select>
271 <input type="submit" name="phase" value="Export">
272 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
273 </form>
274 <!-- /TMPL_IF -->
275
276 <!-- TMPL_IF NAME="create" -->
277 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
278 Report Name: <input type="text" name="reportname"> <br />
279 Type:
280 <select name="types">
281 <!-- TMPL_LOOP NAME="types" -->
282 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
283 <!-- /TMPL_LOOP -->
284 </select>
285 <br />
286 SQl: <textarea name="sql" cols=30 rows=10></textarea><br />
287 <input type="submit" name="phase" value="Save Report">
288 </form>
289 <!-- /TMPL_IF -->
290
291 <!-- TMPL_IF NAME="compound" -->
292 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
293 Master: <select name="master">
294 <!-- TMPL_LOOP NAME="savedreports" -->
295 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
296 <!-- /TMPL_LOOP -->
297 </select>
298  &nbsp;
299 Sub report:<select name="subreport">
300 <!-- TMPL_LOOP NAME="savedreports" -->
301 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
302 <!-- /TMPL_LOOP -->
303 </select>
304 <br />
305 <input type="submit" name="phase" value="Save Compound">
306 </form>
307 <!-- /TMPL_IF -->
308
309 <!-- TMPL_IF NAME="save_compound" -->
310 <!-- TMPL_VAR NAME="master" --> <br />
311 <!-- TMPL_VAR NAME="subsql" -->
312 <!-- /TMPL_IF -->
313 </div>
314 </div>
315 </div>
316 <div class="yui-b">
317 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
318 </div>
319 </div>
320 <script type="text/javascript">
321 function setObjects() {
322         selectedColumnsObj=document.getElementById('selectedColumns');
323         availableColumnsObj=document.getElementById('availableColumns');
324 }
325 setObjects();
326
327 function addColumn() {
328         for (i=0;i<availableColumnsObj.length;i++) {
329                 if (availableColumnsObj.options[i].selected==true) {
330                         var newColumnObj=document.createElement("OPTION");
331                         newColumnObj.value=availableColumnsObj.options[i].value;
332                         newColumnObj.text=availableColumnsObj.options[i].text;
333                         selectedColumnsObj.appendChild(newColumnObj);
334                         newColumnObj.selected=true;
335                 }
336         }
337 }
338
339 function delColumn() {
340         for (i=0;i<=selectedColumnsObj.options.length;i++) {
341                 if (selectedColumnsObj.options.selectedIndex>=0)
342                 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
343         }
344 }
345 </script>
346 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->