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