Menu

[r3]: / py_top_web_client_01 / PSInterviewPCView.py  Maximize  Restore  History

Download this file

328 lines (289 with data), 14.1 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
from os.path import getmtime, exists
import time
import types
import __builtin__
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
from Cheetah.Template import Template
from Cheetah.DummyTransaction import DummyTransaction
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
from Cheetah.CacheRegion import CacheRegion
import Cheetah.Filters as Filters
import Cheetah.ErrorCatchers as ErrorCatchers
##################################################
## MODULE CONSTANTS
try:
True, False
except NameError:
True, False = (1==1), (1==0)
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.0rc8'
__CHEETAH_versionTuple__ = (2, 0, 0, 'candidate', 8)
__CHEETAH_genTime__ = 1189741981.434613
__CHEETAH_genTimestamp__ = 'Thu Sep 13 23:53:01 2007'
__CHEETAH_src__ = 'PSInterviewPCView.tmpl'
__CHEETAH_srcLastModified__ = 'Wed Aug 22 23:06:30 2007'
__CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
raise AssertionError(
'This template was compiled with Cheetah version'
' %s. Templates compiled before version %s must be recompiled.'%(
__CHEETAH_version__, RequiredCheetahVersion))
##################################################
## CLASSES
class PSInterviewPCView(Template):
##################################################
## CHEETAH GENERATED METHODS
def __init__(self, *args, **KWs):
Template.__init__(self, *args, **KWs)
if not self._CHEETAH__instanceInitialized:
cheetahKWArgs = {}
allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
for k,v in KWs.items():
if k in allowedKWs: cheetahKWArgs[k] = v
self._initCheetahInstance(**cheetahKWArgs)
def respond(self, trans=None):
## CHEETAH: main method generated for this template
if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
trans = self.transaction # is None unless self.awake() was called
if not trans:
trans = DummyTransaction()
_dummyTrans = True
else: _dummyTrans = False
write = trans.response().write
SL = self._CHEETAH__searchList
_filter = self._CHEETAH__currentFilter
########################################
## START - generated method body
write('''<h1>Interview: ''')
_v = VFFSL(SL,"iw_name",True) # '$iw_name' on line 2, col 16
if _v is not None: write(_filter(_v, rawExpr='$iw_name')) # from line 2, col 16.
write('''</h1>\r
<div id="error_div" class="errmsg">''')
_v = VFFSL(SL,"err_msg",True) # '$err_msg' on line 3, col 36
if _v is not None: write(_filter(_v, rawExpr='$err_msg')) # from line 3, col 36.
write('''</div>\r
<div id="status_div" class="statmsg">''')
_v = VFFSL(SL,"status_msg",True) # '$status_msg' on line 4, col 38
if _v is not None: write(_filter(_v, rawExpr='$status_msg')) # from line 4, col 38.
write('''</div>\r
<input type="hidden" name="top_status" id="top_status" value="ready"/>\r
\r
<h2>Pre-Condition</h2>\r
\r
<div class="re_rule_criteria">\r
<h3>Select Categories / Tags for specifying the Pre-Condition</h3>\r
<!-- table to select categories and Tags -->\r
<table border="0" class="re_select_table">\r
<!-- row 1: all categories and Tags tables -->\r
<tr>\r
<!-- First collumn: Categories -->\r
<td class="re_st_c1">\r
<input class="re_st_c1_button" id="re_show_all_nodes_button" type="button" value="Show All Tags" onclick="re_show_all_nodes_fn(\'\')"/>\r
<div id="all_categories_table_div" class="re_st_c1_datatable">\r
<table>\r
<thead>\r
<tr><th>Category Name</th></tr>\r
</thead>\r
<tbody>\r
<tr><td/></tr>\r
''')
for category in VFFSL(SL,"all_categories_itor",True): # generated from line 25, col 29
write(''' <tr><td>''')
_v = VFN(VFFSL(SL,"category",True),"get_name",False)() # '$category.get_name()' on line 26, col 41
if _v is not None: write(_filter(_v, rawExpr='$category.get_name()')) # from line 26, col 41.
write('''</td></tr>\r
''')
write(''' </tbody>\r
</table>\r
</div>\r
</td>\r
<!-- Second collumn: All Tags for Categories -->\r
<td class="re_st_c2">\r
<div id="all_nodes_table_div" class="re_st_c2_datatable">\r
<table>\r
<thead>\r
<tr>\r
<th>Tag Name</th>\r
<th>S?</th>\r
</tr>\r
</thead>\r
<tbody>\r
<tr><td/><td/></tr>\r
''')
for node_index in VFFSL(SL,"all_nodes_index_itor",True): # generated from line 44, col 29
name = VFN(VFFSL(SL,"node_index",True),"get_name",False)()
write(''' <tr>\r
<td>''')
_v = VFFSL(SL,"name",True) # '$name' on line 47, col 41
if _v is not None: write(_filter(_v, rawExpr='$name')) # from line 47, col 41.
write('''</td>\r
''')
if VFN(VFFSL(SL,"node_index",True),"is_skip_pattern_activation",False)(): # generated from line 48, col 37
write(''' <td>Yes</td>\r
''')
else: # generated from line 50, col 37
write(''' <td>No</td>\r
''')
write(''' </tr>\r
''')
write(''' </tbody>\r
</table>\r
</div>\r
</td>\r
</tr>\r
<!-- row 2: buttons to select Tags/ex-category to rule -->\r
<tr>\r
<!-- First collumn: Add Category to ex_category -->\r
<td class="re_st_c1">\r
<input id="addx_cname" type="hidden" name="cname" value=""/>\r
<input id="re_rname" type="hidden" name="rname" value="''')
_v = VFN(VFFSL(SL,"pre_condition_rule_index",True),"get_name",False)() # '$pre_condition_rule_index.get_name()' on line 65, col 73
if _v is not None: write(_filter(_v, rawExpr='$pre_condition_rule_index.get_name()')) # from line 65, col 73.
write('''"/>\r
<input class="re_st_c1_button" id="addx_button" type="button" value="Add Category to IF" disabled="y" onclick="re_add_node_fn(\'add_ex\', [\'addx_cname\'])"/>\r
</td>\r
<!-- Second collumn: Add Tag to IF/AND, THEN, UNLESS -->\r
<td class="re_st_c2">\r
<input id="alln_tname" type="hidden" name="tname" value=""/>\r
<input class="ppc_rt_button1" id="addc1_button" type="button" value="Add to IF" disabled="y" onclick="re_add_node_fn(\'add_c1\', [\'alln_tname\'])"/>\r
<input class="ppc_rt_button2" id="addneg_button" type="button" value="Add to UNLESS" disabled="y" onclick="re_add_node_fn(\'add_neg\', [\'alln_tname\'])"/>\r
</td>\r
</tr>\r
</table>\r
</div>\r
\r
<div class="re_rule_criteria">\r
<h3>IF Criteria</h3>\r
<div id="c1_nodes_table_div" class="re_datatable">\r
<table>\r
<thead>\r
<tr>\r
<th>Category</th>\r
<th>Tag Name</th>\r
<th>S?</th>\r
</tr>\r
</thead>\r
<tbody>\r
<tr><td/><td/><td/></tr>\r
''')
for category in VFFSL(SL,"ex_categories_itor",True): # generated from line 91, col 17
write(''' <tr>\r
<td>''')
_v = VFN(VFFSL(SL,"category",True),"get_name",False)() # '$category.get_name()' on line 93, col 29
if _v is not None: write(_filter(_v, rawExpr='$category.get_name()')) # from line 93, col 29.
write('''</td>\r
<td>(One or More Tags)</td>\r
<td></td>\r
</tr>\r
''')
for node_index in VFFSL(SL,"c1_nodes_index_itor",True): # generated from line 98, col 17
name = VFN(VFFSL(SL,"node_index",True),"get_name",False)()
write(''' <tr>\r
<td>''')
_v = VFN(VFFSL(SL,"topPSModel",True),"get_category_name_for",False)(VFFSL(SL,"node_index",True)) # '$topPSModel.get_category_name_for($node_index)' on line 101, col 29
if _v is not None: write(_filter(_v, rawExpr='$topPSModel.get_category_name_for($node_index)')) # from line 101, col 29.
write('''</td>\r
<td>''')
_v = VFFSL(SL,"name",True) # '$name' on line 102, col 29
if _v is not None: write(_filter(_v, rawExpr='$name')) # from line 102, col 29.
write('''</td>\r
''')
if VFN(VFFSL(SL,"node_index",True),"is_skip_pattern_activation",False)(): # generated from line 103, col 25
write(''' <td>Yes</td>\r
''')
else: # generated from line 105, col 25
write(''' <td>No</td>\r
''')
write(''' </tr>\r
''')
write(''' </tbody>\r
</table>\r
</div>\r
<input type="hidden" name="cname" id="c1n_cname" value=""/>\r
<input type="hidden" name="tname" id="c1n_tname" value=""/>\r
<input type="hidden" name="is_act" id="c1n_is_skip" value=""/>\r
<input class="re_ct_button" id="c1n_button" type="button" value="Remove Tag from IF" disabled="y" onclick="re_add_node_fn(\'remove_c1\', [\'c1n_cname\',\'c1n_tname\',\'c1n_is_skip\'] )"/>\r
</div>\r
\r
<div class="re_rule_criteria">\r
<h3>UNLESS Criteria</h3>\r
<div id="negated_nodes_table_div" class="re_datatable">\r
<table>\r
<thead>\r
<tr>\r
<th>Category</th>\r
<th>Tag Name</th>\r
<th>S?</th>\r
</tr>\r
</thead>\r
<tbody>\r
<tr><td/><td/><td/></tr>\r
''')
for node_index in VFFSL(SL,"negated_nodes_index_itor",True): # generated from line 132, col 13
name = VFN(VFFSL(SL,"node_index",True),"get_name",False)()
write(''' <tr>\r
<td>''')
_v = VFN(VFFSL(SL,"topPSModel",True),"get_category_name_for",False)(VFFSL(SL,"node_index",True)) # '$topPSModel.get_category_name_for($node_index)' on line 135, col 21
if _v is not None: write(_filter(_v, rawExpr='$topPSModel.get_category_name_for($node_index)')) # from line 135, col 21.
write('''</td>\r
<td>''')
_v = VFFSL(SL,"name",True) # '$name' on line 136, col 21
if _v is not None: write(_filter(_v, rawExpr='$name')) # from line 136, col 21.
write('''</td>\r
''')
if VFN(VFFSL(SL,"node_index",True),"is_skip_pattern_activation",False)(): # generated from line 137, col 17
write(''' <td>Yes</td>\r
''')
else: # generated from line 139, col 17
write(''' <td>No</td>\r
''')
write(''' </tr>\r
''')
write(''' </tbody>\r
</table>\r
</div>\r
<input type="hidden" name="tname" id="neg_tname" value=""/>\r
<input class="re_ct_button" id="neg_button" type="button" value="Remove Tag from UNLESS" disabled="y" onclick="re_add_node_fn(\'remove_neg\', [\'neg_tname\'])"/>\r
</div>\r
\r
<input type="hidden" name="iname" id="bk_iname" value="''')
_v = VFFSL(SL,"iw_name",True) # '$iw_name' on line 151, col 56
if _v is not None: write(_filter(_v, rawExpr='$iw_name')) # from line 151, col 56.
write('''"/>\r
<input class="go_back_button" id="bk_button" type="submit" value="&lt; Back to Interview" onclick="do_view_interview(\'bk_iname\')"/>\r
''')
########################################
## END - generated method body
return _dummyTrans and trans.response().getvalue() or ""
##################################################
## CHEETAH GENERATED ATTRIBUTES
_CHEETAH__instanceInitialized = False
_CHEETAH_version = __CHEETAH_version__
_CHEETAH_versionTuple = __CHEETAH_versionTuple__
_CHEETAH_genTime = __CHEETAH_genTime__
_CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
_CHEETAH_src = __CHEETAH_src__
_CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
_mainCheetahMethod_for_PSInterviewPCView= 'respond'
## END CLASS DEFINITION
if not hasattr(PSInterviewPCView, '_initCheetahAttributes'):
templateAPIClass = getattr(PSInterviewPCView, '_CHEETAH_templateClass', Template)
templateAPIClass._addCheetahPlumbingCodeToClass(PSInterviewPCView)
# CHEETAH was developed by Tavis Rudd and Mike Orr
# with code, advice and input from many other volunteers.
# For more information visit http://www.CheetahTemplate.org/
##################################################
## if run from command line:
if __name__ == '__main__':
from Cheetah.TemplateCmdLineIface import CmdLineIface
CmdLineIface(templateObj=PSInterviewPCView()).run()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.