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