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