use new event_def name field. added delete buttons for more event_def grids
[working/Evergreen.git] / Open-ILS / web / templates / default / conify / global / action_trigger / event_definition.tt2
1 [% WRAPPER default/base.tt2 %]
2 <script src='[% ctx.media_prefix %]/js/ui/default/conify/global/action_trigger/event_definition.js'> </script>
3
4 <div dojoType="dijit.layout.TabContainer" style='height:100%;' jsId='eventDefTabs'>
5
6     <div dojoType="dijit.layout.ContentPane" title='Event Definitions' selected='true' id='tab-atevdef'>
7         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
8             <div>Trigger Event Definitions</div>
9             <div>
10                 <button dojoType='dijit.form.Button' onClick='edGrid.showCreatePane()'>New</button>
11                 <button dojoType='dijit.form.Button' onClick='edGrid.showClonePane()'>Clone Selected</button>
12                 <button dojoType='dijit.form.Button' onClick='edGrid.deleteSelected()'>Delete Selected</button>
13             </div>
14         </div>
15         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:90%'>
16             <table  jsId="edGrid" 
17                     dojoType="openils.widget.AutoGrid" 
18                     fieldOrder="['owner', 'name', 'hook', 'active', 'delay', 'delay_field', 'group_field', 'validator', 'reactor']"
19                     suppressFields="['template', 'cleanup_failure', 'cleanup_success']"
20                     query="{id: '*'}" 
21                     fmClass='atevdef'
22                     defaultCellWidth='"auto"'
23                     editStyle='pane'
24                     editOnEnter='true'>
25             </table>
26         </div>
27     </div>
28
29     <div dojoType="dijit.layout.ContentPane" title='Event Parameters' id='tab-atevparam'>
30         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
31             <div>Trigger Event Parameters</div>
32             <div>
33                 <button dojoType='dijit.form.Button' onClick='tepGrid.showCreateDialog()'>New</button>
34                 <button dojoType='dijit.form.Button' onClick='tepGrid.deleteSelected()'>Delete Selected</button>
35             </div>
36         </div>
37         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:90%'>
38             <table  jsId="tepGrid" 
39                     dojoType="openils.widget.AutoGrid" 
40                     fieldOrder="['id', 'event_def', 'param', 'value']"
41                     query="{id: '*'}" 
42                     fmClass='atevparam'
43                     defaultCellWidth='20'
44                     editOnEnter='true'>
45                 <thead>
46                     <tr><th field='event_def' get='eventDefGetter'/></tr>
47                 </thead>
48             </table>
49         </div>
50     </div>
51
52     <div dojoType="dijit.layout.ContentPane" title='Event Environment' id='tab-atenv'>
53         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
54             <div>Trigger Event Environment</div>
55             <div>   
56                 <button dojoType='dijit.form.Button' onClick='teeGrid.showCreateDialog()'>New</button>
57                 <button dojoType='dijit.form.Button' onClick='teeGrid.deleteSelected()'>Delete Selected</button>
58             </div>
59         </div>
60         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:90%'>
61             <table  jsId="teeGrid" 
62                     dojoType="openils.widget.AutoGrid" 
63                     fieldOrder="['id', 'event_def', 'path', 'collector', 'label']"
64                     query="{id: '*'}" 
65                     fmClass='atenv'
66                     defaultCellWidth='20'
67                     editOnEnter='true'>
68                 <thead>
69                     <tr><th field='event_def' get='eventDefGetter'/></tr>
70                 </thead>
71             </table>
72         </div>
73     </div>
74
75
76     <div dojoType="dijit.layout.ContentPane" title='Hooks' id='tab-ath'>
77         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
78             <div>Trigger Hooks</div>
79             <div>
80                 <button dojoType='dijit.form.Button' onClick='thGrid.showCreateDialog()'>New</button>
81                 <button dojoType='dijit.form.Button' onClick='thGrid.deleteSelected()'>Delete Selected</button>
82             </div>
83         </div>
84         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:90%'>
85             <table  jsId="thGrid" 
86                     dojoType="openils.widget.AutoGrid" 
87                     fieldOrder="['key', 'core_type', 'description', 'passive']"
88                     query="{key: '*'}" 
89                     fmClass='ath'
90                     defaultCellWidth='20'
91                     editOnEnter='true'>
92             </table>
93         </div>
94     </div>
95
96     <div dojoType="dijit.layout.ContentPane" title='Reactors' id='tab-atreact'>
97         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
98             <div>Trigger Reactors</div>
99             <div>
100                 <button dojoType='dijit.form.Button' onClick='trGrid.showCreateDialog()'>New</button>
101                 <button dojoType='dijit.form.Button' onClick='trGrid.deleteSelected()'>Delete Selected</button>
102             </div>
103         </div>
104         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:90%'>
105             <table  jsId="trGrid" 
106                     dojoType="openils.widget.AutoGrid" 
107                     query="{module: '*'}" 
108                     fmClass='atreact'
109                     editOnEnter='true'>
110                 <thead>
111                     <tr>
112                         <th field='module' width='200px;'/>
113                         <th field='description' width='auto'/>
114                     </tr>
115                 </thead>
116             </table>
117         </div>
118     </div>
119
120     <div dojoType="dijit.layout.ContentPane" title='Validators' id='tab-atval'>
121         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
122             <div>Trigger Validators</div>
123             <div>
124                 <button dojoType='dijit.form.Button' onClick='tvGrid.showCreateDialog()'>New</button>
125                 <button dojoType='dijit.form.Button' onClick='tvGrid.deleteSelected()'>Delete Selected</button>
126             </div>
127         </div>
128         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:90%'>
129             <table  jsId="tvGrid" 
130                     dojoType="openils.widget.AutoGrid" 
131                     query="{module: '*'}" 
132                     fmClass='atval'
133                     editOnEnter='true'>
134                 <thead>
135                     <tr>
136                         <th field='module' width='200px'/>
137                         <th field='description' width='auto'/>
138                     </tr>
139                 </thead>
140             </table>
141         </div>
142     </div>
143
144     <div dojoType="dijit.layout.ContentPane" title='Test' id='tab-test'>
145         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
146             <div>Event Definition Tests</div>
147             <div></div>
148         </div>
149         <br/>
150         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:90%'>
151             <div style='border:1px solid #aaa;'>
152                 <h2>Test Circulation</h2>
153                 <table class='oils-generic-table'>
154                     <tr>
155                         <td>Trigger Hook</td>
156                         <td><div dojoType='dijit.form.FilteringSelect' jsId='circTestHookSelector'/></td>
157                     </tr>
158                     <tr>
159                         <td>Trigger Event Definition</td>
160                         <td><div dojoType='dijit.form.FilteringSelect' jsId='circTestDefSelector'/></td>
161                     </tr>
162                     <tr>
163                         <td>Barcode of Circulating Copy</td>
164                         <td><div dojoType='dijit.form.TextBox' jsId='circTestBarcode'/></td>
165                     </tr>
166                     <tr>
167                         <td colspan='2'><button dojoType='dijit.form.Button' onclick='evtTestCirc'>Go</button></td>
168                     </tr>
169                 </table>
170             </div>
171
172             <div id='test-event-output' style='width:90%;margin:20px;border:1px solid #aaa;' class='hidden'>
173             </div>
174             <div jsId='progressDialog' dojoType='openils.widget.ProgressDialog' indeterminate='true'></div>
175         </div>
176     </div>
177
178 </div>
179
180 [% END %]
181
182