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