cab7bd06bb77b69755fe3db04835fdbe446bfce6
[working/Evergreen.git] / Open-ILS / src / templates / staff / reporter / t_edit_template.tt2
1 <!-- report template builder -->
2 <ng-form name="reportTemplateForm" class="form-validated">
3
4 <div class="row">
5   <div class="col-md-2">
6     [% l('Template Name') %]
7   </div>
8   <div class="col-md-4">
9     <div><input type="text" class="form-control" ng-model="templateName" required/></div>
10   </div>
11   <div class="col-md-2">
12     [% l('Documentation URL') %]
13   </div>
14   <div class="col-md-4">
15     <div><input type="text" class="form-control" ng-model="templateDocURL"/></div>
16   </div>
17 </div>
18
19 <div class="row">
20   <div class="col-md-2">
21     [% l('Template Description') %]
22   </div>
23   <div class="col-md-10">
24     <div><textarea class="form-control" ng-model="templateDescription" /></div>
25   </div>
26 </div>
27
28 <div class="row">
29   <div class="col-md-2">
30     <button ng-disabled="reportTemplateForm.$invalid" ng-click="saveTemplate()" class="btn btn-default">[% l('Save Template') %]</button>
31   </div>
32 </div>
33 </ng-form>
34
35 <hr/>
36
37 <div class="row panel" style="max-height: 400px; min-height: 400px;">
38   <div class="col-md-5" style="max-height: 400px; min-height: 400px; overflow-y: scroll;">
39
40     <div class="row">
41       <div class="col-xs-3"><strong>[% l('Core Source') %]</strong></div>
42       <div class="col-xs-6">
43         <div class="source-selector nullable">
44           <select class="form-control" ng-model="coreSource" ng-change="changeCoreSource()"
45             ng-options="s.name as s.label group by s.core_label for s in allSources">
46             <option value="">[% l('-- Select Source --') %]</option>
47           </select>
48         </div>
49       </div>
50       <div class="col-xs-3">
51         <label for="enable_nullability_cb">
52           [% l('Nullability') %]
53         </lable>
54         <input type="checkbox" ng-model="enable_nullability"/>
55       </div>
56     </div>
57
58     <br/>
59
60     <treecontrol
61         class="tree-light"
62         tree-model="class_tree"
63         on-node-toggle="treeExpand(node, expanded)"
64         on-selection="selectSource(node, selected, $path)"
65     >
66       <select
67           ng-show="enable_nullability"
68           ng-model="node.jtype"
69           ng-init="join_types = [{type:'inner',label:'[% l('Default') %]'},{type:'left',label:'[% l('Child nullable') %]'},{type:'right',label:'[% l('Parent nullable') %]'}]"
70           ng-options="j.type as j.label for j in join_types"></select>
71       {{ node.label || n.id }}
72     </treecontrol>
73
74   </div>
75   <div class="col-md-7">
76     <div class="row">
77       <div class="col-md-7" style="max-height: 400px; min-height: 400px; overflow-y: scroll;">
78         <div class="row">
79             <div class="col-xs-3"><strong>[% l('Source Path') %]</strong></div>
80             <div class="col-xs-9"><input type="text" class="form-control" ng-model="currentPathLabel"/></div>
81         </div>
82
83         <br/>
84
85         <treecontrol
86           class="tree-light"
87           tree-model="selected_source_fields"
88           selected-nodes="selected_source_field_list"
89           on-selection="selectFields()"
90           options="field_tree_opts"
91           filter-expression="filterFields"
92         >
93           <span ng-switch="" on="node.datatype">
94             <span ng-switch-when="bool" class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span>
95             <span ng-switch-when="float" class="glyphicon glyphicon-sound-5-1" aria-hidden="true"></span>
96             <span ng-switch-when="id" class="glyphicon glyphicon-barcode" aria-hidden="true"></span>
97             <span ng-switch-when="int" class="glyphicon glyphicon-scale" aria-hidden="true"></span>
98             <span ng-switch-when="interval" class="glyphicon glyphicon-resize-horizontal" aria-hidden="true"></span>
99             <span ng-switch-when="link" class="glyphicon glyphicon-link" aria-hidden="true"></span>
100             <span ng-switch-when="money" class="glyphicon glyphicon-usd" aria-hidden="true"></span>
101             <span ng-switch-when="number" class="glyphicon glyphicon-scale" aria-hidden="true"></span>
102             <span ng-switch-when="org_unit" class="glyphicon glyphicon-tree-conifer" aria-hidden="true"></span>
103             <span ng-switch-when="text" class="glyphicon glyphicon-font" aria-hidden="true"></span>
104             <span ng-switch-when="timestamp" class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
105           </span>
106           {{ node.label || node.name }}
107         </treecontrol>
108       </div>
109       <div class="col-md-5" style="max-height: 400px; min-height: 400px; overflow-y: scroll;">
110         <strong>[% l('Transform') %]</strong>
111         <br/>
112         <br/>
113         <br/>
114         <treecontrol
115           class="tree-light"
116           tree-model="available_field_transforms"
117           selected-node="selected_transform"
118           options="field_transforms_tree_opts"
119         >
120           {{ node.label || node.transform }}
121         </treecontrol>
122       </div>
123     </div>
124       </div>
125
126     <hr/>
127
128     <div class="row">
129       <div class="col-md-12">
130
131       <uib-tabset> 
132         <uib-tab index="0" heading="[% l('Display Fields') %]">
133           <eg-grid
134             id-field="index"
135             features="-sort,-multisort,-multiselect"
136             items-provider="grid_display_fields_provider"
137             grid-controls="display_grid_controls"
138           >
139             <eg-grid-action 
140               handler="changeDisplayLabel"
141               label="[% l('Change Column Label') %]">
142             </eg-grid-action>
143
144             <eg-grid-action 
145               handler="changeDisplayFieldDoc"
146               label="[% l('Change Column Documentation') %]">
147             </eg-grid-action>
148           
149             <eg-grid-action 
150               handler="changeTransform"
151               label="[% l('Change Transform') %]">
152             </eg-grid-action>
153           
154             <eg-grid-action 
155               handler="moveDisplayFieldUp"
156               label="[% l('Move Field Up') %]">
157             </eg-grid-action>
158           
159             <eg-grid-action 
160               handler="moveDisplayFieldDown"
161               label="[% l('Move Field Down') %]">
162             </eg-grid-action>
163           
164             <eg-grid-action 
165               handler="removeDisplayField"
166               label="[% l('Remove Field') %]">
167             </eg-grid-action>
168           
169             <eg-grid-menu-item handler="addDisplayFields"
170               label="[% l('Add Fields') %]"></eg-grid-menu-item>
171           
172             <eg-grid-field path='path_label' label="[% l('Source Path') %]"></eg-grid-field>
173             <eg-grid-field path='name' label="[% l('Column') %]" hidden></eg-grid-field>
174             <eg-grid-field path='doc_text' label="[% l('Documentation') %]" hidden></eg-grid-field>
175             <eg-grid-field path='label' label="[% l('Column Label') %]"></eg-grid-field>
176             <eg-grid-field path='datatype' label="[% l('Data Type') %]"></eg-grid-field>
177             <eg-grid-field path='transform.label' label="[% l('Field Transform') %]"></eg-grid-field>
178           </eg-grid>
179         </uib-tab>
180
181         <uib-tab index="1" heading="[% l('Filters') %]">
182           <eg-grid
183             id-field="index"
184             features="-sort,-multisort,-multiselect"
185             items-provider="grid_filter_fields_provider"
186             grid-controls="filter_grid_controls"
187           >
188             <eg-grid-action 
189               handler="changeFilterFieldDoc"
190               label="[% l('Change Column Documentation') %]">
191             </eg-grid-action>
192
193             <eg-grid-action 
194               handler="changeTransform"
195               label="[% l('Change Transform') %]">
196             </eg-grid-action>
197
198             <eg-grid-action 
199               handler="changeOperator"
200               label="[% l('Change Operator') %]">
201             </eg-grid-action>
202           
203             <eg-grid-action 
204               handler="changeFilterValue"
205               label="[% l('Change Filter Value') %]">
206             </eg-grid-action>
207           
208             <eg-grid-action 
209               handler="removeFilterValue"
210               label="[% l('Remove Filter Value') %]">
211             </eg-grid-action>
212       
213             <eg-grid-action 
214               handler="removeFilterField"
215               label="[% l('Remove Field') %]">
216             </eg-grid-action>
217           
218             <eg-grid-menu-item handler="addFilterFields"
219               label="[% l('Add Fields') %]"></eg-grid-menu-item>
220           
221             <eg-grid-field path='path_label' label="[% l('Source Path') %]"></eg-grid-field>
222             <eg-grid-field path='label' label="[% l('Name') %]"></eg-grid-field>
223             <eg-grid-field path='name' label="[% l('Column') %]"></eg-grid-field>
224             <eg-grid-field path='datatype' label="[% l('Data Type') %]"></eg-grid-field>
225             <eg-grid-field path='operator.label' label="[% l('Operator') %]"></eg-grid-field>
226             <eg-grid-field path='transform.label' label="[% l('Field Transform') %]"></eg-grid-field>
227             <eg-grid-field path='value' label="[% l('Filter Value') %]"></eg-grid-field>
228           </eg-grid>
229         </uib-tab>
230       </uib-tabset>
231
232     </div>
233   </div>
234 </div>
235