Adding a back button
[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="submit" name="phase" value="Choose these columns">
123 </form>
124 <!-- /TMPL_IF -->
125
126 <!-- TMPL_IF NAME="build4" -->
127 <h3>Step 4 of 6: Select Criteria to Limit on </h3>
128
129 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
130 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
131 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
132 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
133 <table>
134 <!-- TMPL_LOOP NAME="criteria" -->
135 <tr><td><input type=checkbox name="criteria_column" value="<!-- TMPL_VAR
136 NAME="name" -->"> <!-- TMPL_VAR NAME="description" --> 
137 </td>
138 <!-- TMPL_IF NAME="date" -->
139 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
140 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
141 ><img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;"  />                 
142 <script type="text/javascript">   
143 Calendar.setup({  
144 inputField     : "<!-- TMPL_VAR NAME="name" -->_value",                               
145 ifFormat       : "%Y-%m-%d",                               
146 button         : "buttonfrom1",                               
147 align          : "Tl" 
148 });     
149 </script>          
150 </td></tr>
151 <!-- TMPL_ELSE -->
152 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
153 <!-- TMPL_LOOP NAME="values" -->
154 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
155 <!-- /TMPL_LOOP -->
156 </select>
157 </td></tr>
158 <!-- /TMPL_IF -->
159 <!-- /TMPL_LOOP -->
160 </table><br />
161 <!-- TMPL_IF NAME="definitions" -->
162 Dictionary Definitions <br />
163 <table>
164 <!-- TMPL_LOOP NAME="definitions" -->
165
166        <tr><td><input type=checkbox name="definition" value="<!--
167 TMPL_VAR NAME="id" -->"> <!-- TMPL_VAR NAME="name" --></td></tr>
168
169 <!-- /TMPL_LOOP -->
170 </table>
171 <!-- /TMPL_IF -->
172 <input type="submit" name="phase" value="Choose these criteria">
173 </form>
174 <!-- /TMPL_IF -->
175
176
177 <!-- TMPL_IF NAME="build5" -->
178 <h3>Step 5 of 6: Pick which columns to total</h3>
179 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
180 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
181 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
182 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
183 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
184 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
185 <table>
186 <!-- TMPL_LOOP NAME="total_by" -->
187 <tr><td><input type=checkbox name="total_by" value="<!-- TMPL_VAR
188 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td>
189 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
190
191 <!-- TMPL_LOOP NAME="select" -->
192 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
193 <!-- /TMPL_LOOP -->
194 </select>
195
196 </td></tr>
197 <!-- /TMPL_LOOP -->
198 </table>
199 <input type="submit" name="phase" value="Choose Totals">
200 </form>
201 <!-- /TMPL_IF -->
202
203
204 <!-- TMPL_IF NAME="build6" -->
205 <h3>Step 6 of 6: Select the ordering</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="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
211 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
212 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->">
213 <table><!-- TMPL_LOOP NAME="order_by" -->
214 <tr><td><input type=checkbox name="order_by" value="<!-- TMPL_VAR
215 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td><td>
216 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
217
218 <!-- TMPL_LOOP NAME="select" -->
219 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
220 <!-- /TMPL_LOOP -->
221 </select>
222 </td></tr>
223
224 <!-- /TMPL_LOOP -->
225 </table>
226 <br />
227 <input type="submit" name="phase" value="Build Report">
228 </form>
229 <!-- /TMPL_IF -->
230
231
232 <!-- TMPL_IF NAME="showreport" -->
233 <!-- TMPL_VAR NAME="sql" -->
234
235 <p>
236 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
237 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
238 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
239 <input type="submit" name="phase" value="Save">  <input type="submit" name="phase" value="Execute">
240 </form>
241 <!-- /TMPL_IF -->
242
243 <!-- TMPL_IF NAME="save" -->
244 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
245 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
246 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
247 Report Name: <input type="text" name="reportname"> <br />
248 Notes: <textarea name="notes"></textarea><br />
249 <input type="submit" name="phase" value="Save Report">
250 </form>
251 <!-- /TMPL_IF -->
252
253 <!-- TMPL_IF NAME="execute" -->
254 <h1>Show results</h1>
255 <h2>Report Name</h2>
256 <p>Report description</p>
257 <table>
258 <!-- TMPL_LOOP NAME="results" -->
259 <!-- TMPL_VAR NAME="row" -->
260 <!-- /TMPL_LOOP -->
261 </table>
262 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
263 <select name="format">
264 <option value="csv">Comma Separated Text</option>
265 <option value="tab">Tab Separated Text</option>
266 </select>
267 <input type="submit" name="phase" value="Export">
268 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
269 </form>
270 <!-- /TMPL_IF -->
271
272 <!-- TMPL_IF NAME="create" -->
273 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
274 Report Name: <input type="text" name="reportname"> <br />
275 Type:
276 <select name="types">
277 <!-- TMPL_LOOP NAME="types" -->
278 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
279 <!-- /TMPL_LOOP -->
280 </select>
281 <br />
282 SQl: <textarea name="sql" cols=30 rows=10></textarea><br />
283 <input type="submit" name="phase" value="Save Report">
284 </form>
285 <!-- /TMPL_IF -->
286
287 <!-- TMPL_IF NAME="compound" -->
288 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
289 Master: <select name="master">
290 <!-- TMPL_LOOP NAME="savedreports" -->
291 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
292 <!-- /TMPL_LOOP -->
293 </select>
294  &nbsp;
295 Sub report:<select name="subreport">
296 <!-- TMPL_LOOP NAME="savedreports" -->
297 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
298 <!-- /TMPL_LOOP -->
299 </select>
300 <br />
301 <input type="submit" name="phase" value="Save Compound">
302 </form>
303 <!-- /TMPL_IF -->
304
305 <!-- TMPL_IF NAME="save_compound" -->
306 <!-- TMPL_VAR NAME="master" --> <br />
307 <!-- TMPL_VAR NAME="subsql" -->
308 <!-- /TMPL_IF -->
309 </div>
310 </div>
311 </div>
312 <div class="yui-b">
313 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
314 </div>
315 </div>
316 <script type="text/javascript">
317 function setObjects() {
318         selectedColumnsObj=document.getElementById('selectedColumns');
319         availableColumnsObj=document.getElementById('availableColumns');
320 }
321 setObjects();
322
323 function addColumn() {
324         for (i=0;i<availableColumnsObj.length;i++) {
325                 if (availableColumnsObj.options[i].selected==true) {
326                         var newColumnObj=document.createElement("OPTION");
327                         newColumnObj.value=availableColumnsObj.options[i].value;
328                         newColumnObj.text=availableColumnsObj.options[i].text;
329                         selectedColumnsObj.appendChild(newColumnObj);
330                         newColumnObj.selected=true;
331                 }
332         }
333 }
334
335 function delColumn() {
336         for (i=0;i<=selectedColumnsObj.options.length;i++) {
337                 if (selectedColumnsObj.options.selectedIndex>=0)
338                 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
339         }
340 }
341 </script>
342 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->