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