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