]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/reports/xul/template_builder.xul
More i18n prep for reports
[Evergreen.git] / Open-ILS / web / reports / xul / template_builder.xul
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
3 <?xml-stylesheet href="reporter.css" type="text/css"?>
4 <?xml-stylesheet href="/opac/common/js/jscalendar/calendar-brown.css" type="text/css" ?>
5 <?xml-stylesheet href='/js/dojo/dojo/resources/dojo.css' type='text/css'?>
6
7 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xhtml="http://www.w3.org/1999/xhtml">
8
9 <!-- Load dojo -->
10 <script type="text/javascript">
11 <![CDATA[
12         var djConfig= {
13                 isDebug: false,
14                 parseOnLoad: true
15         }
16 ]]>
17 </script>
18 <script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
19 <script type="text/javascript">
20 <![CDATA[
21         dojo.require('dojo.parser');
22 ]]>
23 </script>
24
25 <script src='/opac/common/js/utils.js' type="application/x-javascript; e4x=1"/>
26 <script src='/opac/common/js/config.js' type="application/x-javascript; e4x=1"/>
27 <script src='/opac/common/js/CGI.js' type="application/x-javascript; e4x=1"/>
28 <script src='/opac/common/js/JSON_v1.js' type="application/x-javascript; e4x=1"/>
29 <script src='/opac/common/js/fmall.js' type="application/x-javascript; e4x=1"/>
30 <script src='/opac/common/js/fmgen.js' type="application/x-javascript; e4x=1"/>
31 <script src='/opac/common/js/Cookies.js' type="application/x-javascript; e4x=1"/>
32 <script src='/opac/common/js/opac_utils.js' type="application/x-javascript; e4x=1"/>
33 <script src='/opac/common/js/OrgTree.js' type="application/x-javascript; e4x=1"/>
34 <script src='/opac/common/js/org_utils.js' type="application/x-javascript; e4x=1"/>
35 <script src='/opac/common/js/RemoteRequest.js' type="application/x-javascript; e4x=1"/>
36 <script src='/opac/common/js/md5.js' type="application/x-javascript; e4x=1"/>
37
38 <script src="../adminlib.js" type="application/x-javascript; e4x=1"/>
39
40 <script src="utilities.js" type="application/x-javascript; e4x=1"/>
41 <script src="xulbuilder.js" type="application/x-javascript; e4x=1"/>
42 <script src="source-setup.js" type="application/x-javascript; e4x=1"/>
43 <script src="source-browse.js" type="application/x-javascript; e4x=1"/>
44 <script src="template-config.js" type="application/x-javascript; e4x=1"/>
45 <script src="transforms.js" type="application/x-javascript; e4x=1"/>
46 <script src="operators.js" type="application/x-javascript; e4x=1"/>
47
48 <script type="text/javascript">
49 <![CDATA[
50         dojo.addOnLoad(loadIDL);
51 ]]>
52 </script>
53
54 <script type="application/x-javascript; e4x=1" src="/opac/common/js/jscalendar/calendar.js"/>
55 <script type="application/x-javascript; e4x=1" src="/opac/common/js/jscalendar/lang/calendar-en.js"/>
56 <script type="application/x-javascript; e4x=1" src="/opac/common/js/jscalendar/calendar-setup.js"/>
57
58 <groupbox flex="1">
59         <caption label="Database Source Browser"/>
60         <hbox flex="1">
61                 <hbox flex="1">
62                         <vbox flex="1">
63                                 <menulist label="Sources" popup="source-menu"/>
64                                 <tree
65                                         id="idl-browse-tree"
66                                         flex="2"
67                                         onclick="sourceTreeHandler(event)"
68                                         ondblclick="sourceTreeHandlerDblClick(event)"
69                                 >
70                                         <treecols>
71                                                 <treecol primary="true" label="Source Name" flex="1"/>
72                                         </treecols>
73                                         <treechildren id="sources-treetop" alternatingbackground="true" />
74                                 </tree>
75                         </vbox>
76                 </hbox>
77
78                 <splitter id="rtp-browse-splitter" collapse="before" persist="state hidden"><grippy/></splitter>
79
80                 <hbox flex="2">
81                         <vbox flex="1">
82                                 <hbox>
83                                         <label control="path-label" value="Source Specifier:"/>
84                                         <textbox id="path-label" flex="1"/>
85                                 </hbox>
86                                 <hbox flex="1">
87                                         <hbox flex="3">
88                                                 <vbox flex="1">
89                                                         <tree
90                                                                 id="class-view"
91                                                                 flex="3"
92                                                                 onclick="detailTreeHandler()"
93                                                                 ondblclick="addReportAtoms()"
94                                                                 enableColumnDrag="true"
95                                                         >
96                                                                 <treecols>
97                                                                         <treecol label="Field Name" flex="1"/>
98                                                                         <treecol label="Data Type" flex="0"/>
99                                                                 </treecols>
100                                                                 <treechildren id="class-treetop" alternatingbackground="true" />
101                                                         </tree>
102                                                 </vbox>
103                                         </hbox>
104
105                                         <splitter><grippy/></splitter>
106
107                                         <hbox flex="2">
108                                                 <vbox flex="1">
109                                                         <tree
110                                                                 id="trans-view"
111                                                                 flex="1"
112                                                                 seltype="single"
113                                                                 onclick="transformSelectHandler()"
114                                                                 ondblclick="addReportAtoms()"
115                                                                 enableColumnDrag="true"
116                                                         >
117                                                                 <treecols>
118                                                                         <treecol label="Field Transform" flex="1"/>
119                                                                         <treecol label="Params" flex="0" hidden="true"/>
120                                                                         <treecol label="Applicable Datatypes" flex="1" hidden="true"/>
121                                                                         <treecol label="Output Type" flex="1" />
122                                                                 </treecols>
123                                                                 <treechildren id="trans-treetop" alternatingbackground="true" />
124                                                         </tree>
125                                                 </vbox>
126                                         </hbox>
127                                 </hbox>
128                                 <hbox>
129                                         <spacer flex="1"/>
130                                         <button label="Add Selected Fields" id="source-add" oncommand="addReportAtoms()"/>
131                                 </hbox>
132                         </vbox>
133                 </hbox>
134         </hbox>
135 </groupbox>
136
137 <splitter style="margin:3px" id="rtp-browse-build-splitter" collapse="before" persist="state hidden"><grippy/></splitter>
138
139
140 <groupbox flex="1" orient="horizontal">
141         <caption label="Template Configuration"/>
142
143         <hbox flex="1">
144                 <vbox flex="1">
145                         <hbox>
146                         <vbox>
147                                 <label control="template-name" value="Name:" style="height:2em"/>
148                                 <label control="template-description" value="Description:"/>
149                         </vbox>
150                         <vbox flex="1">
151                                 <textbox id="template-name" flex="1"/>
152                                 <textbox id="template-description" multiline="true" flex="1" style="max-height:3em"/>
153                         </vbox>
154                         <vbox pack="end">
155                                 <button onclick="save_template();" label="Save"/>
156                         </vbox>
157                         </hbox>
158
159                         <hbox flex="1">
160                                 <tabbox flex="2" id="used-source-fields-tabbox">
161                                         <tabs>
162                                                 <tab
163                                                         id="dis_tab"
164                                                         label="Displayed Fields"
165                                                         onclick="transformSelectHandler(true);"
166                                                 />
167                                                 <tab
168                                                         id="filter_tab"
169                                                         label="Base Filters"
170                                                         onclick="transformSelectHandler(true);"
171                                                 />
172                                                 <tab
173                                                         id="aggfilter_tab"
174                                                         label="Aggregate Filters"
175                                                         disabled="true"
176                                                         onclick="transformSelectHandler(true);"
177                                                 />
178                                                 <!--
179                                                 <tab
180                                                         id="order_tab"
181                                                         label="Field Order"
182                                                         onclick="transformSelectHandler(true);"
183                                                 />
184                                                 -->
185                                         </tabs>
186
187                                         <tabpanels flex="1">
188                                                 <tabpanel id="dis_tabpanel" orient="vertical">
189                                                         <vbox flex="1">
190                                                                 <hbox flex="1">
191                                                                         <tree
192                                                                                 id="dis-col-view"
193                                                                                 flex="1"
194                                                                                 seltype="single"
195                                                                                 ondblclick="alterColumnLabel()"
196                                                                                 onselect="populateTransformContext()"
197                                                                                 enableColumnDrag="true"
198                                                                         >
199                                                                                 <treecols>
200                                                                                         <treecol label="Display Name" flex="3"/>
201                                                                                         <treecol label="Field Name" hidden="true" flex="1"/>
202                                                                                         <treecol label="Data Type" flex="1"/>
203                                                                                         <treecol label="Field Transform" flex="1"/>
204                                                                                         <treecol label="Field Transform Type" hidden="true" flex="1"/>
205                                                                                 </treecols>
206                                                                                 <treechildren id="dis-col-treetop" alternatingbackground="true" />
207                                                                         </tree>
208                                                                 </hbox>
209                                                                 <hbox pack="center">
210                                                                         <button label="Alter Display Header" oncommand="alterColumnLabel()"/>
211                                                                         <button type="menu" label="Change Transform">
212                                                                                 <menupopup id='dis_tab_trans_menu'/>
213                                                                         </button>
214                                                                         <spacer flex="1"/>
215                                                                         <button label="Move Up" oncommand="changeDisplayOrder('u')"/>
216                                                                         <button label="Move Down" oncommand="changeDisplayOrder('d')"/>
217                                                                         <spacer flex="1"/>
218                                                                         <button label="Remove Selected Field" oncommand="removeReportAtom()"/>
219                                                                 </hbox>
220                                                         </vbox>
221                                                 </tabpanel>
222
223                                                 <tabpanel id="filter_tabpanel" orient="vertical">
224                                                         <vbox flex="1">
225                                                                 <hbox flex="1">
226                                                                         <tree
227                                                                                 id="filter-col-view"
228                                                                                 flex="1"
229                                                                                 seltype="single"
230                                                                                 onselect="populateTransformContext();populateOperatorContext();changeTemplateFilterValue();"
231                                                                                 enableColumnDrag="true"
232                                                                         >
233                                                                                 <treecols>
234                                                                                         <treecol label="Filter Field" flex="2"/>
235                                                                                         <treecol label="Field Name" hidden="true" flex="1"/>
236                                                                                         <treecol label="Data Type" hidden="true" flex="1"/>
237                                                                                         <treecol label="Field Transform" flex="1"/>
238                                                                                         <treecol label="Field Transform Type" hidden="true" flex="1"/>
239                                                                                         <treecol label="Operator" flex="1"/>
240                                                                                         <treecol label="Value" flex="1"/>
241                                                                                 </treecols>
242                                                                                 <treechildren id="filter-col-treetop" alternatingbackground="true" />
243                                                                         </tree>
244                                                                 </hbox>
245                                                                 <hbox pack="center">
246                                                                         <button type="menu" label="Change Transform">
247                                                                                 <menupopup id='filter_tab_trans_menu'/>
248                                                                         </button>
249                                                                         <button type="menu" label="Change Operator">
250                                                                                 <menupopup id='filter_tab_op_menu'/>
251                                                                         </button>
252                                                                         <button label="Change value" command="filter_tab_value_action"/>
253                                                                         <button label="Remove value" oncommand="removeTemplateFilterValue()"/>
254                                                                         <spacer flex="1"/>
255                                                                         <button label="Remove Selected Fields" oncommand="removeReportAtom()"/>
256                                                                 </hbox>
257                                                         </vbox>
258                                                 </tabpanel>
259
260                                                 <tabpanel id="aggfilter_tabpanel" orient="vertical">
261                                                         <vbox flex="1">
262                                                                 <hbox flex="1">
263                                                                         <tree
264                                                                                 id="aggfilter-col-view"
265                                                                                 flex="1"
266                                                                                 seltype="single"
267                                                                                 onselect="populateTransformContext();populateOperatorContext();changeTemplateFilterValue();"
268                                                                                 enableColumnDrag="true"
269                                                                         >
270                                                                                 <treecols>
271                                                                                         <treecol label="Filter Field" flex="2"/>
272                                                                                         <treecol label="Field Name" hidden="true" flex="1"/>
273                                                                                         <treecol label="Data Type" hidden="true" flex="1"/>
274                                                                                         <treecol label="Field Transform" flex="1"/>
275                                                                                         <treecol label="Field Transform Type" hidden="true" flex="1"/>
276                                                                                         <treecol label="Operator" flex="1"/>
277                                                                                         <treecol label="Value" flex="1"/>
278                                                                                 </treecols>
279                                                                                 <treechildren id="aggfilter-col-treetop" alternatingbackground="true" />
280                                                                         </tree>
281                                                                 </hbox>
282                                                                 <hbox pack="center">
283                                                                         <button type="menu" label="Change Transform">
284                                                                                 <menupopup id='aggfilter_tab_trans_menu'/>
285                                                                         </button>
286                                                                         <button type="menu" label="Change Operator">
287                                                                                 <menupopup id='aggfilter_tab_op_menu'/>
288                                                                         </button>
289                                                                         <button label="Change value" command="aggfilter_tab_value_action"/>
290                                                                         <button label="Remove value" oncommand="removeTemplateFilterValue()"/>
291                                                                         <spacer flex="1"/>
292                                                                         <button label="Remove Selected Fields" oncommand="removeReportAtom()"/>
293                                                                 </hbox>
294                                                         </vbox>
295                                                 </tabpanel>
296                                         </tabpanels>
297                                 </tabbox>
298                         </hbox>
299                 </vbox>
300         </hbox>
301
302         <splitter id="rtp-build-splitter" collapse="after" persist="state hidden"><grippy/></splitter>
303
304         <hbox flex="3">
305                 <tree
306                         id="used-sources"
307                         flex="1"
308                         onclick="renderSources(true)"
309                         ondblclick="changeTemplateFilterValue()"
310                         enableColumnDrag="true"
311                 >
312                         <treecols>
313                                 <treecol label="Source Specifier" flex="2"/>
314                                 <treecol label="Table Name" flex="1" hidden="true"/>
315                                 <treecol label="SQL Alias" flex="1" hidden="true"/>
316                                 <treecol label="Relationship" flex="1" hidden="true"/>
317                         </treecols>
318                         <treechildren id="used-sources-treetop" alternatingbackground="true" />
319                 </tree>
320         </hbox>
321
322 </groupbox>
323
324 <commandset>
325         <command id='filter_tab_value_action'/>
326         <command id='aggfilter_tab_value_action'/>
327 </commandset>
328
329 <popupset>
330         <popup id="source-menu" position="after_start"/>
331         <popup
332                 id="calendar-widget"
333                 position="before_start"
334         />
335 </popupset>
336
337 </window>
338